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 @@
|