AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by 
default upon filtering (Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8f51c9324a407fa8ce8e92e2e77ee0a250c5cbc9
Parents: 0d7689d
Author: Zhe (Joe) Wang <zhew...@apache.org>
Authored: Mon Oct 10 16:13:09 2016 -0700
Committer: Zhe (Joe) Wang <zhew...@apache.org>
Committed: Mon Oct 10 16:13:09 2016 -0700

----------------------------------------------------------------------
 .../common/configs/service_configs_by_category_view.js  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f51c932/ambari-web/app/views/common/configs/service_configs_by_category_view.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 3eebfea..d9a4c5c 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -305,7 +305,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
    */
   filteredCategoryConfigs: function () {
     Em.run.once(this, 'collapseCategory');
-  }.observes('categoryConfigs.@each.isHiddenByFilter'),
+  }.observes('serviceConfigs.@each.isHiddenByFilter'),
 
   collapseCategory: function () {
     if (this.get('state') === 'destroyed') return;
@@ -330,7 +330,15 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
     } else if (isInitialRendering && !filteredResult.length) {
       this.set('category.isCollapsed', true);
     }
-    var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') 
+ '>.accordion-body');
+    var classNames = this.get('category.name').split(' ');
+    // Escape the dots in category names
+    classNames = classNames.map(function(className) {
+      if(className.indexOf(".")) {
+        className = className.split(".").join("\\.");
+      }
+      return className;
+    });
+    var categoryBlock = $('.' + classNames.join('.') + '>.accordion-body');
     this.get('category.isCollapsed') ? categoryBlock.hide() : 
categoryBlock.show();
   },
 

Reply via email to