You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2014/11/10 19:23:00 UTC
ambari git commit: Revert "AMBARI-8249. Usability: Configs Tab UI
responsiveness issues (alexantonenko)" Reverting due to UT failures. This
reverts commit f967daa344ab9183237328e1b97a8fb45b545a86.
Repository: ambari
Updated Branches:
refs/heads/branch-1.7.0 58c62e065 -> eaab14f49
Revert "AMBARI-8249. Usability: Configs Tab UI responsiveness issues (alexantonenko)"
Reverting due to UT failures.
This reverts commit f967daa344ab9183237328e1b97a8fb45b545a86.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eaab14f4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eaab14f4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eaab14f4
Branch: refs/heads/branch-1.7.0
Commit: eaab14f494d9a42b61e0e40cb3914e57c8d20eba
Parents: 58c62e0
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Nov 10 10:22:42 2014 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Nov 10 10:22:42 2014 -0800
----------------------------------------------------------------------
ambari-web/app/models/service_config.js | 1 -
.../common/configs/service_config_category.hbs | 4 ++--
.../app/views/common/configs/services_config.js | 18 +++++++++---------
3 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaab14f4/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index d539f96..b338491 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -194,7 +194,6 @@ App.ServiceConfigProperty = Ember.Object.extend({
serviceValidator: null,
isNotSaved: false, // user property was added but not saved
hasInitialValue: false, //if true then property value is defined and saved to server
- isHiddenByFilter: false, //if true then hide this property (filtered out)
/**
* Usage example see on <code>App.ServiceConfigRadioButtons.handleDBConnectionProperty()</code>
*
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaab14f4/ambari-web/app/templates/common/configs/service_config_category.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_config_category.hbs b/ambari-web/app/templates/common/configs/service_config_category.hbs
index bab5ed0..0aaf35f 100644
--- a/ambari-web/app/templates/common/configs/service_config_category.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_category.hbs
@@ -25,8 +25,8 @@
<div class="accordion-inner service-config-section">
<form class="form-horizontal" autocomplete="off">
- {{#each view.categoryConfigs}}
- <div {{bindAttr class=":entry-row isHiddenByFilter:hide isOverridden:overridden-property hasCompareDiffs:overridden-property"}}>
+ {{#each view.filteredCategoryConfigs}}
+ <div {{bindAttr class=":entry-row isOverridden:overridden-property hasCompareDiffs:overridden-property"}}>
{{#if showLabel}}
<span {{bindAttr class="errorMessage:error: :control-group :control-label-span"}}>
<label class="control-label">
http://git-wip-us.apache.org/repos/asf/ambari/blob/eaab14f4/ambari-web/app/views/common/configs/services_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index a18d94c..5c5d733 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -351,10 +351,10 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, {
$('.popover').remove();
var filter = this.get('parentView.filter').toLowerCase();
var selectedFilters = this.get('parentView.columns').filterProperty('selected');
- var filteredResult = this.get('categoryConfigs');
+ var filteredResult = this.get('categoryConfigs')
if (selectedFilters.length > 0 || filter.length > 0 || this.get('state') === 'inDOM') {
- filteredResult.forEach(function (config) {
+ filteredResult = filteredResult.filter(function (config) {
var passesFilters = true;
selectedFilters.forEach(function (filter) {
@@ -364,7 +364,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, {
});
if (!passesFilters) {
- config.set('isHiddenByFilter', true);
+ return false;
}
var searchString = config.get('defaultValue') + config.get('description') +
@@ -377,14 +377,13 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, {
}
if (filter != null && typeof searchString === "string") {
- config.set('isHiddenByFilter', !(searchString.toLowerCase().indexOf(filter) > -1));
+ return searchString.toLowerCase().indexOf(filter) > -1;
} else {
- config.set('isHiddenByFilter', false);
+ return true;
}
});
}
filteredResult = this.sortByIndex(filteredResult);
- filteredResult = filteredResult.filterProperty('isHiddenByFilter', false);
if (filter && filteredResult.length ) {
if (typeof this.get('category.collapsedByDefault') === 'undefined') {
@@ -402,7 +401,8 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, {
var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') + '>.accordion-body');
filteredResult.length && !this.get('category.isCollapsed') ? categoryBlock.show() : categoryBlock.hide();
- }.observes('categoryConfigs', 'parentView.filter', 'parentView.columns.@each.selected'),
+ return filteredResult;
+ }.property('categoryConfigs', 'parentView.filter', 'parentView.columns.@each.selected').cacheable(),
/**
* sort configs in current category by index
@@ -441,8 +441,8 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, {
* Should we show config group or not
*/
isShowBlock: function () {
- return this.get('category.customCanAddProperty') || this.get('categoryConfigs').filterProperty('isHiddenByFilter', false).length > 0;
- }.property('category.customCanAddProperty', 'categoryConfigs.@each.isHiddenByFilter'),
+ return this.get('category.customCanAddProperty') || this.get('filteredCategoryConfigs').length > 0;
+ }.property('category.customCanAddProperty', 'filteredCategoryConfigs.length'),
didInsertElement: function () {
var isCollapsed = this.get('category.isCollapsed') == undefined ? (this.get('category.name').indexOf('Advanced') != -1 || this.get('category.name').indexOf('CapacityScheduler') != -1) : this.get('category.isCollapsed');