mirror of https://github.com/rancher/ui.git
Fix swarm with no hosts
This commit is contained in:
parent
1f8ebcb097
commit
d3e527a30c
|
|
@ -30,6 +30,10 @@ export default Ember.Component.extend(ThrottledResize, {
|
|||
}.property('columnWidth','columnFudge'),
|
||||
|
||||
onResize: function() {
|
||||
if ( this.isDestroyed || this.isDestroying ) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let elem = this.$();
|
||||
let sectionWidth = $('#application').width(); // On first call the pods aren't rendered yet, so approximate with the screen width
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default Ember.Route.extend({
|
|||
return Ember.RSVP.hash({
|
||||
instances: store.findAll('instance'),
|
||||
hosts: store.findAll('host'),
|
||||
}).then((hash) => {
|
||||
}).then(() => {
|
||||
return store.all('container');
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ export default Ember.Route.extend({
|
|||
|
||||
return Ember.RSVP.all([
|
||||
store.findAll('service'),
|
||||
store.findAll('container'),
|
||||
store.findAll('virtualmachine'),
|
||||
store.findAll('instance'),
|
||||
]).then(() => {
|
||||
return host;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@ export default Ember.Route.extend({
|
|||
instance: inst,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return Ember.RSVP.reject('Unable to find an active Swarm container');
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
<section class="header">
|
||||
<h1 style="display: block">{{t 'dockerCLI.header'}}</h1>
|
||||
</section>
|
||||
{{#if model.instance}}
|
||||
<section class="header">
|
||||
<h1 style="display: block">{{t 'dockerCLI.header'}}</h1>
|
||||
</section>
|
||||
|
||||
<section class="well">
|
||||
{{container-shell
|
||||
classNames="inline-block"
|
||||
command=model.command
|
||||
instance=model.instance
|
||||
cols=120
|
||||
rows=30
|
||||
showProtip=false
|
||||
}}
|
||||
</section>
|
||||
<section class="well">
|
||||
{{container-shell
|
||||
classNames="inline-block"
|
||||
command=model.command
|
||||
instance=model.instance
|
||||
cols=120
|
||||
rows=30
|
||||
showProtip=false
|
||||
}}
|
||||
</section>
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue