diff options
author | Zuul <zuul@review.opendev.org> | 2019-08-09 12:15:46 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2019-08-09 12:15:46 +0000 |
commit | daf21fc0b100c725dda2042855ef75cdeee789d6 (patch) | |
tree | b2b7dae16411c4c4bbae46820c08c1d99e73ebdd /web/src/reducers/build.js | |
parent | ea31407261531ee0592cee38de8e03149186dfcc (diff) | |
parent | 5049023d41dfdb9115df50794d927c1b8841d582 (diff) | |
download | zuul-daf21fc0b100c725dda2042855ef75cdeee789d6.tar.gz |
Merge "web: add buildset page"
Diffstat (limited to 'web/src/reducers/build.js')
-rw-r--r-- | web/src/reducers/build.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/src/reducers/build.js b/web/src/reducers/build.js index a3d545ad9..d7c89334c 100644 --- a/web/src/reducers/build.js +++ b/web/src/reducers/build.js @@ -19,6 +19,10 @@ import { BUILD_FETCH_REQUEST, BUILD_FETCH_SUCCESS, + BUILDSET_FETCH_FAIL, + BUILDSET_FETCH_REQUEST, + BUILDSET_FETCH_SUCCESS, + BUILD_OUTPUT_FAIL, BUILD_OUTPUT_REQUEST, BUILD_OUTPUT_SUCCESS, @@ -34,15 +38,24 @@ export default (state = { isFetchingOutput: false, isFetchingManifest: false, builds: {}, + buildsets: {}, }, action) => { switch (action.type) { case BUILD_FETCH_REQUEST: + case BUILDSET_FETCH_REQUEST: return update(state, {$merge: {isFetching: true}}) case BUILD_FETCH_SUCCESS: state.builds = update( state.builds, {$merge: {[action.buildId]: action.build}}) return update(state, {$merge: {isFetching: false}}) + case BUILDSET_FETCH_SUCCESS: + return update(state, {$merge: { + isFetching: false, + buildsets: update(state.buildsets, {$merge: { + [action.buildsetId]: action.buildset}}) + }}) case BUILD_FETCH_FAIL: + case BUILDSET_FETCH_FAIL: return update(state, {$merge: {isFetching: false}}) case BUILD_OUTPUT_REQUEST: |