You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2012/09/13 23:21:59 UTC
[1/2] git commit: CS-16328:UI not calling the listCapacity correctly
Updated Branches:
refs/heads/master d66db854d -> 125a6fe06
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/master
Commit: 330c89ce59cbe2e0ed0d4206a9382fccff732eb7
Parents: d66db85
Author: Pranav Saxena <pr...@citrix.com>
Authored: Thu Sep 13 16:10:57 2012 +0530
Committer: Brian Federle <br...@citrix.com>
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();