Temp hack to make druid filters work in dashboard (#2300)
This commit is contained in:
parent
fc64a75fbd
commit
efff1ac4a1
|
|
@ -100,9 +100,6 @@ export default class Filter extends React.Component {
|
|||
// switching filter value between array/string when needed
|
||||
if (strFilterOps.indexOf(filter.op) !== -1) {
|
||||
// druid having filter or regex/==/!= filters
|
||||
if (typeof filter.val !== 'string') {
|
||||
this.props.changeFilter('val', filter.val.length > 0 ? filter.val[0] : '');
|
||||
}
|
||||
return (
|
||||
<input
|
||||
type="text"
|
||||
|
|
@ -113,9 +110,6 @@ export default class Filter extends React.Component {
|
|||
/>
|
||||
);
|
||||
}
|
||||
if (typeof filter.val === 'string') {
|
||||
this.props.changeFilter('val', filter.val === '' ? [] : [filter.val]);
|
||||
}
|
||||
return (
|
||||
<SelectControl
|
||||
multi
|
||||
|
|
|
|||
|
|
@ -2579,6 +2579,8 @@ class DruidDatasource(Model, AuditMixinNullable, Datasource, ImportMixin):
|
|||
cond = None
|
||||
if op in ('in', 'not in'):
|
||||
eq = [types.replace("'", '').strip() for types in eq]
|
||||
elif not isinstance(flt['val'], basestring):
|
||||
eq = eq[0] if len(eq) > 0 else ''
|
||||
if col in self.num_cols:
|
||||
if op in ('in', 'not in'):
|
||||
eq = [utils.js_string_to_num(v) for v in eq]
|
||||
|
|
|
|||
Loading…
Reference in New Issue