diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-23 15:29:34 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-24 10:38:02 +0100 |
commit | 76ffde63189efd81249857a6a9bf612f328322c6 (patch) | |
tree | d91da91f755eabb6366e953d3a3b99090c539fe4 /app/assets/javascripts/ide/stores/modules/pipelines/getters.js | |
parent | 5e79276b53f61cbd727411ed33e71d5b6fa5ca54 (diff) | |
download | gitlab-ce-76ffde63189efd81249857a6a9bf612f328322c6.tar.gz |
style improvements
fixed multiple requests causing state to be emptied at wrong time
Diffstat (limited to 'app/assets/javascripts/ide/stores/modules/pipelines/getters.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/modules/pipelines/getters.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/getters.js b/app/assets/javascripts/ide/stores/modules/pipelines/getters.js index 99b4554a96e..e4570717791 100644 --- a/app/assets/javascripts/ide/stores/modules/pipelines/getters.js +++ b/app/assets/javascripts/ide/stores/modules/pipelines/getters.js @@ -1,5 +1,7 @@ export const hasLatestPipeline = state => !state.isLoadingPipeline && !!state.latestPipeline; +export const failedStages = state => state.stages.filter(stage => stage.status.label === 'failed'); + export const failedJobsCount = state => state.stages.reduce( (acc, stage) => acc + stage.jobs.filter(j => j.status.label === 'failed').length, |