Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
168c0e5d
Commit
168c0e5d
authored
Feb 16, 2020
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '14061-license-app-data' into 'master'"
This reverts merge request !24831
parent
b550069c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
14 deletions
+3
-14
ee/app/controllers/projects/licenses_controller.rb
ee/app/controllers/projects/licenses_controller.rb
+0
-9
ee/app/views/projects/licenses/index.html.haml
ee/app/views/projects/licenses/index.html.haml
+3
-1
ee/spec/controllers/projects/licenses_controller_spec.rb
ee/spec/controllers/projects/licenses_controller_spec.rb
+0
-4
No files found.
ee/app/controllers/projects/licenses_controller.rb
View file @
168c0e5d
...
...
@@ -11,7 +11,6 @@ module Projects
def
index
respond_to
do
|
format
|
format
.
html
do
@licenses_app_data
=
licenses_app_data
render
status: :ok
end
format
.
json
do
...
...
@@ -84,13 +83,5 @@ module Projects
def
truthy?
(
value
)
value
.
in?
(
%w[true 1]
)
end
def
licenses_app_data
{
endpoint:
project_licenses_path
(
project
,
detected:
true
,
format: :json
),
documentation_path:
help_page_path
(
'user/application_security/license_compliance/index'
),
empty_state_svg_path:
helpers
.
image_path
(
'illustrations/Dependency-list-empty-state.svg'
)
}
end
end
end
ee/app/views/projects/licenses/index.html.haml
View file @
168c0e5d
-
breadcrumb_title
_
(
'License Compliance'
)
-
page_title
_
(
'License Compliance'
)
#js-licenses-app
{
data:
licenses_app_data
}
#js-licenses-app
{
data:
{
endpoint:
project_licenses_path
(
@project
,
detected:
true
,
format: :json
),
documentation_path:
help_page_path
(
'user/application_security/license_compliance/index'
),
empty_state_svg_path:
image_path
(
'illustrations/Dependency-list-empty-state.svg'
)
}
}
ee/spec/controllers/projects/licenses_controller_spec.rb
View file @
168c0e5d
...
...
@@ -27,10 +27,6 @@ describe Projects::LicensesController do
get
:index
,
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
licenses_app_data
=
assigns
(
:licenses_app_data
)
expect
(
licenses_app_data
[
:endpoint
]).
to
eql
(
controller
.
helpers
.
project_licenses_path
(
project
,
detected:
true
,
format: :json
))
expect
(
licenses_app_data
[
:documentation_path
]).
to
eql
(
help_page_path
(
'user/application_security/license_compliance/index'
))
expect
(
licenses_app_data
[
:empty_state_svg_path
]).
to
eql
(
controller
.
helpers
.
image_path
(
'illustrations/Dependency-list-empty-state.svg'
))
end
it
'counts usage of the feature'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment