Updated Branches: refs/heads/3.0.x 34046c03b -> 4f664c981
CS-14395: Instances tab need to introduce Volumes tab to see which volumes vm has reviewed-by: brian Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/4f664c98 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/4f664c98 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/4f664c98 Branch: refs/heads/3.0.x Commit: 4f664c981a1d0b02b10655ee6254754e2bfe084b Parents: 34046c0 Author: Sanjay Tripathi <[email protected]> Authored: Wed Jun 6 22:42:55 2012 +0530 Committer: Brian Federle <[email protected]> Committed: Wed Jun 6 11:41:47 2012 -0700 ---------------------------------------------------------------------- ui/scripts/instances.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4f664c98/ui/scripts/instances.js ---------------------------------------------------------------------- diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index edb732e..c51f889 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -803,6 +803,7 @@ detailView: { name: 'Instance details', + isMaximized: true, viewAll: { path: 'storage.volumes', label: 'label.volumes' }, tabFilter: function(args) { var hiddenTabs = []; @@ -1735,8 +1736,46 @@ } }); } + }, + + volume: { + title: 'label.volumes', + multiple: true, + fields:{ + id: { label: 'ID' }, + state: { label: 'label.state' }, + type: { label: 'label.type' }, + storagetype: { label: 'label.storage.type' }, + size: { + label: 'label.size', + converter: function(args) { + if (args == null || args == 0) + return ""; + else + return cloudStack.converters.convertBytes(args); + } + }, + deviceid: { label: 'label.device.id' }, + storage: { label: 'label.storage' }, + created: { label: 'label.created' } + }, + dataProvider: function(args) { + $.ajax({ + url: createURL("listVolumes&listAll=true"), + data: { virtualmachineid: args.context.instances[0].id }, + dataType: "json", + async: true, + success: function(json) { + var jsonObj = json.listvolumesresponse.volume; + args.response.success({ + data: jsonObj + }); + } + }); } } + + } } } };
