Commit 5e565772 authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch 'move-move-devops-score-code-to-partial' into 'master'

Move devops markup to partial

See merge request gitlab-org/gitlab!46113
parents 0f32d802 8e30f01f
.devops - usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled
.devops-header
%h2.devops-header-title{ class: "devops-#{score_level(@metric.average_percentage_score)}-score" }
= number_to_percentage(@metric.average_percentage_score, precision: 1)
.devops-header-subtitle
= _('DevOps')
%br
= _('Score')
= link_to sprite_icon('question-o', css_class: 'devops-header-icon'), help_page_path('user/admin_area/analytics/dev_ops_report')
.devops-cards.board-card-container - if usage_ping_enabled && show_callout?('dev_ops_report_intro_callout_dismissed')
- @metric.cards.each do |card| = render 'callout'
= render 'card', card: card
.devops-steps.d-none.d-lg-block - if !usage_ping_enabled
- @metric.idea_to_production_steps.each_with_index do |step, index| #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/product_analytics/usage_ping') } }
.devops-step{ class: "devops-#{score_level(step.percentage_score)}-score" } - elsif @metric.blank?
= custom_icon("i2p_step_#{index + 1}") = render 'no_data'
%h4.devops-step-title - else
= step.title .devops
.devops-header
%h2.devops-header-title{ class: "devops-#{score_level(@metric.average_percentage_score)}-score" }
= number_to_percentage(@metric.average_percentage_score, precision: 1)
.devops-header-subtitle
= _('DevOps')
%br
= _('Score')
= link_to sprite_icon('question-o', css_class: 'devops-header-icon'), help_page_path('user/admin_area/analytics/dev_ops_report')
.devops-cards.board-card-container
- @metric.cards.each do |card|
= render 'card', card: card
.devops-steps.d-none.d-lg-block
- @metric.idea_to_production_steps.each_with_index do |step, index|
.devops-step{ class: "devops-#{score_level(step.percentage_score)}-score" }
= custom_icon("i2p_step_#{index + 1}")
%h4.devops-step-title
= step.title
- page_title _('DevOps Report') - page_title _('DevOps Report')
- usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled
- add_page_specific_style 'page_bundles/dev_ops_report' - add_page_specific_style 'page_bundles/dev_ops_report'
.container .container
- if usage_ping_enabled && show_callout?('dev_ops_report_intro_callout_dismissed')
= render 'callout'
.gl-mt-3 .gl-mt-3
- if !usage_ping_enabled
#js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/product_analytics/usage_ping') } }
- elsif @metric.blank?
= render 'no_data'
- else
= render 'report' = render 'report'
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