mirror of https://github.com/rancher/ui.git
Embedding; Hide system project notice when embedded
This commit is contained in:
parent
32e6b2a095
commit
cbb88bee09
|
|
@ -1,7 +1,7 @@
|
|||
import Controller from '@ember/controller';
|
||||
import { computed, observer } from '@ember/object';
|
||||
import { alias } from '@ember/object/computed';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { computed, observer } from '@ember/object';
|
||||
import Controller from '@ember/controller';
|
||||
import C from 'ui/utils/constants';
|
||||
|
||||
// const NONE = 'none';
|
||||
|
|
@ -19,12 +19,20 @@ export default Controller.extend({
|
|||
group: NAMESPACE,
|
||||
nodes: null,
|
||||
expandedInstances: null,
|
||||
notEmbedded: true,
|
||||
|
||||
namespaces: alias('scope.currentProject.namespaces'),
|
||||
|
||||
showSystemProjectWarning: computed.and('model.project.isSystemProject', 'notEmbedded'),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.set('nodes', this.get('store').all('node'));
|
||||
this.set('expandedInstances', []);
|
||||
|
||||
const notEmbedded = window.top === window;
|
||||
|
||||
this.set('notEmbedded', notEmbedded);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{#if model.project.isSystemProject}}
|
||||
{{#if showSystemProjectWarning}}
|
||||
{{#banner-message color='bg-warning m-0'}}
|
||||
<p>{{t 'clusterDashboard.systemProject' appName=settings.appName}}</p>
|
||||
{{/banner-message}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue