incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [4/4] git commit: Snapshots list UI: Support filtering by instance
Date Mon, 14 Jan 2013 20:07:32 GMT
Updated Branches:
  refs/heads/ui-quick-view-v2 d9689395c -> e52f1b6a7


Snapshots list UI: Support filtering by instance


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

Branch: refs/heads/ui-quick-view-v2
Commit: e52f1b6a7c41df7d311708463cbc7b1170f97df7
Parents: c95e896
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Jan 14 12:07:11 2013 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Mon Jan 14 12:07:11 2013 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e52f1b6a/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index dd81378..98ba396 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -1186,6 +1186,7 @@
 					
           dataProvider: function(args) {					  
 						var data = {};
+            var instanceVolumeIds = [];
 						listViewDataProvider(args, data);		
             
             if(args.context != null) {
@@ -1193,6 +1194,21 @@
 							  $.extend(data, {
 								  volumeid: args.context.volumes[0].id
 								});                
+              } else if (args.context.instances) {
+                $.ajax({
+                  url: createURL('listVolumes'),
+                  data: {
+                    virtualmachineid: args.context.instances[0].id,
+                    listAll: true
+                  },
+                  async: false,
+                  success: function(json) {
+                    instanceVolumeIds = $.map(json.listvolumesresponse.volume, function(volume)
{
+                      return volume.id;
+                    })
+                  }
+                });
+                data.volumeid = instanceVolumeIds.join(',');
               }
             }
 


Mime
View raw message