open-vault/ui/app/components/status-menu.js
Matthew Irish 966c7dbf02
UI - New navbar and mount icons everywhere (#778)
New look for the navbar and new functionality on mobile. Also includes new look for the mounts list and headers in secret engines.
2018-10-21 14:19:34 -05:00

31 lines
924 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(),
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');
}),
});