You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/12/29 14:39:48 UTC

[1/2] ambari git commit: AMBARI-19317. Specific group names cause some admin view menu items to be shown as selected (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 08a998455 -> 0a9ae7544


AMBARI-19317. Specific group names cause some admin view menu items to be shown as selected (alexantonenko)


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

Branch: refs/heads/branch-2.5
Commit: 8c875cf07a1f449733d5088e8a8dc4e1d55fa6fc
Parents: 08a9984
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Dec 29 16:33:51 2016 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Dec 29 16:33:51 2016 +0200

----------------------------------------------------------------------
 .../ui/admin-web/app/scripts/controllers/NavbarCtrl.js      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8c875cf0/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
index cbf38e8..fe1d0c5 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
@@ -100,7 +100,12 @@ angular.module('ambariAdminConsole')
   	angular.forEach(path.split('.'), function(routeObj) {
   		route = route[routeObj];
   	});
-  	var r = new RegExp( route.url.replace(/(:\w+)/, '\\w+'));
-  	return r.test($location.path());
+
+    // We should compare only root location part
+  	var r = new RegExp( route.url.replace(/(:\w+)/, '\\w+')),
+      secondSlashUrlIndex = $location.path().indexOf('/', 1),
+      locationIsRoot = !~secondSlashUrlIndex,
+      location = locationIsRoot ?  $location.path() : $location.path().slice(0, secondSlashUrlIndex);
+  	return r.test(location);
   };
 }]);


[2/2] ambari git commit: AMBARI-19303. Dependent configurations are not loaded if value is set via "Set recommended" button (alexantonenko)

Posted by al...@apache.org.
AMBARI-19303. Dependent configurations are not loaded if value is set via "Set recommended" button (alexantonenko)


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

Branch: refs/heads/branch-2.5
Commit: 0a9ae7544051ffffe7906f76b63b8d031ba6c7e3
Parents: 8c875cf
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Dec 29 16:37:10 2016 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Dec 29 16:37:10 2016 +0200

----------------------------------------------------------------------
 ambari-web/app/views/common/controls_view.js | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a9ae754/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index 545e196..dc91f36 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -155,24 +155,12 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
  */
 App.ValueObserver = Em.Mixin.create(App.SupportsDependentConfigs, {
 
-  selected: false,
-
-  focusOut: function () {
-    this.set('selected', false);
-  },
-
-  focusIn: function () {
-    this.set('selected', true);
-  },
-
   onValueUpdate: function () {
-    if (this.get('selected')) {
-      var self = this, config = this.get('serviceConfig'),
-        controller = this.get('controller');
-      delay(function(){
-        self.sendRequestRorDependentConfigs(config, controller);
-      }, 500);
-    }
+    var self = this, config = this.get('serviceConfig'),
+    controller = this.get('controller');
+    delay(function(){
+      self.sendRequestRorDependentConfigs(config, controller);
+    }, 500);
   }.observes('serviceConfig.value')
 });