CS-16328:UI not calling the listCapacity correctly
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/330c89ce Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/330c89ce Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/330c89ce Branch: refs/heads/javelin Commit: 330c89ce59cbe2e0ed0d4206a9382fccff732eb7 Parents: d66db85 Author: Pranav Saxena <[email protected]> Authored: Thu Sep 13 16:10:57 2012 +0530 Committer: Brian Federle <[email protected]> Committed: Thu Sep 13 14:21:52 2012 -0700 ---------------------------------------------------------------------- ui/scripts/dashboard.js | 17 ++++++++++++++++- ui/scripts/ui-custom/dashboard.js | 1 + 2 files changed, 17 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/330c89ce/ui/scripts/dashboard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js index ce723f7..7b21b0b 100644 --- a/ui/scripts/dashboard.js +++ b/ui/scripts/dashboard.js @@ -139,10 +139,25 @@ }); }, capacity: function(data) { + var latestData =null; + if(window.fetchLatestflag == 1) + { + latestData = { + fetchLatest:true + } + } + else + { + latestData = { + fetchLatest:false + } + } + window.fetchLatestflag = 0; + if (data.zones) { $.ajax({ url: createURL('listCapacity'), - data: { fetchLatest: true }, + data: latestData, success: function(json) { var capacities = json.listcapacityresponse.capacity; http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/330c89ce/ui/scripts/ui-custom/dashboard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui-custom/dashboard.js b/ui/scripts/ui-custom/dashboard.js index 0ae8bb1..2d81421 100644 --- a/ui/scripts/ui-custom/dashboard.js +++ b/ui/scripts/ui-custom/dashboard.js @@ -179,6 +179,7 @@ //Fetch Latest action $dashboard.find('.fetch-latest').click(function() { + window.fetchLatestflag = 1; var $browser = $('#browser .container'); if ($(this).hasClass('fetch-latest')) $('#navigation li.dashboard').click();
