diff --git a/app/components/container-row/template.hbs b/app/components/container-row/template.hbs index 93de1bffd..926ac475f 100644 --- a/app/components/container-row/template.hbs +++ b/app/components/container-row/template.hbs @@ -18,7 +18,7 @@ {{/if}} {{model.displayImage}} - {{#if (eq showCommand "inline")~}} + {{#if (and (eq showCommand "inline") model.command)~}} ({{model.command}}) {{/if}} diff --git a/app/components/device-permissions/component.js b/app/components/device-permissions/component.js index 23cea1e63..311fa853e 100644 --- a/app/components/device-permissions/component.js +++ b/app/components/device-permissions/component.js @@ -1,35 +1,28 @@ import Ember from 'ember'; export default Ember.Component.extend({ - choices: [ - {value: 'r', label: 'read'}, - {value: 'w', label: 'write'}, - {value: 'm', label: 'mknod'} - ], + rSelected: false, + wSelected: false, + mSelected: false, selection: null, init: function() { this._super(); - if ( !this.get('selection') ) - { - var parts = this.get('selectionAsString').split(''); - var selection = this.get('choices').filter(function(choice) { - return parts.indexOf(choice.value) >= 0; - }); - this.set('selection', selection); - } - this.selectionDidChange(); + var sel = this.get('initialSelection'); + this.setProperties({ + rSelected: sel.indexOf('r') >= 0, + wSelected: sel.indexOf('w') >= 0, + mSelected: sel.indexOf('m') >= 0, + }); }, - selectionAsString: '', - selectionDidChange: function() { - var str = ''; - this.get('selection').forEach(function(choice) { - str += choice.value; - }); - this.set('selectionAsString', str); - }.observes('selection.[]'), + actions: { + selectChanged(x, ele) { + var str = $(ele.target).val().join(''); + this.sendAction('changed', str); + }, + }, didInsertElement: function() { var moreClass = this.get('buttonClass')||''; diff --git a/app/components/device-permissions/template.hbs b/app/components/device-permissions/template.hbs index ed9af6dc8..6fedef893 100644 --- a/app/components/device-permissions/template.hbs +++ b/app/components/device-permissions/template.hbs @@ -1 +1,5 @@ -{{view "select" class="form-control" content=view.choices selection=view.selection multiple="true" optionValuePath="content.value" optionLabelPath="content.label"}} + diff --git a/app/components/form-security/template.hbs b/app/components/form-security/template.hbs index 53e95031b..ddedf26f5 100644 --- a/app/components/form-security/template.hbs +++ b/app/components/form-security/template.hbs @@ -112,7 +112,7 @@   - {{device-permissions buttonClass="btn-sm" selectionAsString=device.permissions}} + {{device-permissions buttonClass="btn-sm" initialSelection=device.permissions changed=(action (mut device.permissions))}} diff --git a/app/hosts/new/amazonec2/template.hbs b/app/hosts/new/amazonec2/template.hbs index 3f1e3db3d..ea49d7234 100644 --- a/app/hosts/new/amazonec2/template.hbs +++ b/app/hosts/new/amazonec2/template.hbs @@ -214,12 +214,14 @@
{{input type="text" classNames="form-control" placeholder="An Ubuntu AMI" value=amazonec2Config.ami}} + {{#unless settings.isPrivateLabel}} +

+ RancherOS AMI List +

+ {{/unless}}
diff --git a/app/registries/new/controller.js b/app/registries/new/controller.js index 3619dd169..913202aea 100644 --- a/app/registries/new/controller.js +++ b/app/registries/new/controller.js @@ -16,7 +16,7 @@ export default Ember.Controller.extend(NewOrEdit, { }, cancel: function() { - this.transitionTo('registries'); + this.transitionToRoute('registries'); }, }, diff --git a/app/registries/new/route.js b/app/registries/new/route.js index 72c231ac3..fed8467a9 100644 --- a/app/registries/new/route.js +++ b/app/registries/new/route.js @@ -25,4 +25,11 @@ export default Ember.Route.extend({ controller.set('model',model); controller.send('selectDriver','dockerhub'); }, + + resetController: function (controller, isExiting/*, transition*/) { + if (isExiting) + { + controller.set('errors', null); + } + }, });