Commit 253783c1 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'revert-fb62644e' into 'master'

Revert "Merge branch '14061-license-app-data' into 'master'"

See merge request gitlab-org/gitlab!25311
parents 74d94b8e 168c0e5d
...@@ -11,7 +11,6 @@ module Projects ...@@ -11,7 +11,6 @@ module Projects
def index def index
respond_to do |format| respond_to do |format|
format.html do format.html do
@licenses_app_data = licenses_app_data
render status: :ok render status: :ok
end end
format.json do format.json do
...@@ -84,13 +83,5 @@ module Projects ...@@ -84,13 +83,5 @@ module Projects
def truthy?(value) def truthy?(value)
value.in?(%w[true 1]) value.in?(%w[true 1])
end 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
end end
- breadcrumb_title _('License Compliance') - breadcrumb_title _('License Compliance')
- page_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') } }
...@@ -27,10 +27,6 @@ describe Projects::LicensesController do ...@@ -27,10 +27,6 @@ describe Projects::LicensesController do
get :index, params: params get :index, params: params
expect(response).to have_gitlab_http_status(:ok) 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 end
it 'counts usage of the feature' do it 'counts usage of the feature' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment