Commit 49e72259 authored by mfluharty's avatar mfluharty

Only show code quality tab if report exists

parent 9fb90188
......@@ -4,6 +4,7 @@
- license_management_settings_path = can?(current_user, :admin_software_license_policy, project) ? license_management_settings_path(project) : nil
- licenses_api_path = licenses_project_pipeline_path(project, pipeline) if project.feature_available?(:license_management)
- vulnerabilities_endpoint_path = expose_path(api_v4_projects_vulnerability_findings_path(id: project.id, params: { pipeline_id: pipeline.id, scope: 'dismissed' }))
- codequality_report_download_path = pipeline.downloadable_path_for_report_type(:codequality)
- if pipeline.expose_security_dashboard?
#js-tab-security.build-security.tab-pane
......@@ -24,6 +25,7 @@
licenses_api_path: licenses_api_path,
can_manage_licenses: can?(current_user, :admin_software_license_policy, project).to_s } }
#js-tab-codequality.tab-pane
#js-pipeline-codequality-report{ data: { codequality_report_download_path: pipeline.downloadable_path_for_report_type(:codequality),
- if codequality_report_download_path
#js-tab-codequality.tab-pane
#js-pipeline-codequality-report{ data: { codequality_report_download_path: codequality_report_download_path,
blob_path: project_blob_path(project, pipeline.ref) } }
......@@ -12,6 +12,7 @@
= _("Licenses")
%span.badge.badge-pill.js-licenses-counter.hidden{ data: { qa_selector: 'licenses_counter' } }
%li.js-codequality-tab-link
= link_to codequality_report_namespace_project_pipeline_path(@project.namespace, @project, @pipeline), data: { target: '#js-tab-codequality', action: 'codequality_report', toggle: 'tab'}, class: 'codequality-tab' do
- if pipeline.downloadable_path_for_report_type(:codequality)
%li.js-codequality-tab-link
= link_to codequality_report_namespace_project_pipeline_path(project.namespace, project, pipeline), data: { target: '#js-tab-codequality', action: 'codequality_report', toggle: 'tab'}, class: 'codequality-tab' do
= _('Code Quality')
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