You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/24 14:19:18 UTC
[11/50] ambari git commit: AMBARI-20087. HiveView 2.0: Table search
is case sensitive, show table only if name match exactly. (dipayanb)
AMBARI-20087. HiveView 2.0: Table search is case sensitive, show table only if name match exactly. (dipayanb)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c655d7c0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c655d7c0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c655d7c0
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: c655d7c08edd82fa5de1a009a7af399dd4b09eb7
Parents: 4e7bf34
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Wed Feb 22 12:55:09 2017 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Wed Feb 22 12:55:36 2017 +0530
----------------------------------------------------------------------
.../hive20/src/main/resources/ui/app/components/list-filter.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c655d7c0/contrib/views/hive20/src/main/resources/ui/app/components/list-filter.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/list-filter.js b/contrib/views/hive20/src/main/resources/ui/app/components/list-filter.js
index d538aa3..db0b5c0 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/list-filter.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/list-filter.js
@@ -22,6 +22,7 @@ export default Ember.Component.extend({
classNames: ['list-filter'],
header: '',
subHeader: '',
+ caseInsensitive: true,
items: [],
filterText: '',
emptyFilterText: Ember.computed('filterText', function() {
@@ -29,7 +30,9 @@ export default Ember.Component.extend({
}),
filteredItems: Ember.computed('filterText', 'items.@each', function() {
return this.get('items').filter((item) => {
- return item.get('name').indexOf(this.get('filterText')) !== -1;
+ let filterText = this.get('caseInsensitive') ? this.get('filterText').toLowerCase() : this.get('filterText');
+ let itemName = this.get('caseInsensitive') ? item.get('name').toLowerCase() : item.get('name')
+ return itemName.indexOf(filterText) !== -1;
});
}),