diff --git a/frontend/app/scripts/directives/dashboard/filter-editor.js b/frontend/app/scripts/directives/dashboard/filter-editor.js index 2b53eeb1a6..033923ba56 100644 --- a/frontend/app/scripts/directives/dashboard/filter-editor.js +++ b/frontend/app/scripts/directives/dashboard/filter-editor.js @@ -21,7 +21,7 @@ } var type = field.type; - if ((type === 'string' || type === 'number') && field.values.length > 0) { + if ((type === 'string' || type === 'number' || type === 'integer' || type === 'float' ) && field.values.length > 0) { return 'enumeration'; } diff --git a/frontend/app/scripts/filters/filter-value.js b/frontend/app/scripts/filters/filter-value.js index d3837e1adc..355583cc91 100644 --- a/frontend/app/scripts/filters/filter-value.js +++ b/frontend/app/scripts/filters/filter-value.js @@ -22,6 +22,8 @@ return _.map(value.list, function(item) { return item.label || item.text; }).join(', '); + } else if(angular.isObject(value) && value.operator !== undefined) { + return [value.operator, value.value].join(' '); } return value || 'Any'; diff --git a/frontend/app/scripts/services/common/QueryBuilderSrv.js b/frontend/app/scripts/services/common/QueryBuilderSrv.js index e6d5410e82..af66d42a7a 100644 --- a/frontend/app/scripts/services/common/QueryBuilderSrv.js +++ b/frontend/app/scripts/services/common/QueryBuilderSrv.js @@ -166,7 +166,7 @@ return this._buildQueryFromFreeTextFilter(fieldDef, filter); } else if(filter.value.list || fieldDef.values.length > 0) { return this._buildQueryFromListFilter(fieldDef, filter); - } else if(filter.type === 'number') { + } else if(filter.type === 'number' || filter.type === 'integer' || filter.type === 'float') { return this._buildQueryFromNumberFilter(fieldDef, filter); } diff --git a/frontend/app/scripts/services/ui/GlobalSearchSrv.js b/frontend/app/scripts/services/ui/GlobalSearchSrv.js index aa368d5e44..bfa7a15b57 100644 --- a/frontend/app/scripts/services/ui/GlobalSearchSrv.js +++ b/frontend/app/scripts/services/ui/GlobalSearchSrv.js @@ -63,6 +63,7 @@ } else { switch(fieldDef.type) { case 'number': + case 'integer': return { value: Number.parseInt(value.id) }; diff --git a/frontend/app/views/directives/dashboard/filter-editor.html b/frontend/app/views/directives/dashboard/filter-editor.html index ff4d0b3f49..7ffe88890f 100644 --- a/frontend/app/views/directives/dashboard/filter-editor.html +++ b/frontend/app/views/directives/dashboard/filter-editor.html @@ -2,7 +2,7 @@ -
+
- +