ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-17732 'Advanced hive-atlas-application.properties' is not opened by default upon using properties filter. (ababiichuk)
Date Fri, 15 Jul 2016 12:28:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 101d79600 -> 674f887b8


AMBARI-17732 'Advanced hive-atlas-application.properties' is not opened by default upon using
properties filter. (ababiichuk)


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

Branch: refs/heads/branch-2.4
Commit: 674f887b8680a70623c2b3b660f05267169ec2fe
Parents: 101d796
Author: ababiichuk <ababiichuk@hortonworks.com>
Authored: Fri Jul 15 14:08:11 2016 +0300
Committer: ababiichuk <ababiichuk@hortonworks.com>
Committed: Fri Jul 15 15:27:29 2016 +0300

----------------------------------------------------------------------
 .../configs/service_configs_by_category_view.js | 23 ++++++++++----------
 1 file changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/674f887b/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 bdd0530..964e193 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
@@ -229,6 +229,10 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
    * @method filteredCategoryConfigs
    */
   filteredCategoryConfigs: function () {
+    Em.run.once(this, 'collapseCategory');
+  }.observes('categoryConfigs.@each.isHiddenByFilter'),
+
+  collapseCategory: function () {
     $('.popover').remove();
     var filter = this.get('parentView.filter').toLowerCase();
     var filteredResult = this.get('categoryConfigs');
@@ -243,21 +247,16 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
         this.set('category.collapsedByDefault', this.get('category.isCollapsed'));
       }
       this.set('category.isCollapsed', !filteredResult.length);
+    } else if (typeof this.get('category.collapsedByDefault') !== 'undefined') {
+      // If user clear filter -- restore defaults
+      this.set('category.isCollapsed', this.get('category.collapsedByDefault'));
+      this.set('category.collapsedByDefault', undefined);
+    } else if (isInitialRendering && !filteredResult.length) {
+      this.set('category.isCollapsed', true);
     }
-    else
-      if (typeof this.get('category.collapsedByDefault') !== 'undefined') {
-        // If user clear filter -- restore defaults
-        this.set('category.isCollapsed', this.get('category.collapsedByDefault'));
-        this.set('category.collapsedByDefault', undefined);
-      }
-      else
-        if (isInitialRendering && !filteredResult.length) {
-          this.set('category.isCollapsed', true);
-        }
-
     var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') + '>.accordion-body');
     this.get('category.isCollapsed') ? categoryBlock.hide() : categoryBlock.show();
-  }.observes('categoryConfigs', 'parentView.filter', 'parentView.columns.@each.selected'),
+  },
 
   /**
    * sort configs in current category by index


Mime
View raw message