diff --git a/.github/workflows/workers-ee.yaml b/.github/workflows/workers-ee.yaml index 4588ccb09..a61d75160 100644 --- a/.github/workflows/workers-ee.yaml +++ b/.github/workflows/workers-ee.yaml @@ -47,7 +47,7 @@ jobs: # # Getting the images to build # - git diff --name-only HEAD HEAD~1 | grep backend/services | grep -vE ^ee/ | cut -d '/' -f3 | uniq > backend/images_to_build.txt + git diff --name-only HEAD HEAD~1 | grep backend/services | cut -d '/' -f3 | uniq > backend/images_to_build.txt [[ $(cat backend/images_to_build.txt) != "" ]] || (echo "Nothing to build here"; exit 0) # # Pushing image to registry diff --git a/api/chalicelib/core/assist.py b/api/chalicelib/core/assist.py index aee8a97f5..70f563ec8 100644 --- a/api/chalicelib/core/assist.py +++ b/api/chalicelib/core/assist.py @@ -71,7 +71,18 @@ def get_live_sessions_ws(project_id): print("!! issue with the peer-server") print(connected_peers.text) return [] - live_peers = connected_peers.json().get("data", []) + try: + live_peers = connected_peers.json().get("data", []) + except Exception as e: + print("issue getting Live-Assist response") + print(str(e)) + print("expected JSON, received:") + try: + print(connected_peers.text) + except: + print("couldn't get response") + live_peers = [] + for s in live_peers: s["live"] = True s["projectId"] = project_id @@ -95,7 +106,17 @@ def is_live(project_id, session_id, project_key=None): print("!! issue with the peer-server") print(connected_peers.text) return False - connected_peers = connected_peers.json().get("data", []) + try: + connected_peers = connected_peers.json().get("data", []) + except Exception as e: + print("issue getting Assist response") + print(str(e)) + print("expected JSON, received:") + try: + print(connected_peers.text) + except: + print("couldn't get response") + return False return str(session_id) in connected_peers diff --git a/ee/utilities/servers/websocket.js b/ee/utilities/servers/websocket.js index 34f045a51..e087dba31 100644 --- a/ee/utilities/servers/websocket.js +++ b/ee/utilities/servers/websocket.js @@ -55,7 +55,7 @@ const socketsListByProject = function (req, res) { if (process.env.uws !== "true") { res.statusCode = 200; res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify()); + res.end(JSON.stringify(result)); } else { res.writeStatus('200 OK').writeHeader('Content-Type', 'application/json').end(JSON.stringify(result)); } diff --git a/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js b/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js index ec94451d7..906843394 100644 --- a/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js +++ b/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js @@ -211,9 +211,9 @@ function FunnelGraph(props) { strokeWidth={0} interval={0} tick ={{ fill: '#666', fontSize: 12 }} - xAxisId={0} + xAxisId={0} /> - '"' + val + '"'} - /> + /> */} Styles.tickFormatter(val)} /> diff --git a/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.tsx b/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.tsx index 92baa3d51..62ec51c9d 100644 --- a/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.tsx +++ b/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.tsx @@ -60,7 +60,7 @@ function FilterAutoComplete(props: Props) { .finally(() => setLoading(false)); } - const debouncedRequestValues = React.useCallback(debounce(requestValues, 300), []); + const debouncedRequestValues = React.useCallback(debounce(requestValues, 1000), []); const onInputChange = ({ target: { value } }) => { setQuery(value); diff --git a/frontend/app/components/shared/MainSearchBar/MainSearchBar.tsx b/frontend/app/components/shared/MainSearchBar/MainSearchBar.tsx index 0ed764339..e6cdbd00c 100644 --- a/frontend/app/components/shared/MainSearchBar/MainSearchBar.tsx +++ b/frontend/app/components/shared/MainSearchBar/MainSearchBar.tsx @@ -8,15 +8,16 @@ import { connect } from 'react-redux'; interface Props { clearSearch: () => void; appliedFilter: any; + optionsReady: boolean; } const MainSearchBar = (props: Props) => { - const { appliedFilter } = props; + const { appliedFilter, optionsReady } = props; const hasFilters = appliedFilter && appliedFilter.filters && appliedFilter.filters.size > 0; return (
- + {optionsReady && } { } export default connect(state => ({ appliedFilter: state.getIn(['search', 'instance']), + optionsReady: state.getIn(['customFields', 'optionsReady']) }), { clearSearch })(MainSearchBar); \ No newline at end of file diff --git a/frontend/app/duck/customField.js b/frontend/app/duck/customField.js index ad93c21c6..9a8fdcc0e 100644 --- a/frontend/app/duck/customField.js +++ b/frontend/app/duck/customField.js @@ -31,6 +31,7 @@ const initialState = Map({ list: List(), instance: CustomField(), sources: List(), + optionsReady: false }); const reducer = (state = initialState, action = {}) => { @@ -40,7 +41,8 @@ const reducer = (state = initialState, action = {}) => { addElementToFiltersMap(FilterCategory.METADATA, item.key); addElementToLiveFiltersMap(FilterCategory.METADATA, item.key); }); - return state.set('list', List(action.data).map(CustomField)) //.concat(defaultMeta)) + return state.set('list', List(action.data).map(CustomField)) + .set('optionsReady', true) //.concat(defaultMeta)) case FETCH_SOURCES_SUCCESS: return state.set('sources', List(action.data.map(({ value, ...item}) => ({label: value, key: value, ...item}))).map(CustomField)) case SAVE_SUCCESS: diff --git a/frontend/app/types/filter/newFilter.js b/frontend/app/types/filter/newFilter.js index 29cb324b1..6963643f7 100644 --- a/frontend/app/types/filter/newFilter.js +++ b/frontend/app/types/filter/newFilter.js @@ -6,6 +6,7 @@ import { capitalize } from 'App/utils'; const countryOptions = Object.keys(countries).map(i => ({ text: countries[i], value: i })); const containsFilters = [{ key: 'contains', text: 'contains', value: 'contains' }] +export const metaFilter = { key: FilterKey.METADATA, type: FilterType.MULTIPLE, category: FilterCategory.METADATA, label: 'Metadata', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/metadata' }; export const filtersMap = { // EVENTS [FilterKey.CLICK]: { key: FilterKey.CLICK, type: FilterType.MULTIPLE, category: FilterCategory.INTERACTIONS, label: 'Click', operator: 'on', operatorOptions: filterOptions.targetOperators, icon: 'filters/click', isEvent: true }, @@ -31,7 +32,6 @@ export const filtersMap = { [FilterKey.ERROR]: { key: FilterKey.ERROR, type: FilterType.MULTIPLE, category: FilterCategory.JAVASCRIPT, label: 'Error', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/error', isEvent: true }, // [FilterKey.METADATA]: { key: FilterKey.METADATA, type: FilterType.MULTIPLE, category: FilterCategory.METADATA, label: 'Metadata', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/metadata', isEvent: true }, - // FILTERS [FilterKey.USER_OS]: { key: FilterKey.USER_OS, type: FilterType.MULTIPLE, category: FilterCategory.GEAR, label: 'User OS', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/os' }, [FilterKey.USER_BROWSER]: { key: FilterKey.USER_BROWSER, type: FilterType.MULTIPLE, category: FilterCategory.GEAR, label: 'User Browser', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/browser' }, @@ -133,7 +133,11 @@ export default Record({ }) _filter = subFilterMap[type] } else { - _filter = filtersMap[type]; + if (type === FilterKey.METADATA) { + _filter = filtersMap[filter.source]; + } else { + _filter = filtersMap[type]; + } } return { ...filter, diff --git a/frontend/app/types/funnel.js b/frontend/app/types/funnel.js index 0a97cf944..d9a27e44d 100644 --- a/frontend/app/types/funnel.js +++ b/frontend/app/types/funnel.js @@ -51,8 +51,9 @@ export default Record({ } }, fromJS: ({ stages = [], filter, activeStages = null, ...rest }) => { - let _stages = stages.map(stage => { - stage.label = getRedableName(stage.type, stage.value); + let _stages = stages.map((stage, index) => { + // stage.label = getRedableName(stage.type, stage.value); + stage.label = `Step ${index + 1}`; return stage; }); @@ -70,16 +71,19 @@ export default Record({ return { ...rest, - stages: _stages.length > 0 ? _stages.map(stage => { + stages: _stages.length > 0 ? _stages.map((stage, index) => { if (!stage) return; - stage.label = getRedableName(stage); + // stage.label = getRedableName(stage); + stage.label = `Step ${index + 1}`; return stage; }) : [], affectedUsers, lostConversions, conversionImpact, - firstStage: firstStage && firstStage.label + ' ' + truncate(firstStage.value || '', 10) || '', - lastStage: lastStage && lastStage.label + ' ' + truncate(lastStage.value || '', 10) || '', + // firstStage: firstStage && firstStage.label + ' ' + truncate(firstStage.value || '', 10) || '', + // lastStage: lastStage && lastStage.label + ' ' + truncate(lastStage.value || '', 10) || '', + firstStage: firstStage && firstStage.label || '', + lastStage: lastStage && lastStage.label || '', filter: Filter(filter), sessionsCount: lastStage && lastStage.sessionsCount, stepsCount: stages ? stages.length : 0,