feat(ui) - filters - fixes
This commit is contained in:
parent
72731ee4b1
commit
7a2dc58141
6 changed files with 5 additions and 5 deletions
|
|
@ -29,7 +29,6 @@ function FilterModal(props: Props) {
|
|||
}
|
||||
});
|
||||
}
|
||||
console.log('allFilters', allFilters);
|
||||
|
||||
const onFilterSearchClick = (filter) => {
|
||||
const _filter = filtersMap[filter.type];
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function FilterSelection(props: Props) {
|
|||
className="relative"
|
||||
onClickOutside={ () => setTimeout(function() {
|
||||
setShowModal(false)
|
||||
}, 50)}
|
||||
}, 200)}
|
||||
>
|
||||
{ children ? React.cloneElement(children, { onClick: () => setShowModal(true)}) : (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -97,4 +97,4 @@ function SessionSearch(props) {
|
|||
|
||||
export default connect(state => ({
|
||||
appliedFilter: state.getIn([ 'search', 'instance' ]),
|
||||
}), { edit })(SessionSearch);
|
||||
}), { edit, addFilter })(SessionSearch);
|
||||
|
|
@ -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)));
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue