You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by db...@apache.org on 2017/02/22 07:25:19 UTC
ambari git commit: AMBARI-20087. HiveView 2.0: Table search is case
sensitive, show table only if name match exactly. (dipayanb)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 2a0d22354 -> d31511969
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/d3151196
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d3151196
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d3151196
Branch: refs/heads/branch-2.5
Commit: d31511969f3de260a932ffc396b3f9fa7eceb5ac
Parents: 2a0d223
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:09 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/d3151196/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;
});
}),