mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-26 00:51:08 +02:00
* Glimmerize replication controllers * Add enable-replication-form component with tests * use EnableReplicationForm in index and mode routes * clean up enable action from replication-actions mixin * fix test failure for structuredClone * stabilize tests, remove enable action from replication-actions and replication-summary * Update ui/lib/replication/addon/controllers/replication-mode.js Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> * address PR comments * stabilize oidc test? --------- Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
31 lines
841 B
JavaScript
31 lines
841 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { service } from '@ember/service';
|
|
import { computed } from '@ember/object';
|
|
import Component from '@ember/component';
|
|
import ReplicationActions from 'core/mixins/replication-actions';
|
|
|
|
export default Component.extend(ReplicationActions, {
|
|
replicationMode: 'dr',
|
|
mode: 'primary',
|
|
version: service(),
|
|
rm: service('replication-mode'),
|
|
didReceiveAttrs() {
|
|
this._super(...arguments);
|
|
const initialReplicationMode = this.initialReplicationMode;
|
|
if (initialReplicationMode) {
|
|
this.set('replicationMode', initialReplicationMode);
|
|
}
|
|
},
|
|
showModeSummary: false,
|
|
initialReplicationMode: null,
|
|
cluster: null,
|
|
|
|
attrsForCurrentMode: computed('cluster', 'rm.mode', function () {
|
|
return this.cluster[this.rm.mode];
|
|
}),
|
|
});
|