You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/12/12 19:14:17 UTC
git commit: AMBARI-4046. JS errors after stopping YARN. (xiwang via
yusaku)
Updated Branches:
refs/heads/trunk 99779cc7d -> d1cbbdb13
AMBARI-4046. JS errors after stopping YARN. (xiwang via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1cbbdb1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1cbbdb1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1cbbdb1
Branch: refs/heads/trunk
Commit: d1cbbdb13c8b8a08b5edbeb2c472308087a86703
Parents: 99779cc
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Dec 12 10:13:58 2013 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Dec 12 10:13:58 2013 -0800
----------------------------------------------------------------------
ambari-web/app/utils/ajax.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1cbbdb1/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 7c98f43..c25d698 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -496,12 +496,15 @@ var urls = {
'format': function (data, opt) {
var field1 = 'metrics/yarn/Queue/{queueName}/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}]';
var field2 = 'metrics/yarn/Queue/{queueName}/AvailableMB[{fromSeconds},{toSeconds},{stepSeconds}]';
- if (opt.url != null && data.queueNames != null) {
+ if (opt.url != null && data.queueNames != null && data.queueNames.length > 0) {
data.queueNames.forEach(function (q) {
data.queueName = q;
opt.url += (formatUrl(field1, data) + ",");
opt.url += (formatUrl(field2, data) + ",");
});
+ } else {
+ opt.url += (formatUrl(field1, data) + ",");
+ opt.url += (formatUrl(field2, data) + ",");
}
},
'testInProduction': true