Use system flag on containers

This commit is contained in:
Vincent Fiduccia 2016-10-24 18:05:01 -07:00
parent b1d69c5b60
commit fd6f9b3d13
3 changed files with 14 additions and 6 deletions

View File

@ -236,6 +236,7 @@ export default Ember.Component.extend(NewOrEdit, {
Object.keys(map).forEach((key) => { Object.keys(map).forEach((key) => {
let obj = map[key]; let obj = map[key];
if ( obj && obj.enabled ) { 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); ary.push(obj.stack);
} }
}); });

View File

@ -29,11 +29,8 @@ export default Ember.Component.extend(ManageLabels, GroupedInstances, {
filteredInstances: function() { filteredInstances: function() {
let out = this.get('model.instances')||[]; let out = this.get('model.instances')||[];
if ( this.get('show') !== 'all' ) { if ( this.get('show') === 'standard' ) {
out = out.filter((inst) => { out = out.filterBy('isSystem', false);
let labels = inst.get('labels');
return !labels || !labels[C.LABEL.SYSTEM_TYPE];
});
} }
return out; return out;

View File

@ -1,3 +1,13 @@
import Resource from 'ember-api-store/models/resource'; 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'),
});