CS-16328:UI not calling the listCapacity correctly

Reviewed-By:Brian
This commit is contained in:
Pranav Saxena 2012-09-13 16:16:36 +05:30
parent 1072ec7ae3
commit a684b3af25
2 changed files with 17 additions and 1 deletions

View File

@ -135,10 +135,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

@ -175,6 +175,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();