From 4b746dc8800e639fe42be22996d3e46e1691673a Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 14 Jul 2020 14:50:44 +0100 Subject: [PATCH] ui: Only try and load sessions and coordinates if the node exists (#8305) --- ui-v2/app/routes/dc/nodes/show.js | 8 ++++++-- ui-v2/app/templates/dc/nodes/show.hbs | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui-v2/app/routes/dc/nodes/show.js b/ui-v2/app/routes/dc/nodes/show.js index 0c759dafc6..97051653a5 100644 --- a/ui-v2/app/routes/dc/nodes/show.js +++ b/ui-v2/app/routes/dc/nodes/show.js @@ -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) { diff --git a/ui-v2/app/templates/dc/nodes/show.hbs b/ui-v2/app/templates/dc/nodes/show.hbs index c04813ac0f..4598999c8c 100644 --- a/ui-v2/app/templates/dc/nodes/show.hbs +++ b/ui-v2/app/templates/dc/nodes/show.hbs @@ -1,5 +1,7 @@ {{title item.Node}} + + {{!TODO: Move sessions to its own folder within nodes }}