Skip to content

Commit

Permalink
Add the token to /v1/internal/ui/nodes. (issue hashicorp#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
origami-oswell committed Dec 16, 2015
1 parent c4f2aba commit c1803c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/javascripts/app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ App.IndexRoute = App.BaseRoute.extend({
// functioning, as well as the per-dc requests.
App.DcRoute = App.BaseRoute.extend({
model: function(params) {
var token = App.get('settings.token');

// Return a promise hash to retreieve the
// dcs and nodes used in the header
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
Expand Down

0 comments on commit c1803c5

Please sign in to comment.