ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-4356. Test mode: unable to load mirroring page. (akovalenko)
Date Mon, 20 Jan 2014 18:32:48 GMT
Updated Branches:
  refs/heads/trunk 52e67f92c -> 0a3e26518


AMBARI-4356. Test mode: unable to load mirroring page.  (akovalenko)


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

Branch: refs/heads/trunk
Commit: 0a3e26518305e54ea4d6c6d552ceced191c399b4
Parents: 52e67f9
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Mon Jan 20 20:32:27 2014 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Mon Jan 20 20:32:27 2014 +0200

----------------------------------------------------------------------
 .../app/assets/data/user_settings/admin_settings_show_bg.json     | 1 +
 .../app/assets/data/user_settings/pagination_displayLength.json   | 1 +
 ambari-web/app/assets/data/user_settings/user_pref.json           | 1 -
 ambari-web/app/controllers/application.js                         | 3 +++
 ambari-web/app/utils/ajax.js                                      | 2 +-
 ambari-web/app/views/common/table_view.js                         | 3 +++
 6 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3e2651/ambari-web/app/assets/data/user_settings/admin_settings_show_bg.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/user_settings/admin_settings_show_bg.json b/ambari-web/app/assets/data/user_settings/admin_settings_show_bg.json
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/ambari-web/app/assets/data/user_settings/admin_settings_show_bg.json
@@ -0,0 +1 @@
+true

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3e2651/ambari-web/app/assets/data/user_settings/pagination_displayLength.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/user_settings/pagination_displayLength.json b/ambari-web/app/assets/data/user_settings/pagination_displayLength.json
new file mode 100644
index 0000000..c038a08
--- /dev/null
+++ b/ambari-web/app/assets/data/user_settings/pagination_displayLength.json
@@ -0,0 +1 @@
+"10"

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3e2651/ambari-web/app/assets/data/user_settings/user_pref.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/user_settings/user_pref.json b/ambari-web/app/assets/data/user_settings/user_pref.json
deleted file mode 100644
index f32a580..0000000
--- a/ambari-web/app/assets/data/user_settings/user_pref.json
+++ /dev/null
@@ -1 +0,0 @@
-true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3e2651/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index 9c96cf5..d825228 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -52,6 +52,9 @@ App.ApplicationController = Em.Controller.extend({
     return dfd.promise();
   },
   persistKey: function (loginName) {
+    if (App.get('testMode')) {
+      return 'admin_settings_show_bg';
+    }
     if (!loginName)
       loginName = App.router.get('loginName');
     return 'admin-settings-show-bg-' + loginName;

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3e2651/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 867b78a..dc8aa5d 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -658,7 +658,7 @@ var urls = {
   },
   'settings.get.user_pref': {
     'real': '/persist/{key}',
-    'mock': '/data/user_settings/user_pref.json'
+    'mock': '/data/user_settings/{key}.json'
   },
   'settings.post.user_pref': {
     'real': '/persist',

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3e2651/ambari-web/app/views/common/table_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/table_view.js b/ambari-web/app/views/common/table_view.js
index c97b2ea..e5751dd 100644
--- a/ambari-web/app/views/common/table_view.js
+++ b/ambari-web/app/views/common/table_view.js
@@ -102,6 +102,9 @@ App.TableView = Em.View.extend({
    * @returns {String}
    */
   displayLengthKey: function (loginName) {
+    if (App.get('testMode')) {
+      return 'pagination_displayLength';
+    }
     loginName = loginName ? loginName : App.router.get('loginName');
     return this.get('controller.name') + '-pagination-displayLength-' + loginName;
   },


Mime
View raw message