diff --git a/app/components/input-github/component.js b/app/components/input-github/component.js index 2dedca616..9393df0a1 100644 --- a/app/components/input-github/component.js +++ b/app/components/input-github/component.js @@ -20,7 +20,7 @@ export default Ember.Component.extend({ this.set('addInput',''); this.send('addObject', info); }).catch(() => { - this.sendAction('onError','User or or organizatio not found: ' + input); + this.sendAction('onError','User or organization not found: ' + input); }).finally(() => { this.set('checking', false); }); diff --git a/app/container/controller.js b/app/container/controller.js index 234bf0aa4..47e6e4e4f 100644 --- a/app/container/controller.js +++ b/app/container/controller.js @@ -2,6 +2,10 @@ import Ember from 'ember'; import Cattle from 'ui/utils/cattle'; var ContainerController = Cattle.TransitioningResourceController.extend({ + mountError: null, + relatedVolumes: null, + ports: null, + actions: { restart: function() { return this.doAction('restart'); diff --git a/app/container/edit/route.js b/app/container/edit/route.js index 7847d9a74..ec3efc6a5 100644 --- a/app/container/edit/route.js +++ b/app/container/edit/route.js @@ -9,7 +9,8 @@ export default OverlayRoute.extend({ }, model: function() { - var model = this.modelFor('container'); + var data = this.modelFor('container'); + var model = data.get('container'); return Ember.RSVP.all([ model.followLink('ports'), model.followLink('instanceLinks'), diff --git a/app/container/route.js b/app/container/route.js index 45700ac25..8a5731d5a 100644 --- a/app/container/route.js +++ b/app/container/route.js @@ -3,8 +3,14 @@ import Ember from 'ember'; export default Ember.Route.extend({ model: function(params) { var store = this.get('store'); + var ports; return store.find('container', params.container_id).then(function(container) { + return container.followLink('ports').then(function(p) { + ports = p; + return container; + }); + }).then(function(container) { var opt = { include: ['volume'], filter: {instanceId: container.get('id')} @@ -60,18 +66,32 @@ export default Ember.Route.extend({ return volumes; }); }).then(function(volumesWithInstances) { - container.set('relatedVolumes', volumesWithInstances); - return container; + return Ember.Object.create({ + container: container, + relatedVolumes: volumesWithInstances, + ports: ports, + }); }).catch(function(err) { - container.set('mountError',err); - container.set('mounts',[]); - container.set('relatedVolumes',[]); - return container; + return Ember.Object.create({ + container: container, + mountError: err, + relatedVolumes: [], + ports: [], + }); }); }); }, + setupController: function(controller, data) { + this._super(controller, data.get('container')); + controller.setProperties({ + mountError: data.get('mountError'), + relatedVolumes: data.get('relatedVolumes'), + ports: data.get('ports'), + }); + }, + activate: function() { - this.send('setPageLayout', {label: 'Container', backPrevious: true}); + this.send('setPageLayout', {label: 'Container', backPrevious: true, hasAside: 'nav-containers active'}); }, }); diff --git a/app/container/template.hbs b/app/container/template.hbs index 03d8f343b..ffbd5177c 100644 --- a/app/container/template.hbs +++ b/app/container/template.hbs @@ -1,36 +1,98 @@ -{{partial "transitioning-progress"}} +
-
-
-

{{displayName}}

-
- {{displayIp}} {{zero-clipboard text=displayIp}} -
-
{{imageUuid}} {{zero-clipboard text=imageUuid}}
-
-
-

- {{displayState}} -

-
- {{transitioningMessage}} -
-
- {{resource-actions model=this choices=availableActions}} -
-
-
+
{{imageUuid}} {{zero-clipboard text=imageUuid}}
-{{#if description}} -
-
- - {{description}} -
-
-{{/if}} +
+ {{partial "stats-cpu-memory"}} +
+ +
+
+ + + + + + + + + + + + + {{#each port in ports itemController="port"}} + + + + + + + + {{else}} + + + + {{/each}} + +
StateIP AddressPublic (on Host)Private (in Container)Protocol
+ + {{port.displayState}} + + + {{port.displayPublicIp}} + + {{port.publicPort}} + + {{port.privatePort}} + + {{upper-case port.protocol}} +
+
This container has no ports.
+
+
+
@@ -93,7 +155,3 @@
- -
- {{partial "stats-cpu-memory"}} -
diff --git a/app/host/template.hbs b/app/host/template.hbs index 591dd540c..71f434abb 100644 --- a/app/host/template.hbs +++ b/app/host/template.hbs @@ -1,7 +1,7 @@