Repository: ambari
Updated Branches:
  refs/heads/trunk b38e29f3d -> cd869694f


AMBARI-11835. Request in the widget "Memory Usage" returns 400-error 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd869694
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd869694
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd869694

Branch: refs/heads/trunk
Commit: cd869694fc6d20e95c8b348a55d1a1804b977c94
Parents: b38e29f
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jun 10 16:21:36 2015 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Jun 10 16:24:40 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/utils/ajax/ajax.js       | 2 +-
 ambari-web/test/utils/ajax/ajax_test.js | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cd869694/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js 
b/ambari-web/app/utils/ajax/ajax.js
index 40bbb2d..b1c6f12 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1142,7 +1142,7 @@ var urls = {
     'testInProduction': true
   },
   'dashboard.cluster_metrics.memory': {
-    'real': 
'/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}],
 metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}], 
metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'real': 
'/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/cluster_metrics/memory_1hr.json',
     'testInProduction': true
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/cd869694/ambari-web/test/utils/ajax/ajax_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/ajax/ajax_test.js 
b/ambari-web/test/utils/ajax/ajax_test.js
index 3b692bd..1c5c5ab 100644
--- a/ambari-web/test/utils/ajax/ajax_test.js
+++ b/ambari-web/test/utils/ajax/ajax_test.js
@@ -97,10 +97,14 @@ describe('App.ajax', function() {
   describe('Check "real" property for each url object', function() {
     var names = App.ajax.fakeGetUrlNames();
     names.forEach(function(name) {
-      it(name, function() {
+      it('`' + name + '`', function() {
         var url = App.ajax.fakeGetUrl(name);
         expect(url.real).to.be.a('string');
       });
+      it('`' + name + '` should not contain spaces', function () {
+        var url = App.ajax.fakeGetUrl(name);
+        expect(url.real.contains(' ')).to.be.false;
+      });
     });
   });
 

Reply via email to