summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-11-21 17:26:19 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-11-21 17:26:19 -0500
commit78df7346e91afc95be2b8c91d63966aa3342e7d8 (patch)
tree15df43449b6a150696306de3a7b73ee55ace3ec5
parent04126be808c2e4bf2fca11ede6b228c5a4f2dd74 (diff)
downloadgitlab-ce-78df7346e91afc95be2b8c91d63966aa3342e7d8.tar.gz
Add custom copy for each empty stage
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es62
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es611
-rw-r--r--app/views/projects/cycle_analytics/_empty_stage.html.haml7
3 files changed, 13 insertions, 7 deletions
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6
index 5a884c3f896..f1ddd139c48 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6
@@ -30,7 +30,7 @@ $(() => {
components: {
'stage-issue-component': gl.cycleAnalytics.StageIssueComponent,
'stage-plan-component': gl.cycleAnalytics.StagePlanComponent,
- 'stage-code-component': gl .cycleAnalytics.StageCodeComponent,
+ 'stage-code-component': gl.cycleAnalytics.StageCodeComponent,
'stage-test-component': gl.cycleAnalytics.StageTestComponent,
'stage-review-component': gl.cycleAnalytics.StageReviewComponent,
'stage-staging-component': gl.cycleAnalytics.StageStagingComponent,
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6 b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
index 5e28a273f9b..9b905874167 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
@@ -2,6 +2,16 @@
((global) => {
global.cycleAnalytics = global.cycleAnalytics || {};
+ const EMPTY_STAGE_TEXTS = {
+ issue: 'The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.',
+ plan: 'The planning stage shows the time from the previous step to pushing your first commit. This time will be added automatically once you push your first commit.',
+ code: 'The coding stage shows the time from the first commit to creating the merge request. The data will automatically be added here once you create your first merge request.',
+ test: 'The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running.',
+ review: 'The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request.',
+ staging: 'The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time.',
+ production: 'The production stage shows the total time it takes between creating an issue and deploying the code to production. The data will be automatically added once you have completed the full idea to production cycle.',
+ };
+
global.cycleAnalytics.CycleAnalyticsStore = {
state: {
summary: '',
@@ -27,6 +37,7 @@
const stageName = item.title.toLowerCase();
item.active = false;
item.isUserAllowed = data.permissions[stageName];
+ item.emptyStageText = EMPTY_STAGE_TEXTS[stageName];
item.component = `stage-${stageName}-component`;
});
newData.analytics = data;
diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml
index 06c42bff576..b200ce22970 100644
--- a/app/views/projects/cycle_analytics/_empty_stage.html.haml
+++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml
@@ -4,9 +4,4 @@
= custom_icon ('icon_no_data')
%h4 We don’t have enough data to show this stage.
%p
- The test phase measures the median time to run the entire pipeline for that project.
- It’s related to the time GitLab CI takes to run every job for the commits pushed
- to that merge request defined in the previous stage.
- Learn more about the
- %a{ :href => "https://docs.gitlab.com/ce/user/project/cycle_analytics.html" }
- expected workflow and calculations.
+ {{currentStage.emptyStageText}}