open-vault/ui/app/components/status-menu.js
Matthew Irish b5aa3c123f
UI - Correct the DR token command (#5857)
* fix dr-token generation token command

* inject version service in the status menu so we can hide the license link in the status menu
2018-11-27 17:05:34 -06:00

32 lines
946 B
JavaScript

import { inject as service } from '@ember/service';
import { alias } from '@ember/object/computed';
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
currentCluster: service('current-cluster'),
cluster: alias('currentCluster.cluster'),
auth: service(),
store: service(),
media: service(),
version: service(),
type: 'cluster',
itemTag: null,
partialName: computed('type', function() {
return `partials/status/${this.type}`;
}),
glyphName: computed('type', function() {
const glyphs = {
cluster: 'status-indicator',
user: 'person',
};
return glyphs[this.type];
}),
activeCluster: computed('auth.activeCluster', function() {
return this.get('store').peekRecord('cluster', this.get('auth.activeCluster'));
}),
currentToken: computed('auth.currentToken', function() {
return this.get('auth.currentToken');
}),
});