diff --git a/app/components/cloud-host-add-or-edit/template.hbs b/app/components/cloud-host-add-or-edit/template.hbs index 68d50e51a..3ac9301ee 100644 --- a/app/components/cloud-host-add-or-edit/template.hbs +++ b/app/components/cloud-host-add-or-edit/template.hbs @@ -1 +1 @@ -{{partial (concat 'host/host-templates/' hostTemplate.driver)}} +{{partial 'host/host-templates/host-launch'}} diff --git a/app/components/machine/driver-digitalocean/template.hbs b/app/components/machine/driver-digitalocean/template.hbs index 995ccdb77..030727c34 100644 --- a/app/components/machine/driver-digitalocean/template.hbs +++ b/app/components/machine/driver-digitalocean/template.hbs @@ -1,20 +1,20 @@
+
+ {{t 'machine.driverDigitalocean.instanceSection'}} +
+ +
+ {{form-name-description + name=model.name + description=model.description + nameRequired=true + namePlaceholder="hostPartial.host.addCommon.new.form.name.placeholder" + descriptionShown=true + descriptionExpanded=true + }} +
{{#if step1}}
-
- {{t 'machine.driverDigitalocean.instanceSection'}} -
- -
- {{form-name-description - name=model.name - description=model.description - nameRequired=true - namePlaceholder="hostPartial.host.addCommon.new.form.name.placeholder" - descriptionShown=true - descriptionExpanded=true - }} -
{{t 'machine.driverDigitalocean.accountSection'}} diff --git a/app/hosts/templates/launch/controller.js b/app/hosts/templates/launch/controller.js index 3c48b75ca..7b9aaede8 100644 --- a/app/hosts/templates/launch/controller.js +++ b/app/hosts/templates/launch/controller.js @@ -3,12 +3,4 @@ import Ember from 'ember'; export default Ember.Controller.extend({ hostTemplate: Ember.computed.alias('model.template'), machineConfig: Ember.computed.alias('model.config'), - actions: { - save() { - debugger; - }, - cancel() { - this.transitionToRoute('hosts.templates.index'); - }, - } }); diff --git a/app/hosts/templates/launch/route.js b/app/hosts/templates/launch/route.js index 94f27080f..0b0758f88 100644 --- a/app/hosts/templates/launch/route.js +++ b/app/hosts/templates/launch/route.js @@ -20,5 +20,17 @@ export default Ember.Route.extend({ host: this.get('store').createRecord(tmp) } }); - } + }, + actions: { + cancel() { + this.transitionTo('hosts.templates.index'); + }, + goBack() { + if ( this.get('backTo') === 'waiting' ) { + this.transitionTo('authenticated.project.waiting'); + } else { + this.transitionTo('hosts'); + } + } + }, }); diff --git a/app/hosts/templates/launch/template.hbs b/app/hosts/templates/launch/template.hbs index 60493cdd7..01575eb85 100644 --- a/app/hosts/templates/launch/template.hbs +++ b/app/hosts/templates/launch/template.hbs @@ -1,5 +1,6 @@ {{cloud-host-add-or-edit host=model.host hostTemplate=model.template - cancel=(action 'cancel') + cancel=(route-action 'cancel') + goBack=(route-action 'goBack') }} diff --git a/app/templates/host/host-templates/amazonec2.hbs b/app/templates/host/host-templates/amazonec2.hbs index bba7fc0bd..732620b00 100644 --- a/app/templates/host/host-templates/amazonec2.hbs +++ b/app/templates/host/host-templates/amazonec2.hbs @@ -1,55 +1,14 @@ -
-
-
-
-

- {{t 'hostsPage.cloudHostsPage.addPage.header'}} -

-
-
-
- -
- -
-
-
- -
-
-
- - {{hostOptions.instanceType}} -
-
-
- - {{hostOptions.region}} -
-
-
- - {{hostOptions.rootSize}} -
-
-
-
- {{partial "host/add-common"}} -
-
-
- {{#advanced-section}} - {{form-user-labels initialLabels=clonedModel.labels setLabels=(action 'setLabels') expandAll=null}} - {{/advanced-section}} -
-
-
- {{top-errors errors=errors}} - {{save-cancel save="save" cancel="cancel" createLabel='hostsPage.cloudHostsPage.addPage.launch'}} -
- - -
+
+ + {{hostOptions.instanceType}} +
+
+
+ + {{hostOptions.region}} +
+
+
+ + {{hostOptions.rootSize}}
\ No newline at end of file diff --git a/app/templates/host/host-templates/azure.hbs b/app/templates/host/host-templates/azure.hbs new file mode 100644 index 000000000..64559d973 --- /dev/null +++ b/app/templates/host/host-templates/azure.hbs @@ -0,0 +1,14 @@ +
+ + {{hostOptions.location}} +
+
+
+ + {{hostOptions.environment}} +
+
+
+ + {{hostOptions.size}} +
\ No newline at end of file diff --git a/app/templates/host/host-templates/digitalocean.hbs b/app/templates/host/host-templates/digitalocean.hbs index 6dadaf0c1..5e29d962b 100644 --- a/app/templates/host/host-templates/digitalocean.hbs +++ b/app/templates/host/host-templates/digitalocean.hbs @@ -1,51 +1,9 @@ -{{log hostOptions}} -
-
-
-
-

- {{t 'hostsPage.cloudHostsPage.addPage.header'}} -

-
-
-
- -
-
-
-
-
- -
-
-
- - {{hostOptions.size}} -
-
-
- - {{hostOptions.region}} -
-
-
-
- {{partial "host/add-common"}} -
-
-
- {{#advanced-section}} - {{form-user-labels initialLabels=clonedModel.labels setLabels=(action 'setLabels') expandAll=null}} - {{/advanced-section}} -
-
-
- {{top-errors errors=errors}} - {{save-cancel save="save" cancel="cancel" createLabel='hostsPage.cloudHostsPage.addPage.launch'}} -
- -
-
+
+ + {{hostOptions.size}} +
+
+
+ + {{hostOptions.region}}
\ No newline at end of file diff --git a/app/templates/host/host-templates/host-launch.hbs b/app/templates/host/host-templates/host-launch.hbs new file mode 100644 index 000000000..03817c9a5 --- /dev/null +++ b/app/templates/host/host-templates/host-launch.hbs @@ -0,0 +1,42 @@ +
+
+
+
+

+ {{t 'hostsPage.cloudHostsPage.addPage.header'}} +

+
+
+
+ +
+
+
+
+
+ +
+
+ {{partial (concat 'host/host-templates/' hostTemplate.driver)}} +
+
+
+ {{partial "host/add-common"}} +
+
+
+ {{#advanced-section}} + {{form-user-labels initialLabels=clonedModel.labels setLabels=(action 'setLabels') expandAll=null}} + {{/advanced-section}} +
+
+
+ {{top-errors errors=errors}} + {{save-cancel save="save" cancel="cancel" createLabel='hostsPage.cloudHostsPage.addPage.launch'}} +
+ +
+
+
\ No newline at end of file diff --git a/app/templates/host/host-templates/packet.hbs b/app/templates/host/host-templates/packet.hbs new file mode 100644 index 000000000..85e6ffb91 --- /dev/null +++ b/app/templates/host/host-templates/packet.hbs @@ -0,0 +1,14 @@ +
+ + {{hostOptions.facilityCode}} +
+
+
+ + {{hostOptions.plan}} +
+
+
+ + {{hostOptions.os}} +
\ No newline at end of file diff --git a/translations/en-us.yaml b/translations/en-us.yaml index b53a53da9..38e6e4665 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -697,6 +697,9 @@ hostsPage: storage: 'Storage:' transfer: 'Transfer:' zone: 'Zone:' + env: 'Environment:' + size: 'Size:' + os: 'OS:' tabs: fav: Favorites browse: Browse