diff --git a/app/application/controller.js b/app/application/controller.js
index cfb974235..9412ab666 100644
--- a/app/application/controller.js
+++ b/app/application/controller.js
@@ -10,6 +10,7 @@ export default Ember.Controller.extend({
tooltipService : Ember.inject.service('tooltip'),
tooltip : Ember.computed.alias('tooltipService.tooltipOpts.type'),
+ tooltipTemplate : Ember.computed.alias('tooltipService.tooltipOpts.template'),
error : null,
error_description : null,
diff --git a/app/application/template.hbs b/app/application/template.hbs
index ffcf357b1..9143f6d8c 100644
--- a/app/application/template.hbs
+++ b/app/application/template.hbs
@@ -53,4 +53,4 @@
-{{component tooltip class="container-tooltip" id="tooltip-base" role="tooltip" aria-hidden="false"}}
+{{component tooltip tooltipTemplate=tooltipTemplate class="container-tooltip" id="tooltip-base" role="tooltip" aria-hidden="false"}}
diff --git a/app/authenticated/dummy-dev/controller.js b/app/authenticated/dummy-dev/controller.js
new file mode 100644
index 000000000..55ff9aa58
--- /dev/null
+++ b/app/authenticated/dummy-dev/controller.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Controller.extend({
+});
diff --git a/app/authenticated/dummy-dev/route.js b/app/authenticated/dummy-dev/route.js
new file mode 100644
index 000000000..c24ce3529
--- /dev/null
+++ b/app/authenticated/dummy-dev/route.js
@@ -0,0 +1,7 @@
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+ model: function() {
+ return [ ];
+ },
+});
diff --git a/app/authenticated/dummy-dev/template.hbs b/app/authenticated/dummy-dev/template.hbs
new file mode 100644
index 000000000..3b64196ab
--- /dev/null
+++ b/app/authenticated/dummy-dev/template.hbs
@@ -0,0 +1,4 @@
+
diff --git a/app/authenticated/route.js b/app/authenticated/route.js
index 5a4737a17..7cc4f33df 100644
--- a/app/authenticated/route.js
+++ b/app/authenticated/route.js
@@ -42,6 +42,8 @@ export default Ember.Route.extend(Subscribe, {
let isAdmin = (type === C.USER.TYPE_ADMIN) || !this.get('access.enabled');
this.set('access.admin', isAdmin);
+ var store = this.get('store');
+
return Ember.RSVP.hash({
schemas: this.loadUserSchemas(),
projects: this.loadProjects(),
@@ -54,6 +56,10 @@ export default Ember.Route.extend(Subscribe, {
projectId = transition.params['authenticated.project'].project_id;
}
+ if (this.get(`prefs.${C.PREFS.I_HATE_SPINNERS}`)) {
+ Ember.$('BODY').addClass('i-hate-spinners');
+ }
+
// Make sure a valid project is selected
return this.get('projects').selectDefault(projectId).then((project) => {
// Load stuff that is needed to draw the header
@@ -62,10 +68,12 @@ export default Ember.Route.extend(Subscribe, {
return Ember.RSVP.hash({
language: this.get('language').setLanguage(),
orchestrationState: this.get('projects').updateOrchestrationState(),
- hosts: this.get('store').findAllUnremoved('host'),
- machines: this.get('store').findAllUnremoved('machine'),
- stacks: this.get('store').findAllUnremoved('environment'),
- mounts: this.get('store').findAllUnremoved('mount'), // the container model needs access
+ hosts: store.findAllUnremoved('host'),
+ machines: store.findAllUnremoved('machine'),
+ stacks: store.findAllUnremoved('environment'),
+ mounts: store.findAllUnremoved('mount'), // the container model needs access
+ volumes: store.findAllUnremoved('volume'),
+ snapshots: store.findAllUnremoved('snapshot'),
}).then((moreHash) => {
Ember.merge(hash, moreHash);
diff --git a/app/components/device-permissions/component.js b/app/components/device-permissions/component.js
index 0caff01c1..d2fa30e71 100644
--- a/app/components/device-permissions/component.js
+++ b/app/components/device-permissions/component.js
@@ -1,17 +1,20 @@
import Ember from 'ember';
+const { computed, get/*, set*/ } = Ember;
+
export default Ember.Component.extend({
- intl: Ember.inject.service(),
+ intl: Ember.inject.service(),
- rSelected: false,
- wSelected: false,
- mSelected: false,
+ rSelected: false,
+ wSelected: false,
+ mSelected: false,
+ editing: false,
- selection: null,
+ selection: null,
init: function() {
this._super();
- var sel = this.get('initialSelection');
+ var sel = get(this, 'initialSelection');
this.setProperties({
rSelected: sel.indexOf('r') >= 0,
wSelected: sel.indexOf('w') >= 0,
@@ -27,28 +30,56 @@ export default Ember.Component.extend({
},
didInsertElement: function() {
- var moreClass = this.get('buttonClass')||'';
- var opts = {
- buttonClass: 'btn btn-default' + (moreClass ? ' '+moreClass : ''),
- numberDisplayed: 2,
- nonSelectedText: this.get('intl').t('devicePermissions.none'),
- allSelectedText: this.get('intl').t('devicePermissions.all'),
+ if (get(this, 'editing')) {
+ var moreClass = get(this, 'buttonClass')||'';
+ var opts = {
+ buttonClass: 'btn btn-default' + (moreClass ? ' '+moreClass : ''),
+ numberDisplayed: 2,
+ nonSelectedText: get(this, 'intl').t('devicePermissions.none'),
+ allSelectedText: get(this, 'intl').t('devicePermissions.all'),
- templates: {
- li: '
',
- },
- };
+ templates: {
+ li: ' ',
+ },
+ };
- this.$('SELECT').multiselect(opts);
+ this.$('SELECT').multiselect(opts);
+ }
},
+ humanReadableList: computed('initialSelection', function() {
+ let permissions = get(this, 'initialSelection').split('');
+ let out = [];
+
+ permissions.forEach((perm) => {
+ switch (perm) {
+ case 'r':
+ out.push(get(this, 'intl').tHtml('devicePermissions.read'));
+ break;
+ case 'w':
+ out.push(get(this, 'intl').tHtml('devicePermissions.write'));
+ break;
+ case 'm':
+ out.push(get(this, 'intl').tHtml('devicePermissions.mknod'));
+ break;
+ default:
+ break;
+ }
+ });
+
+ return out.join('/');
+
+ }),
+
rebuild: function() {
Ember.run.next(() => {
- this.$('SELECT').multiselect('setOptions', {
- nonSelectedText: this.get('intl').t('devicePermissions.none'),
- allSelectedText: this.get('intl').t('devicePermissions.all'),
- });
- this.$('SELECT').multiselect('rebuild');
+ if (get(this, 'editing')) {
+ this.$('SELECT').multiselect('setOptions', {
+ nonSelectedText: get(this, 'intl').t('devicePermissions.none'),
+ allSelectedText: get(this, 'intl').t('devicePermissions.all'),
+ });
+ this.$('SELECT').multiselect('rebuild');
+ }
});
}.observes('intl._locale'),
});
diff --git a/app/components/device-permissions/template.hbs b/app/components/device-permissions/template.hbs
index f81a7d377..84393a67e 100644
--- a/app/components/device-permissions/template.hbs
+++ b/app/components/device-permissions/template.hbs
@@ -1,5 +1,9 @@
-
- {{t 'devicePermissions.read'}}
- {{t 'devicePermissions.write'}}
- {{t 'devicePermissions.mknod'}}
-
+{{#if editing}}
+
+ {{t 'devicePermissions.read'}}
+ {{t 'devicePermissions.write'}}
+ {{t 'devicePermissions.mknod'}}
+
+{{else}}
+ {{humanReadableList}}
+{{/if}}
diff --git a/app/components/form-command/component.js b/app/components/form-command/component.js
index 54ebc2bd3..3bc95204f 100644
--- a/app/components/form-command/component.js
+++ b/app/components/form-command/component.js
@@ -7,8 +7,10 @@ export default Ember.Component.extend(ManageLabels, {
instance: null,
errors: null,
isService: null,
+ editing: true,
tagName: '',
+ intl: Ember.inject.service(),
init() {
this._super(...arguments);
@@ -30,25 +32,32 @@ export default Ember.Component.extend(ManageLabels, {
var instance = this.get('instance');
var tty = instance.get('tty');
var stdin = instance.get('stdinOpen');
- var out = 'both';
+ var out = {
+ type: 'both',
+ name: this.get('intl').tHtml('formCommand.console.both'),
+ };
if ( tty !== undefined || stdin !== undefined )
{
if ( tty && stdin )
{
- out = 'both';
+ out.type = 'both';
+ out.name = this.get('intl').tHtml('formCommand.console.both');
}
else if ( tty )
{
- out = 'terminal';
+ out.type = 'terminal';
+ out.name = this.get('intl').tHtml('formCommand.console.terminal');
}
else if ( stdin )
{
- out = 'interactive';
+ out.type = 'interactive';
+ out.name = this.get('intl').tHtml('formCommand.console.interactive');
}
else
{
- out = 'none';
+ out.type = 'none';
+ out.name = this.get('intl').tHtml('formCommand.console.none');
}
}
@@ -59,7 +68,7 @@ export default Ember.Component.extend(ManageLabels, {
terminalDidChange: function() {
var val = this.get('terminal');
var stdinOpen = ( val === 'interactive' || val === 'both' );
- var tty = (val === 'terminal' || val === 'both');
+ var tty = (val.type === 'terminal' || val.type === 'both');
this.set('instance.tty', tty);
this.set('instance.stdinOpen', stdinOpen);
}.observes('terminal'),
diff --git a/app/components/form-command/template.hbs b/app/components/form-command/template.hbs
index f01238492..829fd9bff 100644
--- a/app/components/form-command/template.hbs
+++ b/app/components/form-command/template.hbs
@@ -4,7 +4,9 @@
- {{input-command class="form-control" type="text" changed=(action (mut instance.command)) initialValue=instance.command placeholder=(t 'formCommand.command.placeholder')}}
+ {{#input-or-display editable=editing value=instance.command}}
+ {{input-command class="form-control" type="text" changed=(action (mut instance.command)) initialValue=instance.command placeholder=(t 'formCommand.command.placeholder')}}
+ {{/input-or-display}}
@@ -12,7 +14,9 @@
{{t 'formCommand.entryPoint.label'}}
- {{input-command class="form-control" type="text" changed=(action (mut instance.entryPoint)) initialValue=instance.entryPoint placeholder=(t 'formCommand.entryPoint.placeholder')}}
+ {{#input-or-display editable=editing value=instance.entryPoint}}
+ {{input-command class="form-control" type="text" changed=(action (mut instance.entryPoint)) initialValue=instance.entryPoint placeholder=(t 'formCommand.entryPoint.placeholder')}}
+ {{/input-or-display}}
@@ -20,13 +24,17 @@
{{t 'formCommand.workingDir.label'}}
- {{input type="text" value=instance.workingDir classNames="form-control" placeholder=(t 'formCommand.workingDir.placeholder')}}
+ {{#input-or-display editable=editing value=instance.workingDir}}
+ {{input type="text" value=instance.workingDir classNames="form-control" placeholder=(t 'formCommand.workingDir.placeholder')}}
+ {{/input-or-display}}
{{t 'formCommand.user.label'}}
- {{input type="text" value=instance.user classNames="form-control" placeholder=(t 'formCommand.user.placeholder')}}
+ {{#input-or-display editable=editing value=instance.user}}
+ {{input type="text" value=instance.user classNames="form-control" placeholder=(t 'formCommand.user.placeholder')}}
+ {{/input-or-display}}
@@ -35,29 +43,33 @@
{{t 'formCommand.console.label'}}
-
-
-
{{radio-button selection=terminal value="both"}} {{format-html-message 'formCommand.console.both'}}
+ {{#input-or-display editable=editing value=terminal.name}}
+
+
+ {{radio-button selection=terminal.type value="both"}} {{format-html-message 'formCommand.console.both'}}
+
-
-
-
-
{{radio-button selection=terminal value="interactive"}} {{format-html-message 'formCommand.console.interactive'}}
+
+
+ {{radio-button selection=terminal.type value="interactive"}} {{format-html-message 'formCommand.console.interactive'}}
+
-
+ {{/input-or-display}}
@@ -31,37 +41,39 @@
{{t 'formHealthCheck.request.label'}}*
-
+ {{/input-or-display}}
{{#if showUriHost}}
@@ -70,7 +82,9 @@
{{t 'formHealthCheck.host.label'}}
- {{input type="text" classNames="form-control" placeholder=(t 'formHealthCheck.host.placeholder') value=uriHost}}
+ {{#input-or-display editable=editing value=uriHost}}
+ {{input type="number" min="1" max="65535" classNames="form-control" placeholder=(t 'formHealthCheck.port.placeholder') value=healthCheck.port}}
+ {{/input-or-display}}
{{/if}}
@@ -82,19 +96,23 @@
{{t 'formHealthCheck.initializingTimeout.label'}}
-
- {{input type="number" step=100 classNames="form-control" value=healthCheck.initializingTimeout}}
- {{t 'formHealthCheck.initializingTimeout.unit'}}
-
+ {{#input-or-display editable=editing value=healthCheck.initializingTimeout}}
+
+ {{input type="number" step=100 classNames="form-control" value=healthCheck.initializingTimeout}}
+ {{t 'formHealthCheck.initializingTimeout.unit'}}
+
+ {{/input-or-display}}
{{t 'formHealthCheck.reinitializingTimeout.label'}}
-
- {{input type="number" step=100 classNames="form-control" value=healthCheck.reinitializingTimeout}}
- {{t 'formHealthCheck.reinitializingTimeout.unit'}}
-
+ {{#input-or-display editable=editing value=healthCheck.reinitializingTimeout}}
+
+ {{input type="number" step=100 classNames="form-control" value=healthCheck.reinitializingTimeout}}
+ {{t 'formHealthCheck.reinitializingTimeout.unit'}}
+
+ {{/input-or-display}}
@@ -104,19 +122,23 @@
{{t 'formHealthCheck.interval.label'}}
-
- {{input type="number" min=1 step=1000 classNames="form-control" value=healthCheck.interval}}
- {{t 'formHealthCheck.interval.unit'}}
-
+ {{#input-or-display editable=editing value=healthCheck.interval}}
+
+ {{input type="number" min=1 step=1000 classNames="form-control" value=healthCheck.interval}}
+ {{t 'formHealthCheck.interval.unit'}}
+
+ {{/input-or-display}}
{{t 'formHealthCheck.timeout.label'}}
-
- {{input type="number" min=1 step=100 classNames="form-control" value=healthCheck.responseTimeout}}
- {{t 'formHealthCheck.timeout.unit'}}
-
+ {{#input-or-display editable=editing value=healthCheck.responseTimeout}}
+
+ {{input type="number" min=1 step=100 classNames="form-control" value=healthCheck.responseTimeout}}
+ {{t 'formHealthCheck.timeout.unit'}}
+
+ {{/input-or-display}}
@@ -125,19 +147,23 @@
{{t 'formHealthCheck.healthyThreshold.label'}}
-
- {{input type="number" min=1 step=1 classNames="form-control" value=healthCheck.healthyThreshold}}
- {{t 'formHealthCheck.healthyThreshold.unit'}}
-
+ {{#input-or-display editable=editing value=healthCheck.healthyThreshold}}
+
+ {{input type="number" min=1 step=1 classNames="form-control" value=healthCheck.healthyThreshold}}
+ {{t 'formHealthCheck.healthyThreshold.unit'}}
+
+ {{/input-or-display}}
{{t 'formHealthCheck.unhealthyThreshold.label'}}
-
- {{input type="number" min=1 step=1 classNames="form-control" value=healthCheck.unhealthyThreshold}}
- {{t 'formHealthCheck.unhealthyThreshold.unit'}}
-
+ {{#input-or-display editable=editing value=healthCheck.unhealthyThreshold}}
+
+ {{input type="number" min=1 step=1 classNames="form-control" value=healthCheck.unhealthyThreshold}}
+ {{t 'formHealthCheck.unhealthyThreshold.unit'}}
+
+ {{/input-or-display}}
@@ -147,6 +173,7 @@
{{t 'formHealthCheck.strategy.label'}}
+ {{#input-or-display editable=editing value=strategy}}
{{radio-button selection=strategy value="none"}} {{t 'formHealthCheck.strategy.none'}}
@@ -163,6 +190,7 @@
+ {{/input-or-display}}
{{/if}}
diff --git a/app/components/form-key-value/component.js b/app/components/form-key-value/component.js
index acf2db498..5e73a4589 100644
--- a/app/components/form-key-value/component.js
+++ b/app/components/form-key-value/component.js
@@ -58,18 +58,18 @@ function removeEmptyEntries(ary, allowEmptyValue=false) {
export default Ember.Component.extend({
// Inputs
- initialStr : null,
- initialMap : null,
- addActionLabel : 'formKeyValue.addAction',
- keyLabel : 'formKeyValue.key.label',
- valueLabel : 'formKeyValue.value.label',
- keyPlaceholder : 'formKeyValue.key.placeholder',
- valuePlaceholder : 'formKeyValue.value.placeholder',
- allowEmptyValue : false,
- addInitialEmptyRow : false,
- allowMultilineValue : true,
-
- ary : null,
+ initialStr: null,
+ initialMap: null,
+ addActionLabel: 'formKeyValue.addAction',
+ keyLabel: 'formKeyValue.key.label',
+ valueLabel: 'formKeyValue.value.label',
+ keyPlaceholder: 'formKeyValue.key.placeholder',
+ valuePlaceholder: 'formKeyValue.value.placeholder',
+ allowEmptyValue: false,
+ addInitialEmptyRow: false,
+ allowMultilineValue: true,
+ editing: true,
+ ary: null,
actions: {
add() {
diff --git a/app/components/form-key-value/template.hbs b/app/components/form-key-value/template.hbs
index 9ced76d82..b92fd109e 100644
--- a/app/components/form-key-value/template.hbs
+++ b/app/components/form-key-value/template.hbs
@@ -1,4 +1,6 @@
- {{t addActionLabel}}
+{{#if editing}}
+ {{t addActionLabel}}
+{{/if}}
{{#if ary.length}}
@@ -11,28 +13,46 @@
{{#each ary as |row|}}
- {{input-paste pasted="pastedLabels" class="form-control input-sm key" type="text" value=row.key placeholder=keyPlaceholder}}
+ {{#if editing}}
+ {{input-paste pasted="pastedLabels" class="form-control input-sm key" type="text" value=row.key placeholder=keyPlaceholder}}
+ {{else}}
+ {{row.key}}
+ {{/if}}
- {{t 'formKeyValue.separator'}}
+ {{#if editing}}
+ {{t 'formKeyValue.separator'}}
+ {{/if}}
- {{#if allowMultilineValue}}
- {{textarea-autogrow class="form-control input-sm value" value=row.value placeholder=valuePlaceholder}}
+ {{#if editing}}
+ {{#if allowMultilineValue}}
+ {{textarea-autogrow class="form-control input-sm value" value=row.value placeholder=valuePlaceholder}}
+ {{else}}
+ {{input class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}}
+ {{/if}}
{{else}}
- {{input class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}}
+ {{row.value}}
{{/if}}
- {{t 'generic.remove'}}
+ {{#if editing}}
+ {{t 'generic.remove'}}
+ {{/if}}
{{/each}}
-
- {{t 'formKeyValue.protip'}}
-
+ {{#if editing}}
+
+ {{t 'formKeyValue.protip'}}
+
+ {{/if}}
+{{else}}
+ {{#unless editing}}
+ {{t 'generic.none'}}
+ {{/unless}}
{{/if}}
diff --git a/app/components/form-networking/component.js b/app/components/form-networking/component.js
index a70ad74c1..d53756ad2 100644
--- a/app/components/form-networking/component.js
+++ b/app/components/form-networking/component.js
@@ -14,6 +14,7 @@ export default Ember.Component.extend(ManageLabels, ContainerChoices,{
initialLabels : null,
tagName : '',
+ editing: true,
init() {
this._super(...arguments);
diff --git a/app/components/form-networking/template.hbs b/app/components/form-networking/template.hbs
index 408089434..e6a73451f 100644
--- a/app/components/form-networking/template.hbs
+++ b/app/components/form-networking/template.hbs
@@ -4,12 +4,14 @@
- {{new-select
- classNames="form-control"
- content=networkChoices
- localizedLabel=true
- value=instance.networkMode
- }}
+ {{#input-or-display editable=editing value=instance.networkMode}}
+ {{new-select
+ classNames="form-control"
+ content=networkChoices
+ localizedLabel=true
+ value=instance.networkMode
+ }}
+ {{/input-or-display}}
{{#if isContainerNetwork}}
@@ -17,14 +19,16 @@
{{t 'formNetwork.container.label'}}
- {{new-select
- classNames="form-control"
- content=containersOnRequestedHost
- optionLabelPath="name"
- optionValuePath="id"
- optionGroupPath="group"
- value=instance.networkContainerId
- }}
+ {{#input-or-display editable=editing value=instance.networkContainerId}}
+ {{new-select
+ classNames="form-control"
+ content=containersOnRequestedHost
+ optionLabelPath="name"
+ optionValuePath="id"
+ optionGroupPath="group"
+ value=instance.networkContainerId
+ }}
+ {{/input-or-display}}
{{/if}}
@@ -36,8 +40,10 @@
- {{input type="text" value=requestedIp classNames="form-control" placeholder=(t 'formNetwork.requestedIp.placeholder')}}
-
{{t 'formNetwork.requestedIp.help'}}
+ {{#input-or-display editable=editing value=requestedIp}}
+ {{input type="text" value=requestedIp classNames="form-control" placeholder=(t 'formNetwork.requestedIp.placeholder')}}
+
{{t 'formNetwork.requestedIp.help'}}
+ {{/input-or-display}}
{{#if isService}}
@@ -47,7 +53,9 @@
- {{input type="checkbox" checked=service.retainIp}} {{t 'formNetwork.retainIp.reuse'}}
+ {{#input-or-display editable=editing value=service.retainIp}}
+ {{input type="checkbox" checked=service.retainIp}} {{t 'formNetwork.retainIp.reuse'}}
+ {{/input-or-display}}
{{/if}}
@@ -59,14 +67,46 @@
- {{input type="checkbox" checked=dnsDiscovery}} {{t 'formNetwork.dns.enable' appName=settings.appName}}
+ {{#input-or-display editable=editing value=dnsDiscovery}}
+ {{input type="checkbox" checked=dnsDiscovery}} {{t 'formNetwork.dns.enable' appName=settings.appName}}
+ {{/input-or-display}}
{{/if}}
{{/if}}
{{#unless isService}}
- {{form-container-links initialLinks=instance.instanceLinks instance=instance allHosts=allHosts}}
+ {{#if editing}}
+ {{form-container-links initialLinks=instance.instanceLinks instance=instance allHosts=allHosts}}
+ {{else}}
+
+ {{/if}}
{{/unless}}
@@ -98,7 +142,9 @@
- {{input type="text" value=instance.domainName classNames="form-control" placeholder=(t 'formNetwork.domainName.placeholder')}}
+ {{#input-or-display editable=editing value=instance.domainName}}
+ {{input type="text" value=instance.domainName classNames="form-control" placeholder=(t 'formNetwork.domainName.placeholder')}}
+ {{/input-or-display}}
@@ -108,22 +154,41 @@
-
-
-
- {{#if dnsResolverArray.length}}
-
- {{#each dnsResolverArray as |dns|}}
-
-
- {{input type="text" value=dns.value classNames="form-control dns-value input-sm" placeholder=(t 'formNetwork.resolvingServers.placeholder')}}
-
-
-
-
-
- {{/each}}
-
+ {{#if editing}}
+
+
+
+ {{#if dnsResolverArray.length}}
+
+ {{#each dnsResolverArray as |dns|}}
+
+
+ {{input type="text" value=dns.value classNames="form-control dns-value input-sm" placeholder=(t 'formNetwork.resolvingServers.placeholder')}}
+
+
+
+
+
+ {{/each}}
+
+ {{/if}}
+ {{else}}
+ {{#if dnsResolverArray.length}}
+
+ {{#each dnsResolverArray as |dns|}}
+
+
+ {{dns.value}}
+
+
+
+
+
+ {{/each}}
+
+ {{else}}
+
{{t 'generic.none'}}
+ {{/if}}
{{/if}}
@@ -134,22 +199,41 @@
-
-
-
- {{#if dnsSearchArray.length}}
-
- {{#each dnsSearchArray as |dnsSearch|}}
-
-
- {{input type="text" value=dnsSearch.value classNames="form-control dns-search-value input-sm" placeholder=(t 'formNetwork.searchDomains.placeholder')}}
-
-
-
-
-
- {{/each}}
-
+ {{#if editing}}
+
+
+
+ {{#if dnsSearchArray.length}}
+
+ {{#each dnsSearchArray as |dnsSearch|}}
+
+
+ {{input type="text" value=dnsSearch.value classNames="form-control dns-search-value input-sm" placeholder=(t 'formNetwork.searchDomains.placeholder')}}
+
+
+
+
+
+ {{/each}}
+
+ {{/if}}
+ {{else}}
+ {{#if dnsSearchArray.length}}
+
+ {{#each dnsSearchArray as |dnsSearch|}}
+
+
+ {{dnsSearch.value}}
+
+
+
+
+
+ {{/each}}
+
+ {{else}}
+
{{t 'generic.none'}}
+ {{/if}}
{{/if}}
diff --git a/app/components/form-scheduling/component.js b/app/components/form-scheduling/component.js
index cff8bb28b..11384d59a 100644
--- a/app/components/form-scheduling/component.js
+++ b/app/components/form-scheduling/component.js
@@ -105,6 +105,10 @@ export default Ember.Component.extend(ManageLabels, {
this.sendAction('setRequestedHost', hostId);
}.observes('requestedHostId'),
+ selectedChoice: Ember.computed('allHosts.@each.{id,name,state}', function() {
+ return this.get('hostChoices').findBy('id', this.get('initialHostId'));
+ }),
+
hostChoices: function() {
var list = this.get('allHosts').map((host) => {
var hostLabel = host.get('displayName');
diff --git a/app/components/form-scheduling/template.hbs b/app/components/form-scheduling/template.hbs
index 9877d8e16..f37f003f7 100644
--- a/app/components/form-scheduling/template.hbs
+++ b/app/components/form-scheduling/template.hbs
@@ -1,47 +1,65 @@