Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6')
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es666
1 files changed, 62 insertions, 4 deletions
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 1715097bfb3..7c8461b85ae 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
@@ -3,11 +3,54 @@
global.cycleAnalytics.CycleAnalyticsStore = {
state: {
- isLoading: true,
- hasError: false,
summary: '',
stats: '',
- analytics: ''
+ analytics: '',
+ items: [],
+ stages:[
+ {
+ name:'Issue',
+ active: false,
+ component: 'stage-issue-component',
+ legendTitle: 'Related Issues',
+ },
+ {
+ name:'Plan',
+ active: false,
+ component: 'stage-plan-component',
+ legendTitle: 'Related Commits',
+ },
+ {
+ name:'Code',
+ active: false,
+ component: 'stage-code-component',
+ legendTitle: 'Related Merge Requests',
+ },
+ {
+ name:'Test',
+ active: false,
+ component: 'stage-test-component',
+ legendTitle: 'Relative Builds Trigger by Commits',
+ },
+ {
+ name:'Review',
+ active: false,
+ component: 'stage-review-component',
+ legendTitle: 'Relative Merged Requests',
+ },
+ {
+ name:'Staging',
+ active: false,
+ component: 'stage-staging-component',
+ legendTitle: 'Relative Deployed Builds',
+ },
+ {
+ name:'Production',
+ active: false,
+ component: 'stage-production-component',
+ legendTitle: 'Related Issues',
+ }
+ ],
},
setCycleAnalyticsData(data) {
this.state = Object.assign(this.state, this.decorateData(data));
@@ -35,7 +78,22 @@
},
setErrorState(state) {
this.state.hasError = state;
- }
+ },
+ deactivateAllStages() {
+ this.state.stages.forEach(stage => {
+ stage.active = false;
+ });
+ },
+ setActiveStage(stage) {
+ this.deactivateAllStages();
+ stage.active = true;
+ },
+ setStageItems(items) {
+ this.state.items = items;
+ },
+ currentActiveStage() {
+ return this.state.stages.find(stage => stage.active);
+ },
};
})(window.gl || (window.gl = {}));