open-vault/ui/app/models/node.js
Matthew Irish a22861cee9
UI - ent init (#5428)
* allow for enterprise init attributes

* allow moving from init to auth in the init flow on the tutorial machine

* show loading spinner while cluster is unsealing

* use seal-status type to determine the init attrs

* add init acceptance tests

* stored_shares should always be 1

* fix lint

* format template

* remove explicity model attr from init controller
2018-09-28 09:36:18 -05:00

33 lines
953 B
JavaScript

import { alias, and, equal } from '@ember/object/computed';
import DS from 'ember-data';
const { attr } = DS;
export default DS.Model.extend({
name: attr('string'),
//https://www.vaultproject.io/docs/http/sys-health.html
initialized: attr('boolean'),
sealed: attr('boolean'),
isSealed: alias('sealed'),
standby: attr('boolean'),
isActive: equal('standby', false),
clusterName: attr('string'),
clusterId: attr('string'),
isLeader: and('initialized', 'isActive'),
//https://www.vaultproject.io/docs/http/sys-seal-status.html
//The "t" parameter is the threshold, and "n" is the number of shares.
t: attr('number'),
n: attr('number'),
progress: attr('number'),
sealThreshold: alias('t'),
sealNumShares: alias('n'),
version: attr('string'),
type: attr('string'),
//https://www.vaultproject.io/docs/http/sys-leader.html
haEnabled: attr('boolean'),
isSelf: attr('boolean'),
leaderAddress: attr('string'),
});