Merge branch 'main' of github.com:openreplay/openreplay into pagination
This commit is contained in:
commit
4807d980f9
9 changed files with 52 additions and 19 deletions
2
.github/workflows/workers-ee.yaml
vendored
2
.github/workflows/workers-ee.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,9 +211,9 @@ function FunnelGraph(props) {
|
|||
strokeWidth={0}
|
||||
interval={0}
|
||||
tick ={{ fill: '#666', fontSize: 12 }}
|
||||
xAxisId={0}
|
||||
xAxisId={0}
|
||||
/>
|
||||
<XAxis
|
||||
{/* <XAxis
|
||||
stroke={0}
|
||||
xAxisId={1}
|
||||
dataKey="value"
|
||||
|
|
@ -222,7 +222,7 @@ function FunnelGraph(props) {
|
|||
dy={-15} dx={0}
|
||||
tick ={{ fill: '#666', fontSize: 12 }}
|
||||
tickFormatter={val => '"' + val + '"'}
|
||||
/>
|
||||
/> */}
|
||||
<YAxis interval={ 0 } strokeWidth={0} tick ={{ fill: '#999999', fontSize: 11 }} tickFormatter={val => Styles.tickFormatter(val)} />
|
||||
</BarChart>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<div className="flex items-center">
|
||||
<div style={{ width: "60%", marginRight: "10px"}}><SessionSearchField /></div>
|
||||
<div className="flex items-center" style={{ width: "40%"}}>
|
||||
<SavedSearch />
|
||||
{optionsReady && <SavedSearch /> }
|
||||
<Popup
|
||||
trigger={
|
||||
<Button
|
||||
|
|
@ -39,4 +40,5 @@ const MainSearchBar = (props: Props) => {
|
|||
}
|
||||
export default connect(state => ({
|
||||
appliedFilter: state.getIn(['search', 'instance']),
|
||||
optionsReady: state.getIn(['customFields', 'optionsReady'])
|
||||
}), { clearSearch })(MainSearchBar);
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue