diff --git a/api/chalicelib/core/sessions.py b/api/chalicelib/core/sessions.py
index c095ce344..d180cccc7 100644
--- a/api/chalicelib/core/sessions.py
+++ b/api/chalicelib/core/sessions.py
@@ -197,8 +197,8 @@ def search2_pg(data: schemas.SessionsSearchPayloadSchema, project_id, user_id, f
MIN(full_sessions.start_ts) AS first_session_ts,
ROW_NUMBER() OVER (ORDER BY count(full_sessions) DESC) AS rn
FROM (SELECT *, ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY start_ts DESC) AS rn
- FROM (SELECT DISTINCT ON(s.session_id) {SESSION_PROJECTION_COLS},
- {",".join([f'metadata_{m["index"]}' for m in meta_keys])}
+ FROM (SELECT DISTINCT ON(s.session_id) {SESSION_PROJECTION_COLS}
+ {"," if len(meta_keys)>0 else ""}{",".join([f'metadata_{m["index"]}' for m in meta_keys])}
{query_part}
ORDER BY s.session_id desc) AS filtred_sessions
ORDER BY favorite DESC, issue_score DESC, {sort} {data.order}) AS full_sessions
@@ -209,8 +209,8 @@ def search2_pg(data: schemas.SessionsSearchPayloadSchema, project_id, user_id, f
meta_keys = metadata.get(project_id=project_id)
main_query = cur.mogrify(f"""SELECT COUNT(full_sessions) AS count, COALESCE(JSONB_AGG(full_sessions) FILTER (WHERE rn <= 200), '[]'::JSONB) AS sessions
FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY favorite DESC, issue_score DESC, session_id desc, start_ts desc) AS rn
- FROM (SELECT DISTINCT ON(s.session_id) {SESSION_PROJECTION_COLS},
- {",".join([f'metadata_{m["index"]}' for m in meta_keys])}
+ FROM (SELECT DISTINCT ON(s.session_id) {SESSION_PROJECTION_COLS}
+ {"," if len(meta_keys)>0 else ""}{",".join([f'metadata_{m["index"]}' for m in meta_keys])}
{query_part}
ORDER BY s.session_id desc) AS filtred_sessions
ORDER BY favorite DESC, issue_score DESC, {sort} {data.order}) AS full_sessions;""",
diff --git a/ee/scripts/helm/db/init_dbs/postgresql/1.5.2/1.5.2.sql b/ee/scripts/helm/db/init_dbs/postgresql/1.5.2/1.5.2.sql
new file mode 100644
index 000000000..8ec804b02
--- /dev/null
+++ b/ee/scripts/helm/db/init_dbs/postgresql/1.5.2/1.5.2.sql
@@ -0,0 +1,8 @@
+BEGIN;
+CREATE OR REPLACE FUNCTION openreplay_version()
+ RETURNS text AS
+$$
+SELECT 'v1.5.2-ee'
+$$ LANGUAGE sql IMMUTABLE;
+
+COMMIT;
\ No newline at end of file
diff --git a/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql b/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql
index a6ceddf35..b64376d10 100644
--- a/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql
+++ b/ee/scripts/helm/db/init_dbs/postgresql/init_schema.sql
@@ -7,7 +7,7 @@ CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE OR REPLACE FUNCTION openreplay_version()
RETURNS text AS
$$
-SELECT 'v1.5.1-ee'
+SELECT 'v1.5.2-ee'
$$ LANGUAGE sql IMMUTABLE;
diff --git a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx
index 2d7a7baf1..58eadd472 100644
--- a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx
+++ b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx
@@ -91,12 +91,6 @@ function AssistActions({ toggleChatWindow, userId, calling, peerConnectionStatus
onClick={ requestReleaseRemoteControl }
role="button"
>
- {/*
- { 'Remote Control' } */}
@@ -112,12 +106,6 @@ function AssistActions({ toggleChatWindow, userId, calling, peerConnectionStatus
onClick={ onCall ? callObject?.end : confirmCall}
role="button"
>
- {/*
- { onCall ? 'End Call' : 'Call' } */}
}
diff --git a/frontend/app/components/Session/LivePlayer.js b/frontend/app/components/Session/LivePlayer.js
index ef4bda5ae..3d408866a 100644
--- a/frontend/app/components/Session/LivePlayer.js
+++ b/frontend/app/components/Session/LivePlayer.js
@@ -60,14 +60,14 @@ export default withRequest({
loadingName: 'loadingCredentials',
})(withPermissions(['ASSIST_LIVE'], '', true)(connect(
state => {
- const isAssist = state.getIn(['sessions', 'activeTab']).type === 'live';
- const hasSessioPath = state.getIn([ 'sessions', 'sessionPath' ]).includes('/sessions');
+ // const isAssist = state.getIn(['sessions', 'activeTab']).type === 'live';
+ // const hasSessioPath = state.getIn([ 'sessions', 'sessionPath' ]).includes('/sessions');
return {
session: state.getIn([ 'sessions', 'current' ]),
showAssist: state.getIn([ 'sessions', 'showChatWindow' ]),
jwt: state.get('jwt'),
fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
- hasSessionsPath: hasSessioPath && !isAssist,
+ // hasSessionsPath: hasSessioPath && !isAssist,
isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
hasErrors: !!state.getIn([ 'sessions', 'errors' ]),
}
diff --git a/frontend/app/components/Session_/Player/Controls/Controls.js b/frontend/app/components/Session_/Player/Controls/Controls.js
index 464165e69..22fd3b0cf 100644
--- a/frontend/app/components/Session_/Player/Controls/Controls.js
+++ b/frontend/app/components/Session_/Player/Controls/Controls.js
@@ -106,7 +106,7 @@ function getStorageName(type) {
bottomBlock: state.getIn([ 'components', 'player', 'bottomBlock' ]),
showStorage: props.showStorage || !state.getIn(['components', 'player', 'hiddenHints', 'storage']),
showStack: props.showStack || !state.getIn(['components', 'player', 'hiddenHints', 'stack']),
- closedLive: !!state.getIn([ 'sessions', 'errors' ]),
+ closedLive: !!state.getIn([ 'sessions', 'errors' ]) || !state.getIn([ 'sessions', 'current', 'live' ]),
}
}, {
fullscreenOn,
diff --git a/frontend/app/components/Session_/Player/Player.js b/frontend/app/components/Session_/Player/Player.js
index a3a6e3b1a..0f0b51786 100644
--- a/frontend/app/components/Session_/Player/Player.js
+++ b/frontend/app/components/Session_/Player/Player.js
@@ -13,11 +13,14 @@ import EventsToggleButton from '../../Session/EventsToggleButton';
@connectPlayer(state => ({
live: state.live,
}))
-@connect(state => ({
- fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
- nextId: state.getIn([ 'sessions', 'nextId' ]),
- closedLive: !!state.getIn([ 'sessions', 'errors' ]),
-}), {
+@connect(state => {
+ const isAssist = window.location.pathname.includes('/assist/');
+ return {
+ fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
+ nextId: state.getIn([ 'sessions', 'nextId' ]),
+ closedLive: !!state.getIn([ 'sessions', 'errors' ]) || (isAssist && !state.getIn([ 'sessions', 'current', 'live' ])),
+ }
+}, {
hideTargetDefiner,
fullscreenOff,
})
diff --git a/frontend/app/components/Session_/PlayerBlock.js b/frontend/app/components/Session_/PlayerBlock.js
index dec170e57..ab95c11fd 100644
--- a/frontend/app/components/Session_/PlayerBlock.js
+++ b/frontend/app/components/Session_/PlayerBlock.js
@@ -33,7 +33,6 @@ import styles from './playerBlock.css';
@connect(state => ({
fullscreen: state.getIn([ 'components', 'player', 'fullscreen' ]),
bottomBlock: state.getIn([ 'components', 'player', 'bottomBlock' ]),
- closedLive: !!state.getIn([ 'sessions', 'errors' ]),
}))
export default class PlayerBlock extends React.PureComponent {
componentDidUpdate(prevProps) {
@@ -44,14 +43,13 @@ export default class PlayerBlock extends React.PureComponent {
}
render() {
- const { fullscreen, bottomBlock, closedLive } = this.props;
+ const { fullscreen, bottomBlock } = this.props;
return (
{ !fullscreen && !!bottomBlock &&
diff --git a/frontend/app/components/Session_/PlayerBlockHeader.js b/frontend/app/components/Session_/PlayerBlockHeader.js
index e0883cc59..1a0735f5f 100644
--- a/frontend/app/components/Session_/PlayerBlockHeader.js
+++ b/frontend/app/components/Session_/PlayerBlockHeader.js
@@ -29,10 +29,11 @@ const ASSIST_ROUTE = assistRoute();
loading: state.cssLoading || state.messagesLoading,
}))
@connect((state, props) => {
- const isAssist = state.getIn(['sessions', 'activeTab']).type === 'live';
+ const isAssist = window.location.pathname.includes('/assist/');
const hasSessioPath = state.getIn([ 'sessions', 'sessionPath' ]).includes('/sessions');
+ const session = state.getIn([ 'sessions', 'current' ]);
return {
- session: state.getIn([ 'sessions', 'current' ]),
+ session,
sessionPath: state.getIn([ 'sessions', 'sessionPath' ]),
loading: state.getIn([ 'sessions', 'toggleFavoriteRequest', 'loading' ]),
disabled: state.getIn([ 'components', 'targetDefiner', 'inspectorMode' ]) || props.loading,
@@ -43,7 +44,7 @@ const ASSIST_ROUTE = assistRoute();
siteId: state.getIn([ 'user', 'siteId' ]),
hasSessionsPath: hasSessioPath && !isAssist,
metaList: state.getIn(['customFields', 'list']).map(i => i.key),
- closedLive: !!state.getIn([ 'sessions', 'errors' ]),
+ closedLive: !!state.getIn([ 'sessions', 'errors' ]) || (isAssist && !session.live),
}
}, {
toggleFavorite, fetchListIntegration, setSessionPath
diff --git a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx
index d6325ea00..8ffd256bd 100644
--- a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx
+++ b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx
@@ -13,6 +13,7 @@ import DropdownPlain from 'Shared/DropdownPlain';
import SortOrderButton from 'Shared/SortOrderButton';
import { TimezoneDropdown } from 'UI';
import { capitalize } from 'App/utils';
+import LiveSessionReloadButton from 'Shared/LiveSessionReloadButton';
const AUTOREFRESH_INTERVAL = .5 * 60 * 1000
const PER_PAGE = 20;
@@ -107,8 +108,6 @@ function LiveSessionList(props: Props) {
}, AUTOREFRESH_INTERVAL);
}
- console.log('srt', sort)
-
return (
@@ -117,6 +116,8 @@ function LiveSessionList(props: Props) {
Live Sessions
{sessions.size}
+
+
diff --git a/frontend/app/components/shared/LiveSessionReloadButton/LiveSessionReloadButton.tsx b/frontend/app/components/shared/LiveSessionReloadButton/LiveSessionReloadButton.tsx
new file mode 100644
index 000000000..ab47fc054
--- /dev/null
+++ b/frontend/app/components/shared/LiveSessionReloadButton/LiveSessionReloadButton.tsx
@@ -0,0 +1,19 @@
+import React from 'react'
+import ReloadButton from '../ReloadButton'
+import { connect } from 'react-redux'
+import { fetchLiveList } from 'Duck/sessions'
+
+interface Props {
+ loading: boolean
+ fetchLiveList: typeof fetchLiveList
+}
+function LiveSessionReloadButton(props: Props) {
+ const { loading } = props
+ return (
+
+ )
+}
+
+export default connect(state => ({
+ loading: state.getIn([ 'sessions', 'fetchLiveListRequest', 'loading' ]),
+}), { fetchLiveList })(LiveSessionReloadButton)
diff --git a/frontend/app/components/shared/LiveSessionReloadButton/index.ts b/frontend/app/components/shared/LiveSessionReloadButton/index.ts
new file mode 100644
index 000000000..59b517a52
--- /dev/null
+++ b/frontend/app/components/shared/LiveSessionReloadButton/index.ts
@@ -0,0 +1 @@
+export { default } from './LiveSessionReloadButton';
\ No newline at end of file
diff --git a/frontend/app/components/shared/ReloadButton/ReloadButton.tsx b/frontend/app/components/shared/ReloadButton/ReloadButton.tsx
new file mode 100644
index 000000000..8ae36a8f1
--- /dev/null
+++ b/frontend/app/components/shared/ReloadButton/ReloadButton.tsx
@@ -0,0 +1,22 @@
+import React from 'react'
+import { CircularLoader, Icon } from 'UI'
+import cn from 'classnames'
+
+interface Props {
+ loading?: boolean
+ onClick: () => void
+ iconSize?: number
+ iconName?: string
+ className?: string
+}
+export default function ReloadButton(props: Props) {
+ const { loading, onClick, iconSize = "14", iconName = "sync-alt", className = '' } = props
+ return (
+
+ { loading ? : }
+
+ )
+}
diff --git a/frontend/app/components/shared/ReloadButton/index.ts b/frontend/app/components/shared/ReloadButton/index.ts
new file mode 100644
index 000000000..cc431c632
--- /dev/null
+++ b/frontend/app/components/shared/ReloadButton/index.ts
@@ -0,0 +1 @@
+export { default } from './ReloadButton';
\ No newline at end of file
diff --git a/frontend/app/player/MessageDistributor/managers/AssistManager.ts b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
index 51895b327..908add195 100644
--- a/frontend/app/player/MessageDistributor/managers/AssistManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
@@ -171,7 +171,8 @@ export default class AssistManager {
this.setStatus(ConnectionStatus.Disconnected)
}, 12000)
- if (getState().remoteControl === RemoteControlStatus.Requesting) {
+ if (getState().remoteControl === RemoteControlStatus.Requesting ||
+ getState().remoteControl === RemoteControlStatus.Enabled) {
this.toggleRemoteControl(false)
}
diff --git a/scripts/helm/db/init_dbs/postgresql/1.5.2/1.5.2.sql b/scripts/helm/db/init_dbs/postgresql/1.5.2/1.5.2.sql
new file mode 100644
index 000000000..f4e26f93a
--- /dev/null
+++ b/scripts/helm/db/init_dbs/postgresql/1.5.2/1.5.2.sql
@@ -0,0 +1,8 @@
+BEGIN;
+CREATE OR REPLACE FUNCTION openreplay_version()
+ RETURNS text AS
+$$
+SELECT 'v1.5.2'
+$$ LANGUAGE sql IMMUTABLE;
+
+COMMIT;
\ No newline at end of file
diff --git a/scripts/helm/db/init_dbs/postgresql/init_schema.sql b/scripts/helm/db/init_dbs/postgresql/init_schema.sql
index 3d05795e9..e053063c2 100644
--- a/scripts/helm/db/init_dbs/postgresql/init_schema.sql
+++ b/scripts/helm/db/init_dbs/postgresql/init_schema.sql
@@ -6,7 +6,7 @@ CREATE SCHEMA IF NOT EXISTS events;
CREATE OR REPLACE FUNCTION openreplay_version()
RETURNS text AS
$$
-SELECT 'v1.5.1'
+SELECT 'v1.5.2'
$$ LANGUAGE sql IMMUTABLE;
-- --- accounts.sql ---