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;
|
||||
return hash({
|
||||
item: this.repo.findBySlug(name, dc, nspace),
|
||||
sessions: this.sessionRepo.findByNode(name, dc, nspace),
|
||||
tomography: this.coordinateRepo.findAllByNode(name, dc),
|
||||
}).then(model => {
|
||||
return hash({
|
||||
...model,
|
||||
sessions: this.sessionRepo.findByNode(name, dc, nspace),
|
||||
tomography: this.coordinateRepo.findAllByNode(name, dc),
|
||||
});
|
||||
});
|
||||
},
|
||||
setupController: function(controller, model) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{{title item.Node}}
|
||||
<EventSource @src={{item}} @onerror={{action "error"}} />
|
||||
<EventSource @src={{sessions}} />
|
||||
<EventSource @src={{tomography}} />
|
||||
<AppView @class="node show">
|
||||
<BlockSlot @name="notification" as |status type|>
|
||||
{{!TODO: Move sessions to its own folder within nodes }}
|
||||
|
|
Loading…
Reference in New Issue