diff --git a/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx b/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx index e45be0712..2d4730a72 100644 --- a/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx +++ b/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx @@ -29,7 +29,6 @@ function FilterModal(props: Props) { } }); } - console.log('allFilters', allFilters); const onFilterSearchClick = (filter) => { const _filter = filtersMap[filter.type]; diff --git a/frontend/app/components/shared/Filters/FilterSelection/FilterSelection.tsx b/frontend/app/components/shared/Filters/FilterSelection/FilterSelection.tsx index 90a509d82..674d81a78 100644 --- a/frontend/app/components/shared/Filters/FilterSelection/FilterSelection.tsx +++ b/frontend/app/components/shared/Filters/FilterSelection/FilterSelection.tsx @@ -18,7 +18,7 @@ function FilterSelection(props: Props) { className="relative" onClickOutside={ () => setTimeout(function() { setShowModal(false) - }, 50)} + }, 200)} > { children ? React.cloneElement(children, { onClick: () => setShowModal(true)}) : (
({ appliedFilter: state.getIn([ 'search', 'instance' ]), -}), { edit })(SessionSearch); \ No newline at end of file +}), { edit, addFilter })(SessionSearch); \ No newline at end of file diff --git a/frontend/app/duck/search.js b/frontend/app/duck/search.js index 6b819e7c6..28b2d99f8 100644 --- a/frontend/app/duck/search.js +++ b/frontend/app/duck/search.js @@ -193,6 +193,7 @@ export const clearSearch = () => (dispatch, getState) => { } export const addFilter = (filter) => (dispatch, getState) => { + filter.value = filter.value && filter.value.length === 0 ? filter.value : ['']; const instance = getState().getIn([ 'search', 'instance']); const filters = instance.filters.push(filter); return dispatch(edit(instance.set('filters', filters))); diff --git a/frontend/app/types/filter/filterType.ts b/frontend/app/types/filter/filterType.ts index 9ab054386..2c29e5cde 100644 --- a/frontend/app/types/filter/filterType.ts +++ b/frontend/app/types/filter/filterType.ts @@ -38,7 +38,7 @@ export enum FilterKey { PLATFORM = "PLATFORM", DURATION = "DURATION", REFERRER = "REFERRER", - USER_COUNTRY = "USER_COUNTRY", + USER_COUNTRY = "USERCOUNTRY", JOURNEY = "JOURNEY", REQUEST = "REQUEST", GRAPHQL = "GRAPHQL", diff --git a/frontend/app/types/filter/newFilter.js b/frontend/app/types/filter/newFilter.js index 0e1f6b176..81d14e516 100644 --- a/frontend/app/types/filter/newFilter.js +++ b/frontend/app/types/filter/newFilter.js @@ -51,7 +51,7 @@ export const filtersMap = { [FilterKey.TTFB]: { key: FilterKey.TTFB, type: FilterType.MULTIPLE, category: FilterCategory.PERFORMANCE, label: 'Time to First Byte', operator: 'isAny', operatorOptions: filterOptions.stringOperators, source: [], icon: 'filters/ttfb', isEvent: true, hasSource: true, sourceOperator: '=', sourceType: FilterType.NUMBER, sourceOperatorOptions: filterOptions.customOperators }, [FilterKey.AVG_CPU_LOAD]: { key: FilterKey.AVG_CPU_LOAD, type: FilterType.MULTIPLE, category: FilterCategory.PERFORMANCE, label: 'Avg CPU Load', operator: 'isAny', operatorOptions: filterOptions.stringOperators, source: [], icon: 'filters/cpu-load', isEvent: true, hasSource: true, sourceOperator: '=', sourceType: FilterType.NUMBER, sourceOperatorOptions: filterOptions.customOperators }, [FilterKey.AVG_MEMORY_USAGE]: { key: FilterKey.AVG_MEMORY_USAGE, type: FilterType.MULTIPLE, category: FilterCategory.PERFORMANCE, label: 'Avg Memory Usage', operator: 'isAny', operatorOptions: filterOptions.stringOperators, source: [], icon: 'filters/memory-load', isEvent: true, hasSource: true, sourceOperator: '=', sourceType: FilterType.NUMBER, sourceOperatorOptions: filterOptions.customOperators }, - [FilterKey.FETCH_FAILED]: { key: FilterKey.FETCH_FAILED, type: FilterType.MULTIPLE, category: FilterCategory.PERFORMANCE, label: 'Fetch Failed', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/fetch-failed', isEvent: true }, + [FilterKey.FETCH_FAILED]: { key: FilterKey.FETCH_FAILED, type: FilterType.MULTIPLE, category: FilterCategory.PERFORMANCE, label: 'Fetch Failed', operator: 'isAny', operatorOptions: filterOptions.stringOperators, icon: 'filters/fetch-failed', isEvent: true }, [FilterKey.ISSUE]: { key: FilterKey.ISSUE, type: FilterType.ISSUE, category: FilterCategory.JAVASCRIPT, label: 'Issue', operator: 'is', operatorOptions: filterOptions.baseOperators, icon: 'filters/click', options: ISSUE_OPTIONS }, }