eschutho commented on a change in pull request #11702:
URL:
https://github.com/apache/incubator-superset/pull/11702#discussion_r530050123
##########
File path: superset-frontend/src/views/CRUD/data/query/QueryList.tsx
##########
@@ -326,7 +334,74 @@ function QueryList({ addDangerToast, addSuccessToast }:
QueryListProps) {
[],
);
- const filters: Filters = useMemo(() => [], []);
+ const filters: Filters = useMemo(
+ () => [
+ {
+ Header: t('Database'),
+ id: 'database',
+ input: 'select',
+ operator: 'rel_o_m',
+ unfilteredLabel: 'All',
+ fetchSelects: createFetchRelated(
+ 'query',
+ 'database',
+ createErrorHandler(errMsg =>
+ addDangerToast(
+ t('An error occurred while fetching database values: %s',
errMsg),
+ ),
+ ),
+ ),
+ paginate: true,
+ },
+ {
+ Header: t('State'),
+ id: 'status',
+ input: 'select',
+ operator: 'eq',
+ unfilteredLabel: 'All',
+ fetchSelects: createFetchDistinct(
+ 'query',
+ 'status',
+ createErrorHandler(errMsg =>
+ addDangerToast(
+ t('An error occurred while fetching schema values: %s', errMsg),
+ ),
+ ),
+ ),
+ paginate: true,
+ },
+ {
+ Header: t('User'),
+ id: 'user',
+ input: 'select',
+ operator: 'rel_o_m',
+ unfilteredLabel: 'All',
+ fetchSelects: createFetchRelated(
+ 'query',
+ 'user',
+ createErrorHandler(errMsg =>
+ addDangerToast(
+ t('An error occurred while fetching database values: %s',
errMsg),
+ ),
+ ),
+ ),
+ paginate: true,
+ },
+ {
+ Header: t('Time Range'),
+ id: 'start_time',
+ input: 'datetime_range',
+ operator: 'between',
+ },
+ {
+ Header: t('Search by query text'),
+ id: 'sql',
+ input: 'search',
+ operator: 'ct',
Review comment:
second @hughhhh's comment on these strings, too.. they could prob all
benefit from enums as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]