Updated Branches:
  refs/heads/ui-ucs dda28609f -> fb2ba4bdc

Add UCS + blades list view/detail view


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fb2ba4bd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fb2ba4bd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fb2ba4bd

Branch: refs/heads/ui-ucs
Commit: fb2ba4bdcfe8b1d5e8e49411609f2cff709b3778
Parents: dda2860
Author: Brian Federle <bfede...@gmail.com>
Authored: Fri May 17 11:21:04 2013 -0700
Committer: Brian Federle <bfede...@gmail.com>
Committed: Fri May 17 11:21:04 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   91 ++++++++++++++++++++------------------------
 1 files changed, 41 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fb2ba4bd/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 6338adb..b3a5fb4 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -5761,56 +5761,6 @@
               return listView;
             },
 
-            ucs: function() {
-              var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections['secondary-storage'].listView, {
-                dataProvider: function (args) {
-                  var searchByArgs = args.filterBy.search.value.length ?
-                    '&name=' + args.filterBy.search.value : '';
-
-                  var data = { 
-                    type: 'SecondaryStorage', 
-                    page: args.page, 
-                    pageSize: pageSize, 
-                    listAll: true 
-                  };                  
-
-                  $.ajax({
-                    url: createURL('listHosts' + searchByArgs),
-                    data: data,
-                    success: function (json) {
-                      args.response.success({ data: 
json.listhostsresponse.host });
-                    },
-                    error: function (json) {
-                      args.response.error(parseXMLHttpResponse(json));
-                    }
-                  });
-                },
-
-                detailView: {
-                  updateContext: function (args) {
-                    var zone;
-
-                    $.ajax({
-                      url: createURL('listZones'),
-                      data: { id: args.context.secondarystorages[0].zoneid },
-                      async: false,
-                      success: function (json) {
-                        zone = json.listzonesresponse.zone[0];
-                      }
-                    });
-
-                    selectedZoneObj = zone;
-
-                    return {
-                      zones: [zone]
-                    };
-                  }
-                }
-              });
-
-              return listView;
-            },
-            
             secondaryStorage: function() {
               var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections['secondary-storage'].listView, {
                 dataProvider: function (args) {
@@ -10933,6 +10883,47 @@
         }
       },
 
+      ucs: {
+        title: 'UCS',
+        id: 'ucs',
+        listView: {
+          fields: {
+            fieldA: { label: 'Field A' },
+            fieldB: { label: 'Field B' }
+          },
+          dataProvider: function(args) {
+            args.response.success({
+              data: [
+                { fieldA: 'fieldA1', fieldB: 'fieldB1' },
+                { fieldA: 'fieldA2', fieldB: 'fieldB2' }
+              ]
+            });
+          },
+          detailView: {
+            isMaximized: true,
+            tabs: {
+              blades: {
+                title: 'Blades',
+                listView: {
+                  fields: {
+                    fieldA: { label: 'Field A' },
+                    fieldB: { label: 'Field B' }
+                  },
+                  dataProvider: function(args) {
+                    args.response.success({
+                      data: [
+                        { fieldA: 'fieldA1', fieldB: 'fieldB1' },
+                        { fieldA: 'fieldA2', fieldB: 'fieldB2' }
+                      ]
+                    });
+                  },
+                }
+              }
+            }
+          }
+        }
+      },      
+
       'secondary-storage': {
         title: 'label.secondary.storage',
         id: 'secondarystorages',

Reply via email to