mirror of https://github.com/rancher/ui.git
27 lines
608 B
JavaScript
27 lines
608 B
JavaScript
import { hash } from 'rsvp';
|
|
import Route from '@ember/routing/route';
|
|
|
|
export default Route.extend({
|
|
model: function(params) {
|
|
|
|
return this.get('store').find('container', params.container_id).then((container) => {
|
|
|
|
return hash({
|
|
hosts: this.get('store').findAll('host'),
|
|
}).then((hash) => {
|
|
|
|
let out = {
|
|
container: container,
|
|
hosts: hash.hosts,
|
|
};
|
|
|
|
if (container.serviceId) {
|
|
out.service = this.get('store').getById('service', container.serviceId);
|
|
}
|
|
|
|
return out;
|
|
});
|
|
});
|
|
},
|
|
});
|