CS-16328:UI not calling the listCapacity correctly

This commit is contained in:
Pranav Saxena 2012-09-13 16:10:57 +05:30 committed by Brian Federle
parent d66db854d4
commit 330c89ce59
2 changed files with 17 additions and 1 deletions

View File

@ -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;

View File

@ -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();