From 85d0f4b9efade809c9314b21bd2f5ab836d4fefa Mon Sep 17 00:00:00 2001 From: Andy Lo-A-Foe Date: Wed, 18 Nov 2015 08:29:01 +0100 Subject: [PATCH] Propagate token in UI --- ui/javascripts/app/routes.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/javascripts/app/routes.js b/ui/javascripts/app/routes.js index bedf867059..fbc1f8c4d2 100644 --- a/ui/javascripts/app/routes.js +++ b/ui/javascripts/app/routes.js @@ -90,10 +90,12 @@ App.DcRoute = App.BaseRoute.extend({ model: function(params) { // Return a promise hash to retreieve the // dcs and nodes used in the header + var token = App.get('settings.token'); + return Ember.RSVP.hash({ dc: params.dc, dcs: Ember.$.getJSON('/v1/catalog/datacenters'), - nodes: Ember.$.getJSON(formatUrl('/v1/internal/ui/nodes', params.dc)).then(function(data) { + nodes: Ember.$.getJSON(formatUrl('/v1/internal/ui/nodes', params.dc, token)).then(function(data) { var objs = []; // Merge the nodes into a list and create objects out of them