Skip to content

Commit

Permalink
restore cluster model
Browse files Browse the repository at this point in the history
  • Loading branch information
andaley committed Apr 30, 2020
1 parent f414d8d commit 21a4d9b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions ui/app/adapters/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ export default ApplicationAdapter.extend({
};
if (this.get('version.isEnterprise') && this.get('namespaceService.inRootNamespace')) {
fetches.replicationStatus = this.replicationStatus().catch(e => e);
fetches.replicationModeStatus = this.replicationModeStatus().catch(e => e);
}
return hash(fetches).then(({ health, sealStatus, replicationStatus, replicationModeStatus }) => {
return hash(fetches).then(({ health, sealStatus, replicationStatus }) => {
let ret = {
id,
name: snapshot.attr('name'),
Expand All @@ -58,11 +57,6 @@ export default ApplicationAdapter.extend({
ret = assign(ret, { nodes: [sealStatus] });
}
if (replicationStatus && replicationStatus instanceof AdapterError === false) {
console.log(replicationModeStatus.data.reindex_stage, ' - reindex stage');
console.log(replicationModeStatus.data.reindex_building_progress, ' - build progress');
console.log(replicationModeStatus.data.reindex_building_total, ' - build total');
console.log(replicationModeStatus.data.reindex_in_progress, ' - reindex in progress?');

ret = assign(ret, replicationStatus.data);
}
return resolve(ret);
Expand Down Expand Up @@ -165,7 +159,7 @@ export default ApplicationAdapter.extend({

urlForReplication(replicationMode, clusterMode, endpoint) {
let suffix;
const errString = `Calls to replication ${endpoint} endpoint are not currently allowed in the vault cluster adapter`;
const errString = `Calls to replication ${endpoint} endpoint are not currently allowed in the vault cluster adapater`;
if (clusterMode) {
assert(errString, REPLICATION_ENDPOINTS[clusterMode].includes(endpoint));
suffix = `${replicationMode}/${clusterMode}/${endpoint}`;
Expand All @@ -180,10 +174,6 @@ export default ApplicationAdapter.extend({
return this.ajax(`${this.buildURL()}/replication/status`, 'GET', { unauthenticated: true });
},

replicationModeStatus() {
return this.ajax(`${this.buildURL()}/replication/performance/status`, 'GET', { unauthenticated: true });
},

replicationDrPromote(data, options) {
const verb = options && options.checkStatus ? 'GET' : 'PUT';
return this.ajax(`${this.buildURL()}/replication/dr/secondary/promote`, verb, {
Expand Down

0 comments on commit 21a4d9b

Please sign in to comment.