summaryrefslogtreecommitdiff
path: root/app/views/instance_statistics
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 09:07:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 09:07:57 +0000
commit7881eb30eaa8b01dbcfe87faa09927c75c7d6e45 (patch)
tree298bc8d2c62b2f2c29cb8ecbcf3de3eaaa6466d9 /app/views/instance_statistics
parent64b66e0cb6d1bfd27abf24e06653f00bddb60597 (diff)
downloadgitlab-ce-7881eb30eaa8b01dbcfe87faa09927c75c7d6e45.tar.gz
Add latest changes from gitlab-org/gitlab@12-6-stable-ee
Diffstat (limited to 'app/views/instance_statistics')
-rw-r--r--app/views/instance_statistics/cohorts/_cohorts_table.html.haml27
-rw-r--r--app/views/instance_statistics/conversational_development_index/_callout.html.haml13
-rw-r--r--app/views/instance_statistics/dev_ops_score/_callout.html.haml13
-rw-r--r--app/views/instance_statistics/dev_ops_score/_card.html.haml (renamed from app/views/instance_statistics/conversational_development_index/_card.html.haml)6
-rw-r--r--app/views/instance_statistics/dev_ops_score/_disabled.html.haml (renamed from app/views/instance_statistics/conversational_development_index/_disabled.html.haml)4
-rw-r--r--app/views/instance_statistics/dev_ops_score/_no_data.html.haml (renamed from app/views/instance_statistics/conversational_development_index/_no_data.html.haml)6
-rw-r--r--app/views/instance_statistics/dev_ops_score/index.html.haml (renamed from app/views/instance_statistics/conversational_development_index/index.html.haml)22
7 files changed, 49 insertions, 42 deletions
diff --git a/app/views/instance_statistics/cohorts/_cohorts_table.html.haml b/app/views/instance_statistics/cohorts/_cohorts_table.html.haml
index 6a7c999bff3..d4defd3f849 100644
--- a/app/views/instance_statistics/cohorts/_cohorts_table.html.haml
+++ b/app/views/instance_statistics/cohorts/_cohorts_table.html.haml
@@ -1,25 +1,32 @@
+- number_of_data_columns = @cohorts[:months_included] - 1
.bs-callout.clearfix
%p
- User cohorts are shown for the last #{@cohorts[:months_included]}
- months. Only users with activity are counted in the cohort total; inactive
- users are counted separately.
+ = s_("Cohorts|User cohorts are shown for the last %{months_included} months. Only users with activity are counted in the 'New users' column; inactive users are counted separately.") % { months_included: @cohorts[:months_included] }
= link_to icon('question-circle'), help_page_path('user/instance_statistics/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank'
-.table-holder
+.table-holder.d-xl-table
%table.table
%thead
%tr
- %th Registration month
- %th Inactive users
- %th Cohort total
- - @cohorts[:months_included].times do |i|
- %th Month #{i}
+ %th.border-right.pt-4{ colspan: 3 }
+ %th.font-weight-bold.pt-4{ colspan: number_of_data_columns }
+ = s_("Cohorts|Returning users")
+ %tr
+ %th.border-top-0
+ = s_("Cohorts|Registration month")
+ %th.border-top-0
+ = s_("Cohorts|Inactive users")
+ %th.border-top-0.border-right
+ = s_("Cohorts|New users")
+ - number_of_data_columns.times do |i|
+ %th.border-top-0
+ = s_("Cohorts|Month %{month_index}") % { month_index: i + 1 }
%tbody
- @cohorts[:cohorts].each do |cohort|
%tr
%td= cohort[:registration_month]
%td= cohort[:inactive]
- %td= cohort[:total]
+ %td.border-right= cohort[:total]
- cohort[:activity_months].each do |activity_month|
%td
- next if cohort[:total] == '0'
diff --git a/app/views/instance_statistics/conversational_development_index/_callout.html.haml b/app/views/instance_statistics/conversational_development_index/_callout.html.haml
deleted file mode 100644
index a4256e23979..00000000000
--- a/app/views/instance_statistics/conversational_development_index/_callout.html.haml
+++ /dev/null
@@ -1,13 +0,0 @@
-.prepend-top-default
-.user-callout{ data: { uid: 'convdev_intro_callout_dismissed' } }
- .bordered-box.landing.content-block
- %button.btn.btn-default.close.js-close-callout{ type: 'button',
- 'aria-label' => _('Dismiss ConvDev introduction') }
- = icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true')
- .user-callout-copy
- %h4
- = _('Introducing Your Conversational Development Index')
- %p
- = _('Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers.')
- .svg-container.convdev
- = custom_icon('convdev_overview')
diff --git a/app/views/instance_statistics/dev_ops_score/_callout.html.haml b/app/views/instance_statistics/dev_ops_score/_callout.html.haml
new file mode 100644
index 00000000000..64eb72c0d8d
--- /dev/null
+++ b/app/views/instance_statistics/dev_ops_score/_callout.html.haml
@@ -0,0 +1,13 @@
+.prepend-top-default
+.user-callout{ data: { uid: 'dev_ops_score_intro_callout_dismissed' } }
+ .bordered-box.landing.content-block
+ %button.btn.btn-default.close.js-close-callout{ type: 'button',
+ 'aria-label' => _('Dismiss DevOps Score introduction') }
+ = icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true')
+ .user-callout-copy
+ %h4
+ = _('Introducing Your DevOps Score')
+ %p
+ = _('Your DevOps Score gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers.')
+ .svg-container.devops
+ = custom_icon('dev_ops_score_overview')
diff --git a/app/views/instance_statistics/conversational_development_index/_card.html.haml b/app/views/instance_statistics/dev_ops_score/_card.html.haml
index 76af55dcf7a..c63bd96a175 100644
--- a/app/views/instance_statistics/conversational_development_index/_card.html.haml
+++ b/app/views/instance_statistics/dev_ops_score/_card.html.haml
@@ -1,6 +1,6 @@
-.convdev-card-wrapper
- .convdev-card{ class: "convdev-card-#{score_level(card.percentage_score)}" }
- .convdev-card-title
+.devops-card-wrapper
+ .devops-card{ class: "devops-card-#{score_level(card.percentage_score)}" }
+ .devops-card-title
%h3
= card.title
.light-text
diff --git a/app/views/instance_statistics/conversational_development_index/_disabled.html.haml b/app/views/instance_statistics/dev_ops_score/_disabled.html.haml
index b854e15d36f..da27ea17b61 100644
--- a/app/views/instance_statistics/conversational_development_index/_disabled.html.haml
+++ b/app/views/instance_statistics/dev_ops_score/_disabled.html.haml
@@ -1,6 +1,6 @@
-.container.convdev-empty
+.container.devops-empty
.col-sm-12.justify-content-center.text-center
- = custom_icon('convdev_no_index')
+ = custom_icon('dev_ops_score_no_index')
%h4= _('Usage ping is not enabled')
- if !current_user.admin?
%p
diff --git a/app/views/instance_statistics/conversational_development_index/_no_data.html.haml b/app/views/instance_statistics/dev_ops_score/_no_data.html.haml
index 4e8f34cd574..54598244039 100644
--- a/app/views/instance_statistics/conversational_development_index/_no_data.html.haml
+++ b/app/views/instance_statistics/dev_ops_score/_no_data.html.haml
@@ -1,7 +1,7 @@
-.container.convdev-empty
+.container.devops-empty
.col-sm-12.justify-content-center.text-center
- = custom_icon('convdev_no_data')
+ = custom_icon('dev_ops_score_no_data')
%h4= _('Data is still calculating...')
%p
= _('In order to gather accurate feature usage data, it can take 1 to 2 weeks to see your index.')
- = link_to _('Learn more'), help_page_path('user/instance_statistics/convdev'), target: '_blank'
+ = link_to _('Learn more'), help_page_path('user/instance_statistics/dev_ops_score'), target: '_blank'
diff --git a/app/views/instance_statistics/conversational_development_index/index.html.haml b/app/views/instance_statistics/dev_ops_score/index.html.haml
index 49c8fdc9630..44c6e9664db 100644
--- a/app/views/instance_statistics/conversational_development_index/index.html.haml
+++ b/app/views/instance_statistics/dev_ops_score/index.html.haml
@@ -1,8 +1,8 @@
-- page_title _('ConvDev Index')
+- page_title _('DevOps Score')
- usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled
.container
- - if usage_ping_enabled && show_callout?('convdev_intro_callout_dismissed')
+ - if usage_ping_enabled && show_callout?('dev_ops_score_intro_callout_dismissed')
= render 'callout'
.prepend-top-default
@@ -11,23 +11,23 @@
- elsif @metric.blank?
= render 'no_data'
- else
- .convdev
- .convdev-header
- %h2.convdev-header-title{ class: "convdev-#{score_level(@metric.average_percentage_score)}-score" }
+ .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)
- .convdev-header-subtitle
+ .devops-header-subtitle
= _('index')
%br
= _('score')
- = link_to icon('question-circle', 'aria-hidden' => 'true'), help_page_path('user/instance_statistics/convdev')
+ = link_to icon('question-circle', 'aria-hidden' => 'true'), help_page_path('user/instance_statistics/dev_ops_score')
- .convdev-cards.board-card-container
+ .devops-cards.board-card-container
- @metric.cards.each do |card|
= render 'card', card: card
- .convdev-steps.d-none.d-lg-block.d-xl-block
+ .devops-steps.d-none.d-lg-block.d-xl-block
- @metric.idea_to_production_steps.each_with_index do |step, index|
- .convdev-step{ class: "convdev-#{score_level(step.percentage_score)}-score" }
+ .devops-step{ class: "devops-#{score_level(step.percentage_score)}-score" }
= custom_icon("i2p_step_#{index + 1}")
- %h4.convdev-step-title
+ %h4.devops-step-title
= step.title