cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [06/30] git commit: updated refs/heads/ui-vpc-redesign to 9ac67b8
Date Mon, 13 May 2013 18:13:11 GMT
Add basic listView/detailView for network provider


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

Branch: refs/heads/ui-vpc-redesign
Commit: d53d06cc2f202d326740d01ffa29e626c9b735d2
Parents: 9081152
Author: Brian Federle <brian.federle@citrix.com>
Authored: Thu Apr 18 16:26:23 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Thu Apr 18 16:26:23 2013 -0700

----------------------------------------------------------------------
 .../asa1000vNetworkProvider.js                     |   48 ++++++++++++++-
 ui/modules/infrastructure/infrastructure.js        |    9 +++
 2 files changed, 56 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d53d06cc/ui/modules/asa1000vNetworkProvider/asa1000vNetworkProvider.js
----------------------------------------------------------------------
diff --git a/ui/modules/asa1000vNetworkProvider/asa1000vNetworkProvider.js b/ui/modules/asa1000vNetworkProvider/asa1000vNetworkProvider.js
index 3855daf..8c83339 100644
--- a/ui/modules/asa1000vNetworkProvider/asa1000vNetworkProvider.js
+++ b/ui/modules/asa1000vNetworkProvider/asa1000vNetworkProvider.js
@@ -19,7 +19,53 @@
     module.infrastructure.networkServiceProvider({
       id: 'ciscoAsa1000v',
       name: 'Cisco ASA 1000v',
-      state: 'Disabled'
+      state: 'Disabled',
+      listView: {
+        id: 'asa1000vDevices',
+        fields: {
+          name: { label: 'label.name' },
+          ipaddress: { label: 'label.ip.address' },
+          state: { label: 'label.state', indicator: {
+            'Enabled': 'on',
+            'Disabled': 'off'
+          }}
+        },
+        dataProvider: function(args) {
+          args.response.success({
+            data: [
+              { name: 'device1', ipaddress: '192.168.1.12', state: 'Enabled' },
+              { name: 'device2', ipaddress: '192.168.1.13', state: 'Disabled' },
+              { name: 'device3', ipaddress: '192.168.1.14', state: 'Enabled' }
+            ]
+          });
+        }
+      },
+      detailView: {
+        id: 'asa1000vProvider',
+        label: 'label.netScaler',
+        viewAll: { label: 'label.devices', path: '_zone.asa100vDevices' },
+        tabs: {
+          details: {
+            title: 'label.details',
+            fields: [
+              {
+                name: { label: 'label.name' }
+              },
+              {
+                state: { label: 'label.state' }
+              }
+            ],
+            dataProvider: function(args) {
+              args.response.success({
+                data: {
+                  name: 'Cisco ASA 1000v',
+                  state: 'Disabled'
+                }
+              });
+            }
+          }
+        }
+      }
     });
   };
 }(jQuery, cloudStack));
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d53d06cc/ui/modules/infrastructure/infrastructure.js
----------------------------------------------------------------------
diff --git a/ui/modules/infrastructure/infrastructure.js b/ui/modules/infrastructure/infrastructure.js
index 01cc4d7..8292896 100644
--- a/ui/modules/infrastructure/infrastructure.js
+++ b/ui/modules/infrastructure/infrastructure.js
@@ -21,6 +21,15 @@
         var name = args.name;
         var id = args.id;
         var state = args.state;
+        var detailView = args.detailView;
+        var listView = args.listView;
+
+        cloudStack.sections.system.naas.networkProviders.types[id] = detailView;
+        cloudStack.sections.system.subsections[listView.id] = {
+          id: listView.id,
+          title: name,
+          listView: listView
+        };
 
         $(window).bind('cloudStack.system.serviceProviders.makeHarcodedArray', function(event,
data) {
           var nspHardcodingArray = data.nspHardcodingArray;


Mime
View raw message