From 330c89ce59cbe2e0ed0d4206a9382fccff732eb7 Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Thu, 13 Sep 2012 16:10:57 +0530 Subject: [PATCH] CS-16328:UI not calling the listCapacity correctly --- ui/scripts/dashboard.js | 17 ++++++++++++++++- ui/scripts/ui-custom/dashboard.js | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js index ce723f7ce7d..7b21b0b9701 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; diff --git a/ui/scripts/ui-custom/dashboard.js b/ui/scripts/ui-custom/dashboard.js index 0ae8bb1a598..2d814212962 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();