mirror of https://github.com/rancher/ui.git
Handle old composeProjects (rancher/rancher#6836)
This commit is contained in:
parent
dcec3eefd4
commit
2f1b2091ca
|
|
@ -24,7 +24,7 @@ export default Ember.Controller.extend({
|
||||||
var out = false;
|
var out = false;
|
||||||
(this.get('model.stacks')||[]).forEach((stack) => {
|
(this.get('model.stacks')||[]).forEach((stack) => {
|
||||||
var info = stack.get('externalIdInfo');
|
var info = stack.get('externalIdInfo');
|
||||||
if ( C.EXTERNAL_ID.SYSTEM_KINDS.indexOf(info.kind) >= 0 )
|
if ( info && C.EXTERNAL_ID.SYSTEM_KINDS.indexOf(info.kind) >= 0 )
|
||||||
{
|
{
|
||||||
out = true;
|
out = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Stack from 'ui/models/stack';
|
||||||
|
|
||||||
|
export default Stack.extend({
|
||||||
|
type: 'composeProject',
|
||||||
|
grouping: 'swarm',
|
||||||
|
|
||||||
|
availableActions: function() {
|
||||||
|
var a = this.get('actionLinks');
|
||||||
|
|
||||||
|
var out = [
|
||||||
|
{ label : 'action.remove', icon : 'icon icon-trash', action : 'promptDelete', enabled : !!a.remove, altAction : 'delete'},
|
||||||
|
{ label : 'action.viewInApi', icon : 'icon icon-external-link', action : 'goToApi', enabled : true },
|
||||||
|
];
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}.property('actionLinks.{remove}'),
|
||||||
|
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue