mirror of https://github.com/rancher/ui.git
Use system flag on containers
This commit is contained in:
parent
b1d69c5b60
commit
fd6f9b3d13
|
|
@ -236,6 +236,7 @@ export default Ember.Component.extend(NewOrEdit, {
|
|||
Object.keys(map).forEach((key) => {
|
||||
let obj = map[key];
|
||||
if ( obj && obj.enabled ) {
|
||||
Ember.set(obj,'stack.externalId', C.EXTERNAL_ID.KIND_CATALOG + C.EXTERNAL_ID.KIND_SEPARATOR + obj.tplVersion.id);
|
||||
ary.push(obj.stack);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,11 +29,8 @@ export default Ember.Component.extend(ManageLabels, GroupedInstances, {
|
|||
filteredInstances: function() {
|
||||
let out = this.get('model.instances')||[];
|
||||
|
||||
if ( this.get('show') !== 'all' ) {
|
||||
out = out.filter((inst) => {
|
||||
let labels = inst.get('labels');
|
||||
return !labels || !labels[C.LABEL.SYSTEM_TYPE];
|
||||
});
|
||||
if ( this.get('show') === 'standard' ) {
|
||||
out = out.filterBy('isSystem', false);
|
||||
}
|
||||
|
||||
return out;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
import Resource from 'ember-api-store/models/resource';
|
||||
import C from 'ui/utils/constants';
|
||||
|
||||
export default Resource.extend();
|
||||
export default Resource.extend({
|
||||
isSystem: function() {
|
||||
if ( this.get('system') ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
let labels = this.get('labels');
|
||||
return labels && !!labels[C.LABEL.SYSTEM_TYPE];
|
||||
}.property('system','labels'),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue