diff --git a/lib/global-admin/addon/machines/configure/controller.js b/lib/global-admin/addon/machines/configure/controller.js
new file mode 100644
index 000000000..aefafb7de
--- /dev/null
+++ b/lib/global-admin/addon/machines/configure/controller.js
@@ -0,0 +1,12 @@
+import Controller from '@ember/controller'
+
+export default Controller.extend({
+ actions: {
+ launch() {
+ this.transitionToRoute('machines.launch');
+ },
+ add() {
+ this.transitionToRoute('machines.configure');
+ },
+ }
+});
diff --git a/lib/global-admin/addon/machines/configure/route.js b/lib/global-admin/addon/machines/configure/route.js
new file mode 100644
index 000000000..195d8ff88
--- /dev/null
+++ b/lib/global-admin/addon/machines/configure/route.js
@@ -0,0 +1,23 @@
+import EmberObject from '@ember/object';
+import { inject as service } from '@ember/service';
+import Route from '@ember/routing/route';
+import { hash } from 'rsvp';
+
+export default Route.extend({
+ globalStore: service(),
+
+ model() {
+ let store = this.get('globalStore');
+ return hash({
+ hosts: store.findAll('machine'), // this should eventually be all host with out cluster id
+ hostTemplates: store.findAll('machinetemplate'),
+ machineDrivers: store.findAll('machinedriver'),
+ }).then((hash) => {
+ return EmberObject.create({
+ hosts: hash.hosts,
+ hostTemplates: hash.hostTemplates,
+ machineDrivers: hash.machineDrivers,
+ });
+ });
+ },
+});
diff --git a/lib/global-admin/addon/machines/configure/template.hbs b/lib/global-admin/addon/machines/configure/template.hbs
new file mode 100644
index 000000000..6a2621f4d
--- /dev/null
+++ b/lib/global-admin/addon/machines/configure/template.hbs
@@ -0,0 +1,7 @@
+
+ {{host-template-list
+ model=model.hostTemplates
+ launch=(action 'launch')
+ add=(action 'add')
+ }}
+
\ No newline at end of file
diff --git a/lib/global-admin/addon/machines/launch/controller.js b/lib/global-admin/addon/machines/launch/controller.js
new file mode 100644
index 000000000..23662093b
--- /dev/null
+++ b/lib/global-admin/addon/machines/launch/controller.js
@@ -0,0 +1,8 @@
+import Controller from '@ember/controller'
+
+export default Controller.extend({
+ actions: {
+ goBack() {},
+ launch() {},
+ }
+});
diff --git a/lib/global-admin/addon/machines/launch/route.js b/lib/global-admin/addon/machines/launch/route.js
new file mode 100644
index 000000000..d7d1db125
--- /dev/null
+++ b/lib/global-admin/addon/machines/launch/route.js
@@ -0,0 +1,23 @@
+import EmberObject from '@ember/object';
+import { inject as service } from '@ember/service';
+import Route from '@ember/routing/route';
+import { get } from '@ember/object';
+
+export default Route.extend({
+ globalStore: service(),
+
+ model(params) {
+ let store = this.get('globalStore');
+ // let drivers = get(this, 'model.machineDrivers');
+ // let selectedDriver = drivers.findBy('name', get(template, 'driver'));
+ return store.find('machinetemplate', get(params, 'template_id')).then(( template ) => {
+ return store.find('machinedriver', get(template, 'driver.id')).then( ( driver ) => {
+ debugger;
+ return EmberObject.create({
+ template: template,
+ driver: driver,
+ });
+ })
+ });
+ },
+});
diff --git a/lib/global-admin/addon/machines/launch/template.hbs b/lib/global-admin/addon/machines/launch/template.hbs
new file mode 100644
index 000000000..a7257e3d1
--- /dev/null
+++ b/lib/global-admin/addon/machines/launch/template.hbs
@@ -0,0 +1,8 @@
+
+ {{cloud-host-add-or-edit
+ hostTemplate=model.template
+ driver=model.driver
+ goBack=(action 'goBack')
+ save=(action 'launch')
+ }}
+
\ No newline at end of file
diff --git a/lib/global-admin/addon/machines/templates/controller.js b/lib/global-admin/addon/machines/templates/controller.js
new file mode 100644
index 000000000..d7431858a
--- /dev/null
+++ b/lib/global-admin/addon/machines/templates/controller.js
@@ -0,0 +1,13 @@
+import Controller from '@ember/controller'
+import { get } from '@ember/object';
+
+export default Controller.extend({
+ actions: {
+ launch(template) {
+ this.transitionToRoute('machines.launch', get(template, 'id'));
+ },
+ add() {
+ this.transitionToRoute('machines.configure');
+ },
+ }
+});
diff --git a/lib/global-admin/addon/machines/templates/route.js b/lib/global-admin/addon/machines/templates/route.js
new file mode 100644
index 000000000..195d8ff88
--- /dev/null
+++ b/lib/global-admin/addon/machines/templates/route.js
@@ -0,0 +1,23 @@
+import EmberObject from '@ember/object';
+import { inject as service } from '@ember/service';
+import Route from '@ember/routing/route';
+import { hash } from 'rsvp';
+
+export default Route.extend({
+ globalStore: service(),
+
+ model() {
+ let store = this.get('globalStore');
+ return hash({
+ hosts: store.findAll('machine'), // this should eventually be all host with out cluster id
+ hostTemplates: store.findAll('machinetemplate'),
+ machineDrivers: store.findAll('machinedriver'),
+ }).then((hash) => {
+ return EmberObject.create({
+ hosts: hash.hosts,
+ hostTemplates: hash.hostTemplates,
+ machineDrivers: hash.machineDrivers,
+ });
+ });
+ },
+});
diff --git a/lib/global-admin/addon/machines/templates/template.hbs b/lib/global-admin/addon/machines/templates/template.hbs
new file mode 100644
index 000000000..6a2621f4d
--- /dev/null
+++ b/lib/global-admin/addon/machines/templates/template.hbs
@@ -0,0 +1,7 @@
+
+ {{host-template-list
+ model=model.hostTemplates
+ launch=(action 'launch')
+ add=(action 'add')
+ }}
+
\ No newline at end of file
diff --git a/lib/global-admin/addon/routes.js b/lib/global-admin/addon/routes.js
index 3ad967097..aadc74a85 100644
--- a/lib/global-admin/addon/routes.js
+++ b/lib/global-admin/addon/routes.js
@@ -44,6 +44,8 @@ export default buildRoutes(function() {
this.route('machines', {path: '/nodes'}, function() {
this.route('index', {path: '/'});
this.route('templates');
+ this.route('launch', {path: '/launch/:template_id'});
+ this.route('configure');
});
this.route('catalog');
diff --git a/yarn.lock b/yarn.lock
index b47c4964a..afaaaff8b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2803,9 +2803,9 @@ elliptic@^6.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.0"
-ember-api-store@2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/ember-api-store/-/ember-api-store-2.4.0.tgz#91dd74729e34beea28b898d6c12a102aab80eade"
+ember-api-store@2.5.1:
+ version "2.5.1"
+ resolved "https://registry.yarnpkg.com/ember-api-store/-/ember-api-store-2.5.1.tgz#eb88f552e8025b6a950a2ee1b239776a1284ff88"
dependencies:
broccoli-file-creator "^1.1.1"
ember-cli-babel "^6.8.2"