2019-02-14 15:39:19 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
2018-09-25 16:28:26 +00:00
|
|
|
import Controller from '@ember/controller';
|
2019-02-14 15:39:19 +00:00
|
|
|
import { computed } from '@ember/object';
|
|
|
|
import config from '../config/environment';
|
2018-07-05 18:28:12 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Controller.extend({
|
2018-07-05 18:28:12 +00:00
|
|
|
queryParams: [
|
|
|
|
{
|
|
|
|
wrappedToken: 'wrapped_token',
|
2019-08-01 23:50:43 +00:00
|
|
|
redirectTo: 'redirect_to',
|
2018-07-05 18:28:12 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
wrappedToken: '',
|
2019-08-01 23:50:43 +00:00
|
|
|
redirectTo: '',
|
2019-02-14 15:39:19 +00:00
|
|
|
env: config.environment,
|
|
|
|
auth: service(),
|
|
|
|
store: service(),
|
|
|
|
activeCluster: computed('auth.activeCluster', function() {
|
|
|
|
let id = this.get('auth.activeCluster');
|
|
|
|
return id ? this.get('store').peekRecord('cluster', id) : null;
|
|
|
|
}),
|
|
|
|
activeClusterName: computed('activeCluster', function() {
|
|
|
|
const activeCluster = this.get('activeCluster');
|
|
|
|
return activeCluster ? activeCluster.get('name') : null;
|
|
|
|
}),
|
2018-07-05 18:28:12 +00:00
|
|
|
});
|