From b6ef75d58d6691e533ba9e90617032a1dde42515 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Thu, 24 Apr 2014 15:33:53 -0400 Subject: [PATCH] ui: improve comments --- ui/javascripts/app.js | 10 +++++----- ui/javascripts/fixtures.js | 15 +++++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ui/javascripts/app.js b/ui/javascripts/app.js index 2ac099ebfb..be75abc90e 100755 --- a/ui/javascripts/app.js +++ b/ui/javascripts/app.js @@ -301,20 +301,20 @@ App.NodeRoute = App.BaseRoute.extend({ controller.set('content', model); // // Since we have 2 column layout, we need to also display the - // list of services on the left. Hence setting the attribute - // {{services}} on the controller. + // list of nodes on the left. Hence setting the attribute + // {{nodes}} on the controller. // controller.set('nodes', [App.Node.create(window.fixtures.nodes[0]), App.Node.create(window.fixtures.nodes[1])]); } }); // -// Display all the services, allow to drill down into the specific services. +// Display all the nodes, allow to drill down into the specific nodes. // App.NodesRoute = App.BaseRoute.extend({ // - // Set the services as the routes default model to be called in - // the template as {{model}} + // Set the node as the routes default model to be called in + // the template as {{model}}. This is the "expanded" view. // setupController: function(controller, model) { // diff --git a/ui/javascripts/fixtures.js b/ui/javascripts/fixtures.js index d9399ebb5e..22ec760e71 100644 --- a/ui/javascripts/fixtures.js +++ b/ui/javascripts/fixtures.js @@ -9,7 +9,7 @@ window.fixtures = {} // -// The array route, i.e /ui/services, should return _all_ services +// The array route, i.e /ui//services, should return _all_ services // in the DC // fixtures.services = [ @@ -59,7 +59,7 @@ fixtures.services = [ // // This one is slightly more complicated to allow more UI interaction. -// It represents the route /ui/services/ BUT it's what is +// It represents the route /ui//services/ BUT it's what is // BELOW the top-level key. // // So, what is actually returned should be similar to the /catalog/service/ @@ -164,7 +164,10 @@ fixtures.services_full = { ] } - +// +// /ui//nodes +// all the nodes +// fixtures.nodes = [ { "Address": "10.0.1.109", @@ -212,8 +215,12 @@ fixtures.nodes = [ } ] +// These are for retrieving individual nodes. Same story as services, +// the top level key is just for the demo. fixtures.nodes_full = { - "node-10-0-1-109": { + "node-10-0-1-109": + // This is what would be returned. + { "Services": [ { "Port": 0,