mirror of https://github.com/rancher/ui.git
19 lines
500 B
JavaScript
19 lines
500 B
JavaScript
import { get } from '@ember/object';
|
|
import Route from '@ember/routing/route';
|
|
|
|
export default Route.extend({
|
|
model: function (params) {
|
|
|
|
return get(this, 'store').find('pod', params.container_id).then((container) => {
|
|
let out = {
|
|
instance: get(container, 'containers.firstObject'),
|
|
container: container,
|
|
};
|
|
if (container.serviceId) {
|
|
out.service = get(this, 'store').getById('service', container.serviceId);
|
|
}
|
|
return out;
|
|
});
|
|
},
|
|
});
|