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/ide/stores/modules/pipelines/getters.js')
-rw-r--r--app/assets/javascripts/ide/stores/modules/pipelines/getters.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/getters.js b/app/assets/javascripts/ide/stores/modules/pipelines/getters.js
index e4570717791..95bed0f9050 100644
--- a/app/assets/javascripts/ide/stores/modules/pipelines/getters.js
+++ b/app/assets/javascripts/ide/stores/modules/pipelines/getters.js
@@ -1,10 +1,14 @@
export const hasLatestPipeline = state => !state.isLoadingPipeline && !!state.latestPipeline;
-export const failedStages = state => state.stages.filter(stage => stage.status.label === 'failed');
+export const failedStages = state =>
+ state.stages.filter(stage => stage.status.text === 'failed').map(stage => ({
+ ...stage,
+ jobs: stage.jobs.filter(job => job.status.text === 'failed'),
+ }));
export const failedJobsCount = state =>
state.stages.reduce(
- (acc, stage) => acc + stage.jobs.filter(j => j.status.label === 'failed').length,
+ (acc, stage) => acc + stage.jobs.filter(j => j.status.text === 'failed').length,
0,
);