cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: updated refs/heads/ui-cisco-asa1000v-support to a9b903d
Date Tue, 23 Apr 2013 21:43:19 GMT
Updated Branches:
  refs/heads/ui-cisco-asa1000v-support d53d06cc2 -> a9b903d59


Infrastructure UI plugin API: Add 'resource' method

Add new method 'infrastructure.resource' for retrieving resource
objects from the infrastructure section. Specify the type as a
string (i.e, 'pod' 'cluster' or 'host') and the entire resource object
will be returned, including listView, actions, createForm,
etc. Updating the data in this resource will automatically update the
UI.


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

Branch: refs/heads/ui-cisco-asa1000v-support
Commit: 1c482b5c3bc85e549b457070e5cd901bb181c3f9
Parents: d53d06c
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Apr 23 14:40:33 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Apr 23 14:40:33 2013 -0700

----------------------------------------------------------------------
 ui/modules/infrastructure/infrastructure.js |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c482b5c/ui/modules/infrastructure/infrastructure.js
----------------------------------------------------------------------
diff --git a/ui/modules/infrastructure/infrastructure.js b/ui/modules/infrastructure/infrastructure.js
index 8292896..ad43108 100644
--- a/ui/modules/infrastructure/infrastructure.js
+++ b/ui/modules/infrastructure/infrastructure.js
@@ -40,7 +40,17 @@
             state: state
           });
         });
+      },
+
+      resource: function(args) {
+        var type = args.type;
+
+        if (type) {
+          return cloudStack.sections.system.subsections[type];
+        } else {
+          return false;
+        }
       }
     });
   };
-}(jQuery, cloudStack));
\ No newline at end of file
+}(jQuery, cloudStack));


Mime
View raw message