Skip to content

Commit 05a985d

Browse files
author
Noelle Daley
authored
ensure status menu displays replication state, not just one (#8959)
1 parent f60d159 commit 05a985d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

ui/app/models/cluster.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,8 @@ export default DS.Model.extend({
4646
//otherwise the particular mode will have the relevant mode attr through replication-attributes
4747
mode: attr('string'),
4848
allReplicationDisabled: and('{dr,performance}.replicationDisabled'),
49-
5049
anyReplicationEnabled: or('{dr,performance}.replicationEnabled'),
5150

52-
modeState: computed('dr.{mode,state}', 'performance.{mode,state}', 'replicationMode', function() {
53-
const mode = this.replicationMode;
54-
return this.get(`${mode}.state`);
55-
}),
56-
5751
dr: fragment('replication-attributes'),
5852
performance: fragment('replication-attributes'),
5953
// this service exposes what mode the UI is currently viewing

ui/lib/core/addon/components/replication-mode-summary.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export default Component.extend({
4848
clusterIdDisplay: replicationAttr('clusterIdDisplay'),
4949
mode: null,
5050
cluster: null,
51-
modeState: computed('cluster', function() {
52-
return this.cluster.modeState;
51+
modeState: computed('cluster', 'mode', function() {
52+
const { cluster, mode } = this;
53+
const clusterState = cluster[mode].state;
54+
return clusterState;
5355
}),
5456
});

0 commit comments

Comments
 (0)