ui: Only try and load sessions and coordinates if the node exists (#8305)
This commit is contained in:
parent
4b458955c2
commit
cda90556e5
|
@ -12,8 +12,12 @@ export default Route.extend({
|
||||||
const name = params.name;
|
const name = params.name;
|
||||||
return hash({
|
return hash({
|
||||||
item: this.repo.findBySlug(name, dc, nspace),
|
item: this.repo.findBySlug(name, dc, nspace),
|
||||||
sessions: this.sessionRepo.findByNode(name, dc, nspace),
|
}).then(model => {
|
||||||
tomography: this.coordinateRepo.findAllByNode(name, dc),
|
return hash({
|
||||||
|
...model,
|
||||||
|
sessions: this.sessionRepo.findByNode(name, dc, nspace),
|
||||||
|
tomography: this.coordinateRepo.findAllByNode(name, dc),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setupController: function(controller, model) {
|
setupController: function(controller, model) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{{title item.Node}}
|
{{title item.Node}}
|
||||||
<EventSource @src={{item}} @onerror={{action "error"}} />
|
<EventSource @src={{item}} @onerror={{action "error"}} />
|
||||||
|
<EventSource @src={{sessions}} />
|
||||||
|
<EventSource @src={{tomography}} />
|
||||||
<AppView @class="node show">
|
<AppView @class="node show">
|
||||||
<BlockSlot @name="notification" as |status type|>
|
<BlockSlot @name="notification" as |status type|>
|
||||||
{{!TODO: Move sessions to its own folder within nodes }}
|
{{!TODO: Move sessions to its own folder within nodes }}
|
||||||
|
|
Loading…
Reference in New Issue