ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-8031. Slider View: Incorrect 'hadoop.security.auth_to_local' config blocks UI even after corrected (srimanth)
Date Wed, 29 Oct 2014 22:48:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 90855a0db -> 7bb936b65


AMBARI-8031. Slider View: Incorrect 'hadoop.security.auth_to_local' config blocks UI even
after corrected (srimanth)


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

Branch: refs/heads/trunk
Commit: 7bb936b65f209af8d64494fd50ded1ab29c3de64
Parents: 90855a0
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Wed Oct 29 15:46:08 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Wed Oct 29 15:46:23 2014 -0700

----------------------------------------------------------------------
 .../resources/ui/app/controllers/slider_controller.js   | 12 ++++++++++++
 .../slider/src/main/resources/ui/app/initialize.js      |  9 +++++++++
 2 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7bb936b6/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 35d1814..2e9db6d 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -45,6 +45,18 @@ App.SliderController = Ember.Controller.extend(App.RunPeriodically, {
   },
 
   /**
+   * Accessing /resources/status initializes the view internals
+   * with the latest configs. This will help the view in staying
+   * updated and recover from previous config issues.
+   */
+  touchViewStatus: function() {
+    return App.ajax.send({
+      name: 'slider.getViewParams.v2',
+      sender: this
+    });
+  },
+
+  /**
    * Set Slider label and description to <code>App</code> properties
    * @param {object} data
    * @method getViewDisplayParametersSuccessCallback

http://git-wip-us.apache.org/repos/asf/ambari/blob/7bb936b6/contrib/views/slider/src/main/resources/ui/app/initialize.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 7bef100..205322b 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -131,6 +131,15 @@ App.initializer({
       var sliderController = application.__container__.lookup('controller:Slider');
       sliderController.getViewDisplayParameters().done(function() {
         sliderController.run('initResources');
+      }).fail(function(){
+        // If initial view-listing failed, it might be due to bad previous-configs.
+        // We will initialize '/resources/status' to load configs again, and then
+        // attempt one more time to load view parameters.
+        sliderController.touchViewStatus().done(function() {
+          sliderController.getViewDisplayParameters().done(function() {
+            sliderController.run('initResources');
+          });
+        });
       });
       application.ApplicationTypeMapper.load();
       application.SliderAppsMapper.run('load');


Mime
View raw message