Add basic searching by tags using the freetext search near-term
This commit is contained in:
parent
6c9f4fbe8a
commit
f993130937
|
@ -26,6 +26,10 @@ export default Controller.extend(WithFiltering, {
|
||||||
get(item, 'ID')
|
get(item, 'ID')
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.indexOf(term) !== -1 ||
|
.indexOf(term) !== -1 ||
|
||||||
|
(get(item, 'Tags') || [])
|
||||||
|
.join('')
|
||||||
|
.toLowerCase()
|
||||||
|
.indexOf(term) !== -1 ||
|
||||||
get(item, 'Port')
|
get(item, 'Port')
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
|
|
|
@ -26,10 +26,16 @@ const widthDeclaration = function(num) {
|
||||||
};
|
};
|
||||||
export default Controller.extend(WithHealthFiltering, {
|
export default Controller.extend(WithHealthFiltering, {
|
||||||
filter: function(item, { s = '', status = '' }) {
|
filter: function(item, { s = '', status = '' }) {
|
||||||
|
const term = s.toLowerCase();
|
||||||
return (
|
return (
|
||||||
get(item, 'Name')
|
(get(item, 'Name')
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.indexOf(s.toLowerCase()) !== -1 && item.hasStatus(status)
|
.indexOf(term) !== -1 ||
|
||||||
|
(get(item, 'Tags') || [])
|
||||||
|
.join('')
|
||||||
|
.toLowerCase()
|
||||||
|
.indexOf(term) !== -1) &&
|
||||||
|
item.hasStatus(status)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
totalWidth: computed('{maxPassing,maxWarning,maxCritical}', function() {
|
totalWidth: computed('{maxPassing,maxWarning,maxCritical}', function() {
|
||||||
|
|
Loading…
Reference in a new issue