mirror of https://github.com/status-im/consul.git
Propagate token in UI
This commit is contained in:
parent
402a366676
commit
85d0f4b9ef
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue