mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
UI: glimmerize replication page (#25838)
This commit is contained in:
@@ -7,17 +7,20 @@ import { alias } from '@ember/object/computed';
|
||||
import { service } from '@ember/service';
|
||||
import Controller from '@ember/controller';
|
||||
import { task, timeout } from 'ember-concurrency';
|
||||
import { waitFor } from '@ember/test-waiters';
|
||||
|
||||
export default Controller.extend({
|
||||
router: service(),
|
||||
rm: service('replication-mode'),
|
||||
replicationMode: alias('rm.mode'),
|
||||
waitForNewClusterToInit: task(function* (replicationMode) {
|
||||
// waiting for the newly enabled cluster to init
|
||||
// this ensures we don't hit a capabilities-self error, called in the model of the mode/index route
|
||||
yield timeout(1000);
|
||||
this.router.transitionTo('vault.cluster.replication.mode', replicationMode);
|
||||
}),
|
||||
waitForNewClusterToInit: task(
|
||||
waitFor(function* (replicationMode) {
|
||||
// waiting for the newly enabled cluster to init
|
||||
// this ensures we don't hit a capabilities-self error, called in the model of the mode/index route
|
||||
yield timeout(1000);
|
||||
this.router.transitionTo('vault.cluster.replication.mode', replicationMode);
|
||||
})
|
||||
),
|
||||
actions: {
|
||||
onEnable(replicationMode, mode) {
|
||||
if (replicationMode == 'dr' && mode === 'secondary') {
|
||||
|
||||
Reference in New Issue
Block a user