Fix instances/services denormalization overwrites

This commit is contained in:
Vincent Fiduccia 2016-10-26 11:11:53 -07:00
parent 9baa907b76
commit dc1e053032
5 changed files with 4 additions and 30 deletions

View File

@ -6,25 +6,12 @@ export default Ember.Route.extend({
var ports;
return Ember.RSVP.hash({
hosts: store.findAll('host'),
container: store.find('container', params.container_id),
}).then((hash) => {
return hash.container.followLink('ports').then(function(p) {
ports = p;
return hash.container;
});
}).then(function(container) {
var host = container.get('primaryHost');
if ( !host || !host.get || !host.hasLink('instances') )
{
return container;
}
else
{
return host.importLink('instances').then(() => {
return container;
});
}
}).then(function(container) {
return Ember.Object.create({
container: container,

View File

@ -4,7 +4,7 @@
{{format-html-message 'loginPage.greeting' appName=settings.appName}}
<div class="logo"></div>
</h1>
<section>
<section class="r-pb0">
{{language-dropdown login=true class='r-mt10 r-mb10'}}
<br/>
{{#if isGithub}}
@ -30,6 +30,7 @@
{{#if isShibboleth}}
{{login-shibboleth action="started" waiting=waiting}}
{{/if}}
<span style="color: white">{{access.provider}}</span>
</section>
</div>
</div>

View File

@ -189,5 +189,5 @@ export default Ember.Mixin.create({
externalIdChanged: function() {
Ember.run.once(this, 'updateStatus');
}.observes('model.externalId'),
}.observes('model.{externalId,state}'),
});

View File

@ -6,9 +6,7 @@ export default Ember.Route.extend({
var dependencies = [
store.findAll('host'),
store.find('stack', params.stackId).then(function(stack) {
return stack.importLink('services');
})
store.find('stack', params.stackId)
];
if ( params.serviceId )

View File

@ -5,18 +5,6 @@ export default Ember.Route.extend({
var store = this.get('store');
return store.find('virtualmachine', params.virtualmachine_id).then(function(vm) {
var host = vm.get('primaryHost');
if ( !host || host.get('instances') )
{
return vm;
}
else
{
return host.importLink('instances').then(() => {
return vm;
});
}
}).then(function(vm) {
return Ember.Object.create({
vm: vm,
});