ui: improve comments

This commit is contained in:
Jack Pearkes 2014-04-24 15:33:53 -04:00
parent 1556ac6781
commit b6ef75d58d
2 changed files with 16 additions and 9 deletions

View File

@ -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) {
//

View File

@ -9,7 +9,7 @@
window.fixtures = {}
//
// The array route, i.e /ui/services, should return _all_ services
// The array route, i.e /ui/<dc>/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/<service> BUT it's what is
// It represents the route /ui/<dc>/services/<service> BUT it's what is
// BELOW the top-level key.
//
// So, what is actually returned should be similar to the /catalog/service/<service>
@ -164,7 +164,10 @@ fixtures.services_full = {
]
}
//
// /ui/<dc>/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,