summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Cacqueray <tdecacqu@redhat.com>2019-02-02 03:48:17 +0000
committerTristan Cacqueray <tdecacqu@redhat.com>2019-02-02 03:49:36 +0000
commit93cc8d274a4f1bbe1818edbda5199adadb5bff85 (patch)
tree4adde957c43781175d03672f10f8ad97a213ef88
parentb4e6247ab5ac1b868e954f4675b1d531600bb667 (diff)
web: clear status when changing tenant
This change improves the status reducer to clear the status for the tenant set action. This prevent incorrect status and flickering to occur when changing tenant. Change-Id: Ie910e83eba264a6668fa5fce7ebf71fe6c8cc36b
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 04 Feb 2019 20:58:06 +0000 Reviewed-on: https://review.openstack.org/634541 Project: openstack-infra/zuul Branch: refs/heads/master
-rw-r--r--web/src/reducers/status.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/src/reducers/status.js b/web/src/reducers/status.js
index 33d0ecf..a277947 100644
--- a/web/src/reducers/status.js
+++ b/web/src/reducers/status.js
@@ -12,6 +12,7 @@
12// License for the specific language governing permissions and limitations 12// License for the specific language governing permissions and limitations
13// under the License. 13// under the License.
14 14
15import { TENANT_SET } from '../actions/tenant'
15import { 16import {
16 STATUS_FETCH_FAIL, 17 STATUS_FETCH_FAIL,
17 STATUS_FETCH_REQUEST, 18 STATUS_FETCH_REQUEST,
@@ -23,6 +24,11 @@ export default (state = {
23 status: null 24 status: null
24}, action) => { 25}, action) => {
25 switch (action.type) { 26 switch (action.type) {
27 case TENANT_SET:
28 return {
29 isFetching: false,
30 status: null,
31 }
26 case STATUS_FETCH_REQUEST: 32 case STATUS_FETCH_REQUEST:
27 return { 33 return {
28 isFetching: true, 34 isFetching: true,