From 7cc3f144279217860dccf664b8e7da56aa61c2ca Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Fri, 15 Apr 2022 16:09:37 +0200
Subject: [PATCH 01/65] Update frontend.yaml
---
.github/workflows/frontend.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml
index c0a540efb..990ce3c8a 100644
--- a/.github/workflows/frontend.yaml
+++ b/.github/workflows/frontend.yaml
@@ -3,7 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- - api-v1.5.5
+ - dev
paths:
- frontend/**
From 45c59b22af77ef60fda81a0283618c801685c277 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Tue, 26 Apr 2022 11:52:33 +0200
Subject: [PATCH 02/65] Update vars.yaml
---
scripts/helmcharts/vars.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml
index 5cc50af13..825619208 100644
--- a/scripts/helmcharts/vars.yaml
+++ b/scripts/helmcharts/vars.yaml
@@ -28,7 +28,6 @@ kafka: &kafka
kafkaUseSsl: "false"
redis: &redis
- # For enterpriseEdition
# enabled: false
redisHost: "redis-master.db.svc.cluster.local"
redisPort: "6379"
From 5b8eddc0e12078df4fcfe0ab863564573e0f03e8 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Tue, 26 Apr 2022 12:44:07 +0200
Subject: [PATCH 03/65] feat(assist): fixed geoip-unknown ip
---
utilities/servers/websocket.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/utilities/servers/websocket.js b/utilities/servers/websocket.js
index 2d5b6fc4e..d2399477e 100644
--- a/utilities/servers/websocket.js
+++ b/utilities/servers/websocket.js
@@ -220,8 +220,13 @@ function extractSessionInfo(socket) {
socket.handshake.query.sessionInfo.userCountry = null;
if (geoip() !== null) {
debug && console.log(`looking for location of ${socket.handshake.headers['x-forwarded-for'] || socket.handshake.address}`);
- let country = geoip().country(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address);
- socket.handshake.query.sessionInfo.userCountry = country.country.isoCode;
+ try {
+ let country = geoip().country(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address);
+ socket.handshake.query.sessionInfo.userCountry = country.country.isoCode;
+ } catch (e) {
+ debug && console.log("geoip-country failed");
+ debug && console.log(e);
+ }
}
}
}
From 6cacc4ef52385cd9400a85f07b3ae1eca3b8a59c Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Tue, 26 Apr 2022 12:47:18 +0200
Subject: [PATCH 04/65] feat(assist): EE fixed geoip-unknown ip
---
ee/utilities/servers/websocket-cluster.js | 9 +++++++--
ee/utilities/servers/websocket.js | 9 +++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ee/utilities/servers/websocket-cluster.js b/ee/utilities/servers/websocket-cluster.js
index 904aaea17..0b8a56699 100644
--- a/ee/utilities/servers/websocket-cluster.js
+++ b/ee/utilities/servers/websocket-cluster.js
@@ -270,8 +270,13 @@ function extractSessionInfo(socket) {
socket.handshake.query.sessionInfo.userCountry = null;
if (geoip() !== null) {
debug && console.log(`looking for location of ${socket.handshake.headers['x-forwarded-for'] || socket.handshake.address}`);
- let country = geoip().country(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address);
- socket.handshake.query.sessionInfo.userCountry = country.country.isoCode;
+ try {
+ let country = geoip().country(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address);
+ socket.handshake.query.sessionInfo.userCountry = country.country.isoCode;
+ } catch (e) {
+ debug && console.log("geoip-country failed");
+ debug && console.log(e);
+ }
}
}
}
diff --git a/ee/utilities/servers/websocket.js b/ee/utilities/servers/websocket.js
index a20f23078..51fa4cc41 100644
--- a/ee/utilities/servers/websocket.js
+++ b/ee/utilities/servers/websocket.js
@@ -249,8 +249,13 @@ function extractSessionInfo(socket) {
socket.handshake.query.sessionInfo.userCountry = null;
if (geoip() !== null) {
debug && console.log(`looking for location of ${socket.handshake.headers['x-forwarded-for'] || socket.handshake.address}`);
- let country = geoip().country(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address);
- socket.handshake.query.sessionInfo.userCountry = country.country.isoCode;
+ try {
+ let country = geoip().country(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address);
+ socket.handshake.query.sessionInfo.userCountry = country.country.isoCode;
+ } catch (e) {
+ debug && console.log("geoip-country failed");
+ debug && console.log(e);
+ }
}
}
}
From 7b7eefe8f5114599cf391c52e72d4eb1b62d3ce0 Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Tue, 26 Apr 2022 17:05:02 +0200
Subject: [PATCH 05/65] fix(nginx): proper x-forward-for proxying
Signed-off-by: rjshrjndrn
---
scripts/helmcharts/vars.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml
index 825619208..5c02f57f0 100644
--- a/scripts/helmcharts/vars.yaml
+++ b/scripts/helmcharts/vars.yaml
@@ -54,7 +54,6 @@ ingress-nginx: &ingress-nginx
default-ssl-certificate: "app/openreplay-ssl"
config:
enable-real-ip: true
- forwarded-for-header: "proxy_protocol"
# Ref: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#max-worker-connections
max-worker-connections: 0
# SSL redirection
From c3869c9f18c4ac8592759d4ac6d6d8a7d1423b13 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Wed, 27 Apr 2022 17:42:20 +0200
Subject: [PATCH 06/65] change(ui) - redirect to the created dashboard
---
.../components/DashboardModal/DashboardModal.tsx | 11 ++++++-----
.../DashboardSideMenu/DashboardSideMenu.tsx | 2 +-
.../components/WidgetWrapper/WidgetWrapper.tsx | 4 ++--
frontend/app/mstore/dashboardStore.ts | 16 ++++++++++------
4 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx b/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
index 575cb7de8..055833ee7 100644
--- a/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
@@ -6,7 +6,7 @@ import { Button } from 'UI';
import { withRouter } from 'react-router-dom';
import { useStore } from 'App/mstore';
import { useModal } from 'App/components/Modal';
-import { dashboardMetricCreate, withSiteId } from 'App/routes';
+import { dashboardMetricCreate, withSiteId, dashboardSelected } from 'App/routes';
interface Props {
history: any
@@ -22,10 +22,11 @@ function DashboardModal(props) {
const loading = useObserver(() => dashboardStore.isSaving);
const onSave = () => {
- dashboardStore.save(dashboard).then(hideModal).then(() => {
- if (dashboard.exists()) {
- dashboardStore.fetch(dashboard.dashboardId)
- }
+ dashboardStore.save(dashboard).then((_dashboard: any) => {
+ hideModal();
+ dashboardStore.selectDashboardById(_dashboard.dashboardId).then(() => {
+ history.push(withSiteId(dashboardSelected(_dashboard.dashboardId), siteId));
+ });
})
}
diff --git a/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx b/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx
index 9dd64733c..ea6191062 100644
--- a/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardSideMenu/DashboardSideMenu.tsx
@@ -40,7 +40,7 @@ function DashboardSideMenu(props: Props) {
const onAddDashboardClick = (e) => {
dashboardStore.initDashboard();
- showModal(, {})
+ showModal(, {})
}
const togglePinned = (dashboard) => {
diff --git a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx
index b29ab800c..589d0c084 100644
--- a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx
+++ b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx
@@ -118,11 +118,11 @@ function WidgetWrapper(props: Props) {
)}
-
+ {/* */}
-
+ {/* */}
));
}
diff --git a/frontend/app/mstore/dashboardStore.ts b/frontend/app/mstore/dashboardStore.ts
index 56c92e4b9..65dcaf82b 100644
--- a/frontend/app/mstore/dashboardStore.ts
+++ b/frontend/app/mstore/dashboardStore.ts
@@ -55,7 +55,7 @@ export interface IDashboardSotre {
getDashboard(dashboardId: string): IDashboard|null
getDashboardCount(): void
updateDashboard(dashboard: IDashboard): void
- selectDashboardById(dashboardId: string): void
+ selectDashboardById(dashboardId: string): Promise
setSiteId(siteId: any): void
selectDefaultDashboard(): Promise
@@ -219,14 +219,15 @@ export default class DashboardStore implements IDashboardSotre {
return new Promise((resolve, reject) => {
dashboardService.saveDashboard(dashboard).then(_dashboard => {
runInAction(() => {
+ const newDashboard = new Dashboard().fromJson(_dashboard)
if (isCreating) {
toast.success('Dashboard created successfully')
- this.addDashboard(new Dashboard().fromJson(_dashboard))
+ this.addDashboard(newDashboard)
} else {
toast.success('Dashboard updated successfully')
- this.updateDashboard(new Dashboard().fromJson(_dashboard))
+ this.updateDashboard(newDashboard)
}
- resolve(_dashboard)
+ resolve(newDashboard)
})
}).catch(error => {
toast.error('Error saving dashboard')
@@ -321,8 +322,11 @@ export default class DashboardStore implements IDashboardSotre {
}
}
- selectDashboardById = (dashboardId: any) => {
- this.selectedDashboard = this.dashboards.find(d => d.dashboardId == dashboardId) || new Dashboard();
+ selectDashboardById(dashboardId: any): Promise {
+ return new Promise((resolve, reject) => {
+ this.selectedDashboard = this.dashboards.find(d => d.dashboardId == dashboardId) || new Dashboard();
+ resolve(this.selectedDashboard)
+ })
// if (this.selectedDashboard.dashboardId) {
// this.fetch(this.selectedDashboard.dashboardId)
// }
From ea964d45fac37b27b37aa712a73cfc3d447a8f44 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Wed, 27 Apr 2022 18:01:46 +0200
Subject: [PATCH 07/65] fix(ui) - filter subfilters error
---
frontend/app/mstore/types/filterItem.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/frontend/app/mstore/types/filterItem.ts b/frontend/app/mstore/types/filterItem.ts
index 00b2a6fdc..c88d07db5 100644
--- a/frontend/app/mstore/types/filterItem.ts
+++ b/frontend/app/mstore/types/filterItem.ts
@@ -27,6 +27,12 @@ export default class FilterItem {
merge: action
})
+ if (Array.isArray(data.filters)) {
+ data.filters = data.filters.map(function (i) {
+ return new FilterItem(i);
+ });
+ }
+
this.merge(data)
}
From b6716e833d6ca5aa9bd7c8ede3547aff7bbc5e7e Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Thu, 28 Apr 2022 14:07:28 +0200
Subject: [PATCH 08/65] feat(api): EE fixed No of pages count widget
---
ee/api/chalicelib/core/metrics.py | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/ee/api/chalicelib/core/metrics.py b/ee/api/chalicelib/core/metrics.py
index 65889e28d..31b9c3985 100644
--- a/ee/api/chalicelib/core/metrics.py
+++ b/ee/api/chalicelib/core/metrics.py
@@ -2465,13 +2465,15 @@ def get_user_activity_avg_visited_pages(project_id, startTimestamp=TimeUTC.now(d
def __get_user_activity_avg_visited_pages(ch, project_id, startTimestamp, endTimestamp, **args):
- ch_sub_query = __get_basic_constraints(table_name="sessions", data=args)
+ ch_sub_query = __get_basic_constraints(table_name="pages", data=args)
meta_condition = __get_meta_constraint(args)
ch_sub_query += meta_condition
- ch_sub_query.append("sessions.pages_count>0")
- ch_query = f"""SELECT COALESCE(CEIL(avgOrNull(sessions.pages_count)),0) AS value
- FROM sessions {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""}
- WHERE {" AND ".join(ch_sub_query)};"""
+
+ ch_query = f"""SELECT COALESCE(CEIL(avgOrNull(count)),0) AS value
+ FROM (SELECT COUNT(session_id) AS count
+ FROM pages {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""}
+ WHERE {" AND ".join(ch_sub_query)}) AS groupped_data
+ WHERE count>0;"""
params = {"project_id": project_id, "startTimestamp": startTimestamp, "endTimestamp": endTimestamp,
**__get_constraint_values(args)}
@@ -2482,19 +2484,22 @@ def __get_user_activity_avg_visited_pages(ch, project_id, startTimestamp, endTim
def __get_user_activity_avg_visited_pages_chart(ch, project_id, startTimestamp, endTimestamp, density=20, **args):
step_size = __get_step_size(endTimestamp=endTimestamp, startTimestamp=startTimestamp, density=density)
- ch_sub_query_chart = __get_basic_constraints(table_name="sessions", round_start=True, data=args)
+ ch_sub_query_chart = __get_basic_constraints(table_name="pages", round_start=True, data=args)
meta_condition = __get_meta_constraint(args)
ch_sub_query_chart += meta_condition
params = {"step_size": step_size, "project_id": project_id, "startTimestamp": startTimestamp,
"endTimestamp": endTimestamp}
- ch_sub_query_chart.append("sessions.pages_count>0")
- ch_query = f"""SELECT toUnixTimestamp(toStartOfInterval(sessions.datetime, INTERVAL %(step_size)s second ))*1000 AS timestamp,
- COALESCE(avgOrNull(sessions.pages_count),0) AS value
- FROM sessions {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""}
- WHERE {" AND ".join(ch_sub_query_chart)}
- GROUP BY timestamp
- ORDER BY timestamp;"""
+ ch_query = f"""SELECT timestamp, COALESCE(avgOrNull(count), 0) AS value
+ FROM (SELECT toUnixTimestamp(toStartOfInterval(pages.datetime, INTERVAL %(step_size)s second ))*1000 AS timestamp,
+ session_id, COUNT(pages.session_id) AS count
+ FROM pages {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""}
+ WHERE {" AND ".join(ch_sub_query_chart)}
+ GROUP BY timestamp,session_id
+ ORDER BY timestamp) AS groupped_data
+ WHERE count>0
+ GROUP BY timestamp
+ ORDER BY timestamp;"""
rows = ch.execute(query=ch_query, params={**params, **__get_constraint_values(args)})
rows = __complete_missing_steps(rows=rows, start_time=startTimestamp,
end_time=endTimestamp,
From b473f5e4257255b391d1ff8a4ea86235cb429b1c Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Thu, 28 Apr 2022 14:59:05 +0200
Subject: [PATCH 09/65] feat(api): EE fixed No of pages count widget
---
ee/api/chalicelib/core/metrics.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ee/api/chalicelib/core/metrics.py b/ee/api/chalicelib/core/metrics.py
index 31b9c3985..668ce4760 100644
--- a/ee/api/chalicelib/core/metrics.py
+++ b/ee/api/chalicelib/core/metrics.py
@@ -2472,7 +2472,8 @@ def __get_user_activity_avg_visited_pages(ch, project_id, startTimestamp, endTim
ch_query = f"""SELECT COALESCE(CEIL(avgOrNull(count)),0) AS value
FROM (SELECT COUNT(session_id) AS count
FROM pages {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""}
- WHERE {" AND ".join(ch_sub_query)}) AS groupped_data
+ WHERE {" AND ".join(ch_sub_query)}
+ GROUP BY session_id) AS groupped_data
WHERE count>0;"""
params = {"project_id": project_id, "startTimestamp": startTimestamp, "endTimestamp": endTimestamp,
**__get_constraint_values(args)}
From b544544492378d3b969ebb0fc09e239aca7611fd Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 28 Apr 2022 15:50:36 +0200
Subject: [PATCH 10/65] Update cacher.go
---
backend/services/assets/cacher/cacher.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/services/assets/cacher/cacher.go b/backend/services/assets/cacher/cacher.go
index 70ea31928..c493470dd 100644
--- a/backend/services/assets/cacher/cacher.go
+++ b/backend/services/assets/cacher/cacher.go
@@ -61,7 +61,7 @@ func (c *cacher) cacheURL(requestURL string, sessionID uint64, depth byte, conte
}
req, _ := http.NewRequest("GET", requestURL, nil)
- req.Header.Set("Cookie", "ABv=3;") // Hack for rueducommerce
+ req.Header.Set("Cookie", "ABv=3;")
req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0")
res, err := c.httpClient.Do(req)
if err != nil {
@@ -92,7 +92,7 @@ func (c *cacher) cacheURL(requestURL string, sessionID uint64, depth byte, conte
strData := string(data)
if isCSS {
- strData = c.rewriter.RewriteCSS(sessionID, requestURL, strData) // TODO: one method for reqrite and return list
+ strData = c.rewriter.RewriteCSS(sessionID, requestURL, strData) // TODO: one method for rewrite and return list
}
// TODO: implement in streams
From 156eb5dd26ac44d93d8d1f4d63f070a4be40c52e Mon Sep 17 00:00:00 2001
From: ShiKhu
Date: Thu, 28 Apr 2022 17:12:40 +0200
Subject: [PATCH 11/65] fix(frontend-player): use as root inside iframes
---
frontend/app/player/MessageDistributor/managers/DOMManager.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/app/player/MessageDistributor/managers/DOMManager.ts b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
index 685a34f2c..df8ab4077 100644
--- a/frontend/app/player/MessageDistributor/managers/DOMManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
@@ -271,7 +271,7 @@ export default class DOMManager extends ListWalker {
logger.warn("No iframe doc", msg, node, node.contentDocument);
return;
}
- this.nl[ msg.id ] = doc
+ this.nl[ msg.id ] = doc.documentElement
return;
} else if (node instanceof Element) { // shadow DOM
try {
From ce4b165d11cf6d8f347c438136be31c8537b6718 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Thu, 28 Apr 2022 18:09:39 +0200
Subject: [PATCH 12/65] fix(ui) - funnels sub filters issue
---
frontend/app/types/filter/filter.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/app/types/filter/filter.js b/frontend/app/types/filter/filter.js
index 9566c9d4b..819d17e78 100644
--- a/frontend/app/types/filter/filter.js
+++ b/frontend/app/types/filter/filter.js
@@ -99,7 +99,7 @@ export default Record({
filters: List(filters)
.map(i => {
const filter = NewFilter(i).toData();
- if (i.hasOwnProperty('filters')) {
+ if (Array.isArray(i.filters)) {
filter.filters = i.filters.map(f => NewFilter({...f, subFilter: i.type}).toData());
}
return filter;
From 6b35a05e138b37043777188978191d509cac5800 Mon Sep 17 00:00:00 2001
From: Kraiem Taha Yassine
Date: Fri, 29 Apr 2022 11:29:30 +0200
Subject: [PATCH 13/65] changed api-action-branch
---
.github/workflows/api.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml
index 9fe8c5611..6f0bb8f5e 100644
--- a/.github/workflows/api.yaml
+++ b/.github/workflows/api.yaml
@@ -3,7 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- - api-v1.5.5
+ - api-v1.6.1
paths:
- api/**
From 2a8cb4afbc893a94bf741cebe379590072978729 Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Fri, 29 Apr 2022 11:58:07 +0200
Subject: [PATCH 14/65] chore(vagrant): Adding development readme
Signed-off-by: rjshrjndrn
---
api/development.md | 43 ++++++++++++++++++++++++
backend/development.md | 21 ++++++++++++
frontend/development.md | 23 +++++++++++++
scripts/vagrant/README.md | 69 +++++++++++++++++++++++++++++++++++++++
4 files changed, 156 insertions(+)
create mode 100644 api/development.md
create mode 100644 backend/development.md
create mode 100644 frontend/development.md
create mode 100644 scripts/vagrant/README.md
diff --git a/api/development.md b/api/development.md
new file mode 100644
index 000000000..116518604
--- /dev/null
+++ b/api/development.md
@@ -0,0 +1,43 @@
+### Prerequisites
+
+- [Vagrant](../scripts/vagrant/README.md)
+- Python 3.9
+- Pipenv
+
+### Development environment
+
+```bash
+**FOSS:**
+cd openreplay/api
+# Make your own copy of .env file and edit it as you want
+cp .env.dev .env
+
+# Create a .venv folder to contain all you dependencies
+mkdir .venv
+
+# Installing dependencies (pipenv will detect the .venv folder and use it as a target)
+pipenv install -r requirements.txt [--skip-lock]
+
+# Create a .venv folder to contain all you dependencies
+mkdir .venv
+
+# Installing dependencies (pipenv will detect the .venv folder and use it as a target)
+pipenv install -r requirements.txt [--skip-lock]
+
+# These commands must bu used everytime you make changes to FOSS.
+# To clean the unused files before getting new ones
+bash clean.sh
+# To copy commun files from FOSS
+bash prepare-dev.sh
+```
+
+### Building and deploying locally
+
+```bash
+cd openreplay-contributions
+vagrant ssh
+cd openreplay-dev/openreplay/scripts/helmcharts
+# For complete list of options
+# bash local_deploy.sh help
+bash local_deploy.sh api
+```
diff --git a/backend/development.md b/backend/development.md
new file mode 100644
index 000000000..0e7295c8b
--- /dev/null
+++ b/backend/development.md
@@ -0,0 +1,21 @@
+### Prerequisites
+
+- [Vagrant](../scripts/vagrant/README.md)
+
+### Development environment
+
+```bash
+docker build -f Dockerfile.bundle .
+
+```
+
+### Building and deploying locally
+
+```bash
+cd openreplay-contributions
+vagrant ssh
+cd openreplay-dev/openreplay/scripts/helmcharts
+# For complete list of options
+# bash local_deploy.sh help
+bash local_deploy.sh
+```
diff --git a/frontend/development.md b/frontend/development.md
new file mode 100644
index 000000000..904c85f46
--- /dev/null
+++ b/frontend/development.md
@@ -0,0 +1,23 @@
+### Prerequisites
+
+- [Vagrant](../scripts/vagrant/README.md)
+- Node Version 17
+- npm
+
+### Development environment
+
+```bash
+cd openreplay/frontend
+# Change endpoints to local openreplay installation
+sed -i 's#PRODUCTION: true#PRODUCTION: false#g' env.js
+sed -i "s#API_EDP: .*#API_EDP: 'http://openreplay.local/api',#g" env.js
+sed -i "s#ASSETS_HOST: .*#ASSETS_HOST: 'http://openreplay.local/assets',#g" env.js
+
+# Installing dependencies
+npm install
+
+# Generating assets
+npm run gen:css-types
+npm run gen:icons
+npm run gen:colors
+```
diff --git a/scripts/vagrant/README.md b/scripts/vagrant/README.md
new file mode 100644
index 000000000..ffe132c73
--- /dev/null
+++ b/scripts/vagrant/README.md
@@ -0,0 +1,69 @@
+
+
+### Installation
+
+- Vagrant: [https://www.vagrantup.com/downloads](https://www.vagrantup.com/downloads)
+- VirtualBox: [https://www.virtualbox.org/wiki/Downloads](https://www.virtualbox.org/wiki/Downloads)
+
+### Configuration
+
+```bash
+mkdir openreplay-contributions
+cd openreplay-contributions
+git clone https://github.com/openreplay/openreplay -b dev
+cp -rf openreplay/scripts/vagrant/ .
+vagrant up
+```
+
+### To access OpenReplay instance
+
+```bash
+Add ip address from about output to your local resolver
+
+## Mac/Linux
+
+Copy paste the command from the vagrant output
+
+## Windows
+
+Use the following instructions if you’re running Windows 10 or Windows 8:
+ Press the Windows key.
+ Type Notepad in the search field.
+ In the search results, right-click Notepad and select Run as administrator.
+ From Notepad, open the following file:
+ c:\Windows\System32\Drivers\etc\hosts
+ add the below line in the hosts file
+ openreplay.local
+ Select File > Save to save your changes.
+
+**Open browser**
+http://openreplay.local
+```
+
+### To start developing
+
+- [Frontend](../../frontend/development.md)
+- [API](../../api/development.md)
+- [Backend](../../backend/development.md)
+
+### Notes
+
+It’ll be a good practice to take a snapshot once the initial setup is complete, so that if something is not working as expected, you can always fall back to a stable known version.
+```bash
+cd openreplay-dev
+vagrant snapshot save
+# For example
+vagrant snapshot save openreplay-160-base
+```
+
+```bash
+# To restore the snapshot
+cd openreplay-dev
+vagrant snapshot restore openreplay-160-base
+```
+
+
From c86f6c4dc48b9c94b06b60573bf9a56d08b896dd Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Fri, 29 Apr 2022 13:19:11 +0200
Subject: [PATCH 15/65] feat(db): EE fixed widget-size for upgrade
---
ee/scripts/helm/db/init_dbs/postgresql/1.6.0/1.6.0.sql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ee/scripts/helm/db/init_dbs/postgresql/1.6.0/1.6.0.sql b/ee/scripts/helm/db/init_dbs/postgresql/1.6.0/1.6.0.sql
index d7eeff911..bb0d7b7c0 100644
--- a/ee/scripts/helm/db/init_dbs/postgresql/1.6.0/1.6.0.sql
+++ b/ee/scripts/helm/db/init_dbs/postgresql/1.6.0/1.6.0.sql
@@ -305,7 +305,7 @@ VALUES ('Captured sessions', 'overview', '{
"position": 0
}', true, true, true, 'missing_resources', 'predefined', 'table'),
('Slowest Resources', 'resources', '{
- "col": 2,
+ "col": 4,
"row": 2,
"position": 0
}', true, true, true, 'slowest_resources', 'predefined', 'table'),
From 45e6504a00eb4f6790d9bd7aaa944c21a3dca721 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Fri, 29 Apr 2022 16:14:57 +0200
Subject: [PATCH 16/65] Added Contributors
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 870d47fcc..8c18e6790 100644
--- a/README.md
+++ b/README.md
@@ -89,3 +89,9 @@ Check out our [roadmap](https://www.notion.so/openreplay/Roadmap-889d2c3d968b478
## License
This repo is under the Elastic License 2.0 (ELv2), with the exception of the `ee` directory.
+
+## Contributors
+
+
+
+
From b95faa0f1a44a200cd49b32c201dcd8976fb6a65 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Fri, 29 Apr 2022 18:52:29 +0200
Subject: [PATCH 17/65] feat(api): EE optimized get error details
---
ee/api/chalicelib/core/errors.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/ee/api/chalicelib/core/errors.py b/ee/api/chalicelib/core/errors.py
index c7e066f8b..ecf1aeda2 100644
--- a/ee/api/chalicelib/core/errors.py
+++ b/ee/api/chalicelib/core/errors.py
@@ -272,6 +272,7 @@ def get_details(project_id, error_id, user_id, **data):
INNER JOIN events.errors AS ee USING (error_id)
INNER JOIN public.sessions USING (session_id)
WHERE pe.project_id = %(project_id)s
+ AND sessions.project_id = %(project_id)s
AND error_id = %(error_id)s
ORDER BY start_ts DESC
LIMIT 1;""",
From 76e181e1206cc58dbff3306640ecb1092ef9b790 Mon Sep 17 00:00:00 2001
From: Rajesh Rajendran
Date: Sat, 30 Apr 2022 16:07:00 +0000
Subject: [PATCH 18/65] Update development.md
---
backend/development.md | 7 -------
1 file changed, 7 deletions(-)
diff --git a/backend/development.md b/backend/development.md
index 0e7295c8b..1339a2456 100644
--- a/backend/development.md
+++ b/backend/development.md
@@ -2,13 +2,6 @@
- [Vagrant](../scripts/vagrant/README.md)
-### Development environment
-
-```bash
-docker build -f Dockerfile.bundle .
-
-```
-
### Building and deploying locally
```bash
From e3830b0d71f5b700e186dfbb75b6708a8b99dec1 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Mon, 2 May 2022 11:06:15 +0200
Subject: [PATCH 19/65] chore(vagrant): Changed development.md chore(vagrant):
Added dev setup-scripts for EE
---
api/development.md | 13 ----
ee/api/clean.sh | 85 +++++++++++++++++++++
ee/api/development.md | 36 +++++++++
ee/api/{prepare-local.sh => prepare-dev.sh} | 0
4 files changed, 121 insertions(+), 13 deletions(-)
create mode 100755 ee/api/clean.sh
create mode 100644 ee/api/development.md
rename ee/api/{prepare-local.sh => prepare-dev.sh} (100%)
diff --git a/api/development.md b/api/development.md
index 116518604..15e3c64a7 100644
--- a/api/development.md
+++ b/api/development.md
@@ -7,7 +7,6 @@
### Development environment
```bash
-**FOSS:**
cd openreplay/api
# Make your own copy of .env file and edit it as you want
cp .env.dev .env
@@ -17,18 +16,6 @@ mkdir .venv
# Installing dependencies (pipenv will detect the .venv folder and use it as a target)
pipenv install -r requirements.txt [--skip-lock]
-
-# Create a .venv folder to contain all you dependencies
-mkdir .venv
-
-# Installing dependencies (pipenv will detect the .venv folder and use it as a target)
-pipenv install -r requirements.txt [--skip-lock]
-
-# These commands must bu used everytime you make changes to FOSS.
-# To clean the unused files before getting new ones
-bash clean.sh
-# To copy commun files from FOSS
-bash prepare-dev.sh
```
### Building and deploying locally
diff --git a/ee/api/clean.sh b/ee/api/clean.sh
new file mode 100755
index 000000000..59f723c80
--- /dev/null
+++ b/ee/api/clean.sh
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+rm -rf ./chalicelib/core/alerts.py
+rm -rf ./chalicelib/core/alerts_processor.py
+rm -rf ./chalicelib/core/announcements.py
+rm -rf ./chalicelib/core/collaboration_slack.py
+rm -rf ./chalicelib/core/errors_favorite_viewed.py
+rm -rf ./chalicelib/core/events.py
+rm -rf ./chalicelib/core/events_ios.py
+rm -rf ./chalicelib/core/dashboards.py
+rm -rf ./chalicelib/core/funnels.py
+rm -rf ./chalicelib/core/integration_base.py
+rm -rf ./chalicelib/core/integration_base_issue.py
+rm -rf ./chalicelib/core/integration_github.py
+rm -rf ./chalicelib/core/integration_github_issue.py
+rm -rf ./chalicelib/core/integration_jira_cloud.py
+rm -rf ./chalicelib/core/integration_jira_cloud_issue.py
+rm -rf ./chalicelib/core/integrations_manager.py
+rm -rf ./chalicelib/core/issues.py
+rm -rf ./chalicelib/core/jobs.py
+rm -rf ./chalicelib/core/log_tool_bugsnag.py
+rm -rf ./chalicelib/core/log_tool_cloudwatch.py
+rm -rf ./chalicelib/core/log_tool_datadog.py
+rm -rf ./chalicelib/core/log_tool_elasticsearch.py
+rm -rf ./chalicelib/core/log_tool_newrelic.py
+rm -rf ./chalicelib/core/log_tool_rollbar.py
+rm -rf ./chalicelib/core/log_tool_sentry.py
+rm -rf ./chalicelib/core/log_tool_stackdriver.py
+rm -rf ./chalicelib/core/log_tool_sumologic.py
+rm -rf ./chalicelib/core/metadata.py
+rm -rf ./chalicelib/core/mobile.py
+rm -rf ./chalicelib/core/sessions.py
+rm -rf ./chalicelib/core/sessions_assignments.py
+rm -rf ./chalicelib/core/sessions_favorite_viewed.py
+rm -rf ./chalicelib/core/sessions_metas.py
+rm -rf ./chalicelib/core/sessions_mobs.py
+rm -rf ./chalicelib/core/significance.py
+rm -rf ./chalicelib/core/slack.py
+rm -rf ./chalicelib/core/socket_ios.py
+rm -rf ./chalicelib/core/sourcemaps.py
+rm -rf ./chalicelib/core/sourcemaps_parser.py
+rm -rf ./chalicelib/core/weekly_report.py
+rm -rf ./chalicelib/saml
+rm -rf ./chalicelib/utils/html/
+rm -rf ./chalicelib/utils/__init__.py
+rm -rf ./chalicelib/utils/args_transformer.py
+rm -rf ./chalicelib/utils/captcha.py
+rm -rf ./chalicelib/utils/dev.py
+rm -rf ./chalicelib/utils/email_handler.py
+rm -rf ./chalicelib/utils/email_helper.py
+rm -rf ./chalicelib/utils/event_filter_definition.py
+rm -rf ./chalicelib/utils/github_client_v3.py
+rm -rf ./chalicelib/utils/helper.py
+rm -rf ./chalicelib/utils/jira_client.py
+rm -rf ./chalicelib/utils/metrics_helper.py
+rm -rf ./chalicelib/utils/pg_client.py
+rm -rf ./chalicelib/utils/s3.py
+rm -rf ./chalicelib/utils/smtp.py
+rm -rf ./chalicelib/utils/strings.py
+rm -rf ./chalicelib/utils/TimeUTC.py
+rm -rf ./routers/app/__init__.py
+rm -rf ./routers/crons/__init__.py
+rm -rf ./routers/subs/__init__.py
+rm -rf ./routers/__init__.py
+rm -rf ./chalicelib/core/assist.py
+rm -rf ./auth/auth_apikey.py
+rm -rf ./auth/auth_jwt.py
+rm -rf ./build.sh
+rm -rf ./routers/core.py
+rm -rf ./routers/crons/core_crons.py
+rm -rf ./routers/subs/dashboard.py
+rm -rf ./db_changes.sql
+rm -rf ./Dockerfile.bundle
+rm -rf ./entrypoint.bundle.sh
+rm -rf ./entrypoint.sh
+rm -rf ./chalicelib/core/heatmaps.py
+rm -rf ./routers/subs/insights.py
+rm -rf ./schemas.py
+rm -rf ./routers/subs/v1_api.py
+rm -rf ./routers/subs/metrics.py
+rm -rf ./chalicelib/core/custom_metrics.py
+rm -rf ./chalicelib/core/performance_event.py
+rm -rf ./chalicelib/core/saved_search.py
+rm -rf ./app_alerts.py
+rm -rf ./build_alerts.sh
diff --git a/ee/api/development.md b/ee/api/development.md
new file mode 100644
index 000000000..d980a24d7
--- /dev/null
+++ b/ee/api/development.md
@@ -0,0 +1,36 @@
+### Prerequisites
+
+- [Vagrant](../scripts/vagrant/README.md)
+- Python 3.9
+- Pipenv
+
+### Development environment
+
+```bash
+cd openreplay/ee/api
+# Make your own copy of .env file and edit it as you want
+cp .env.dev .env
+
+# Create a .venv folder to contain all you dependencies
+mkdir .venv
+
+# Installing dependencies (pipenv will detect the .venv folder and use it as a target)
+pipenv install -r requirements.txt [--skip-lock]
+
+# These commands must bu used everytime you make changes to FOSS.
+# To clean the unused files before getting new ones
+bash clean.sh
+# To copy commun files from FOSS
+bash prepare-dev.sh
+```
+
+### Building and deploying locally
+
+```bash
+cd openreplay-contributions
+vagrant ssh
+cd openreplay-dev/openreplay/scripts/helmcharts
+# For complete list of options
+# bash local_deploy.sh help
+bash local_deploy.sh api
+```
diff --git a/ee/api/prepare-local.sh b/ee/api/prepare-dev.sh
similarity index 100%
rename from ee/api/prepare-local.sh
rename to ee/api/prepare-dev.sh
From fae94c2592d808edf593eb16ea441761d6f11667 Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Tue, 3 May 2022 21:43:16 +0200
Subject: [PATCH 20/65] docs(vagrant): create user account comment
Signed-off-by: rjshrjndrn
---
scripts/vagrant/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/vagrant/README.md b/scripts/vagrant/README.md
index ffe132c73..5262930ba 100644
--- a/scripts/vagrant/README.md
+++ b/scripts/vagrant/README.md
@@ -38,8 +38,8 @@ Use the following instructions if you’re running Windows 10 or Windows 8:
openreplay.local
Select File > Save to save your changes.
-**Open browser**
-http://openreplay.local
+**Open the below URL and create an account**
+http://openreplay.local/signup
```
### To start developing
From 17bdffa5ccfa7f5250aebd6b207f95d754ff04b3 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Tue, 3 May 2022 21:52:13 +0200
Subject: [PATCH 21/65] Update README.md
---
scripts/vagrant/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/vagrant/README.md b/scripts/vagrant/README.md
index 5262930ba..193d5b45d 100644
--- a/scripts/vagrant/README.md
+++ b/scripts/vagrant/README.md
@@ -38,7 +38,7 @@ Use the following instructions if you’re running Windows 10 or Windows 8:
openreplay.local
Select File > Save to save your changes.
-**Open the below URL and create an account**
+**Open the below URL to create a developer/local account**
http://openreplay.local/signup
```
From 04cc87141f153e99216a2969461850609c05160d Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Tue, 10 May 2022 17:13:19 +0200
Subject: [PATCH 22/65] feat(api): fixed sourcemaps reader endpoint
---
api/.env.default | 2 +-
ee/api/.env.default | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/api/.env.default b/api/.env.default
index 7dd248bec..30ff0b02d 100644
--- a/api/.env.default
+++ b/api/.env.default
@@ -44,6 +44,6 @@ sentryURL=
sessions_bucket=mobs
sessions_region=us-east-1
sourcemaps_bucket=sourcemaps
-sourcemaps_reader=http://127.0.0.1:9000/
+sourcemaps_reader=http://127.0.0.1:9000/sourcemaps
stage=default-foss
version_number=1.4.0
\ No newline at end of file
diff --git a/ee/api/.env.default b/ee/api/.env.default
index 094579f1b..8215908b2 100644
--- a/ee/api/.env.default
+++ b/ee/api/.env.default
@@ -53,6 +53,6 @@ sentryURL=
sessions_bucket=mobs
sessions_region=us-east-1
sourcemaps_bucket=sourcemaps
-sourcemaps_reader=http://127.0.0.1:9000/
+sourcemaps_reader=http://127.0.0.1:9000/sourcemaps
stage=default-ee
version_number=1.0.0
From c9d8950b2dedb369ef786129486f057517a2da16 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Tue, 10 May 2022 19:35:54 +0200
Subject: [PATCH 23/65] fix(ui) - reset page on changing the search
---
frontend/app/duck/search.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/app/duck/search.js b/frontend/app/duck/search.js
index dd879592c..491b24273 100644
--- a/frontend/app/duck/search.js
+++ b/frontend/app/duck/search.js
@@ -64,7 +64,7 @@ function reducer(state = initialState, action = {}) {
return state.set('filterList', generateFilterOptions(filtersMap))
.set('filterListLive', generateLiveFilterOptions(liveFiltersMap));
case EDIT:
- return state.mergeIn(['instance'], action.instance);
+ return state.mergeIn(['instance'], action.instance).set('currentPage', 1);
case APPLY:
return action.fromUrl
? state.set('instance', Filter(action.filter))
From cdb1a28a8bc3a40befc89c11f741e6d69a13e391 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 12 May 2022 15:42:10 +0200
Subject: [PATCH 24/65] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 8c18e6790..ee91f95ea 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@
-OpenReplay is a session replay stack that lets you see what users do on your web app, helping you troubleshoot issues faster. It's the only open-source alternative to products such as FullStory and LogRocket.
+OpenReplay is a session replay suite you can host yourself, that lets you see what users do on your web app, helping you troubleshoot issues faster. It's the only open-source alternative to products such as FullStory and LogRocket.
- **Session replay.** OpenReplay replays what users do, but not only. It also shows you what went under the hood, how your website or app behaves by capturing network activity, console logs, JS errors, store actions/state, page speed metrics, cpu/memory usage and much more.
- **Low footprint**. With a ~18KB (.gz) tracker that asynchronously sends minimal data for a very limited impact on performance.
@@ -80,7 +80,7 @@ We're always on the lookout for contributions to OpenReplay, and we're glad you'
See our [Contributing Guide](CONTRIBUTING.md) for more details.
-Also, feel free to join our [Discord](https://discord.openreplay.com) to ask questions, discuss ideas or connect with our contributors.
+Also, feel free to join our [Slack](https://slack.openreplay.com) to ask questions, discuss ideas or connect with our contributors.
## Roadmap
From 248cb41e5690298f5c131f0c7cfd01ab5cde61ca Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Fri, 13 May 2022 16:42:17 +0200
Subject: [PATCH 25/65] fix(ui) - user id filter with query params
---
frontend/app/components/BugFinder/BugFinder.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/frontend/app/components/BugFinder/BugFinder.js b/frontend/app/components/BugFinder/BugFinder.js
index 3ce09d23b..40652c94a 100644
--- a/frontend/app/components/BugFinder/BugFinder.js
+++ b/frontend/app/components/BugFinder/BugFinder.js
@@ -23,7 +23,8 @@ import NoSessionsMessage from 'Shared/NoSessionsMessage';
// import TrackerUpdateMessage from 'Shared/TrackerUpdateMessage';
import SessionSearch from 'Shared/SessionSearch';
import MainSearchBar from 'Shared/MainSearchBar';
-import { clearSearch, fetchSessions } from 'Duck/search';
+import { clearSearch, fetchSessions, addFilterByKeyAndValue } from 'Duck/search';
+import { FilterCategory, FilterKey, IssueType } from 'Types/filter/filterType';
const weakEqual = (val1, val2) => {
if (!!val1 === false && !!val2 === false) return true;
@@ -72,6 +73,7 @@ const allowedQueryKeys = [
setFunnelPage,
clearSearch,
fetchSessions,
+ addFilterByKeyAndValue,
})
@withPageTitle("Sessions - OpenReplay")
export default class BugFinder extends React.PureComponent {
@@ -101,7 +103,8 @@ export default class BugFinder extends React.PureComponent {
const queryFilter = this.props.query.all(allowedQueryKeys);
if (queryFilter.hasOwnProperty('userId')) {
- props.addAttribute({ label: 'User Id', key: KEYS.USERID, type: KEYS.USERID, operator: 'is', value: queryFilter.userId })
+ // props.addAttribute({ label: 'User Id', key: KEYS.USERID, type: KEYS.USERID, operator: 'is', value: queryFilter.userId })
+ props.addFilterByKeyAndValue(FilterKey.USERID, queryFilter.userId);
}
}
From 24b40373d47731172c6991262063ca6a3ea7af6a Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Mon, 16 May 2022 10:45:51 +0200
Subject: [PATCH 26/65] chore(helm): make ingress-nginx installation not
mandatory.
Signed-off-by: rjshrjndrn
---
scripts/helmcharts/openreplay/Chart.yaml | 1 +
scripts/helmcharts/openreplay/values.yaml | 2 ++
2 files changed, 3 insertions(+)
diff --git a/scripts/helmcharts/openreplay/Chart.yaml b/scripts/helmcharts/openreplay/Chart.yaml
index c1875102e..a9a2f8e83 100644
--- a/scripts/helmcharts/openreplay/Chart.yaml
+++ b/scripts/helmcharts/openreplay/Chart.yaml
@@ -28,3 +28,4 @@ dependencies:
- name: ingress-nginx
version: "4.x.x"
repository: "https://kubernetes.github.io/ingress-nginx"
+ condition: ingress-nginx.enabled
diff --git a/scripts/helmcharts/openreplay/values.yaml b/scripts/helmcharts/openreplay/values.yaml
index f702c1a49..3c063340c 100644
--- a/scripts/helmcharts/openreplay/values.yaml
+++ b/scripts/helmcharts/openreplay/values.yaml
@@ -114,3 +114,5 @@ assist:
fullnameOverride: assist-openreplay
peers:
fullnameOverride: peers-openreplay
+ingress-nginx:
+ enabled: true
From e12d9e77a6fd531a22325337838a841b1c67f00d Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Mon, 16 May 2022 15:00:54 +0200
Subject: [PATCH 27/65] fix(helm): nginx forward L7 headers from LB
Signed-off-by: rjshrjndrn
---
scripts/helmcharts/vars.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml
index 5c02f57f0..163b7d231 100644
--- a/scripts/helmcharts/vars.yaml
+++ b/scripts/helmcharts/vars.yaml
@@ -54,6 +54,10 @@ ingress-nginx: &ingress-nginx
default-ssl-certificate: "app/openreplay-ssl"
config:
enable-real-ip: true
+ # Enable LB forwarded protocol
+ # Ref: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#use-forwarded-headers
+ # https://github.com/nginxinc/kubernetes-ingress/issues/1284#issuecomment-872869354
+ # use-forwarded-headers: true
# Ref: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#max-worker-connections
max-worker-connections: 0
# SSL redirection
From 9f53b4b18df60542635bce2a7784358233073fed Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Mon, 16 May 2022 21:10:56 +0200
Subject: [PATCH 28/65] chore(ingress): changing proxy body size to 10m
else nginx will reject the change, and AWS will report as CORS issue.
Signed-off-by: rjshrjndrn
---
scripts/helmcharts/vars.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml
index 163b7d231..5ec87f961 100644
--- a/scripts/helmcharts/vars.yaml
+++ b/scripts/helmcharts/vars.yaml
@@ -63,6 +63,7 @@ ingress-nginx: &ingress-nginx
# SSL redirection
ssl-redirect: false
force-ssl-redirect: false
+ proxy-body-size: 10m
# Application specific variables
global:
From 447ff3b3ab10d5f97148c844259e6e0d6056a21f Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Wed, 18 May 2022 12:28:42 +0200
Subject: [PATCH 29/65] Session Vault (#480)
* change(ui) - session vault - icons and text
* change(ui) - session vault - session list head
---
.../SessionList/SessionListHeader.js | 21 ++-----
.../BugFinder/SessionsMenu/SessionsMenu.js | 10 ++--
.../components/Session_/PlayerBlockHeader.js | 6 +-
.../components/shared/Bookmark/Bookmark.tsx | 59 +++++++++++++++----
frontend/app/svg/icons/safe-fill.svg | 4 ++
frontend/app/svg/icons/safe.svg | 4 ++
6 files changed, 70 insertions(+), 34 deletions(-)
create mode 100644 frontend/app/svg/icons/safe-fill.svg
create mode 100644 frontend/app/svg/icons/safe.svg
diff --git a/frontend/app/components/BugFinder/SessionList/SessionListHeader.js b/frontend/app/components/BugFinder/SessionList/SessionListHeader.js
index e4f949473..c57ec3e07 100644
--- a/frontend/app/components/BugFinder/SessionList/SessionListHeader.js
+++ b/frontend/app/components/BugFinder/SessionList/SessionListHeader.js
@@ -33,23 +33,14 @@ function SessionListHeader({
{ activeTab.name }
{ count ? numberWithCommas(count) : 0 }
-
- Sessions Captured in
-
-
+ { activeTab.type !== 'bookmark' && (
+
+ Sessions Captured in
+
+
+ )}
- {/*
- Session View
- {}}
- value='list'
- />
-
*/}
Timezone
diff --git a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
index fa0594316..c8c96c95d 100644
--- a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
+++ b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
@@ -9,7 +9,7 @@ import { issues_types } from 'Types/session/issue'
import { fetchList as fetchSessionList } from 'Duck/sessions';
function SessionsMenu(props) {
- const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel } = props;
+ const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel, isEnterprise } = props;
const onMenuItemClick = (filter) => {
props.onMenuItemClick(filter)
@@ -66,10 +66,11 @@ function SessionsMenu(props) {
onMenuItemClick({ name: 'Bookmarks', type: 'bookmark' })}
+ onClick={() => onMenuItemClick({ name: isEnterprise ? 'Vault' : 'Bookmarks', type: 'bookmark', description: isEnterprise ? 'Sessions saved to vault never get\'s deleted from records.' : '' })}
+ // TODO show the description in header
/>
@@ -86,6 +87,7 @@ export default connect(state => ({
captureRate: state.getIn(['watchdogs', 'captureRate']),
filters: state.getIn([ 'filters', 'appliedFilter' ]),
sessionsLoading: state.getIn([ 'sessions', 'fetchLiveListRequest', 'loading' ]),
+ isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
}), {
fetchWatchdogStatus, clearEvents, fetchSessionList
})(SessionsMenu);
diff --git a/frontend/app/components/Session_/PlayerBlockHeader.js b/frontend/app/components/Session_/PlayerBlockHeader.js
index 58a524022..4717c6329 100644
--- a/frontend/app/components/Session_/PlayerBlockHeader.js
+++ b/frontend/app/components/Session_/PlayerBlockHeader.js
@@ -12,6 +12,7 @@ import SharePopup from '../shared/SharePopup/SharePopup';
import { fetchList as fetchListIntegration } from 'Duck/integrations/actions';
import { countries } from 'App/constants';
import SessionMetaList from 'Shared/SessionItem/SessionMetaList';
+import Bookmark from 'Shared/Bookmark'
import stl from './playerBlockHeader.css';
import Issues from './Issues/Issues';
@@ -162,7 +163,8 @@ export default class PlayerBlockHeader extends React.PureComponent {
<>
-
+ {/*
+ /> */}
void,
+ toggleFavorite: (sessionId: string) => Promise,
favorite: Boolean,
- sessionId: any
+ sessionId: any,
+ isEnterprise: Boolean
}
-function Bookmark({ toggleFavorite, sessionId, favorite } : Props ) {
+function Bookmark(props : Props ) {
+ const { sessionId, favorite, isEnterprise } = props;
+ const [isFavorite, setIsFavorite] = useState(favorite);
+ const ADDED_MESSAGE = isEnterprise ? 'Session added to vault' : 'Session added to your favorites';
+ const REMOVED_MESSAGE = isEnterprise ? 'Session removed from vault' : 'Session removed from your favorites';
+ const TOOLTIP_TEXT_ADD = isEnterprise ? 'Add to vault' : 'Add to favorites';
+ const TOOLTIP_TEXT_REMOVE = isEnterprise ? 'Remove from vault' : 'Remove from favorites';
- return (
- toggleFavorite(sessionId) }
- data-favourite={ favorite }
+ const ACTIVE_ICON = isEnterprise ? 'safe-fill' : 'star-solid';
+ const INACTIVE_ICON = isEnterprise ? 'safe' : 'star';
+
+
+ useEffect(() => {
+ setIsFavorite(favorite);
+ }, [favorite]);
+
+ const toggleFavorite = async () => {
+ props.toggleFavorite(sessionId).then(() => {
+ toast.success(isFavorite ? REMOVED_MESSAGE : ADDED_MESSAGE);
+ setIsFavorite(!isFavorite);
+ });
+ }
+
+ return (
+
-
-
+
+
+
+
)
}
-export default connect(null, { toggleFavorite })(Bookmark)
+export default connect(state => ({
+ isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
+}), { toggleFavorite })(Bookmark)
diff --git a/frontend/app/svg/icons/safe-fill.svg b/frontend/app/svg/icons/safe-fill.svg
new file mode 100644
index 000000000..76ed5854e
--- /dev/null
+++ b/frontend/app/svg/icons/safe-fill.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/frontend/app/svg/icons/safe.svg b/frontend/app/svg/icons/safe.svg
new file mode 100644
index 000000000..f06ce9c78
--- /dev/null
+++ b/frontend/app/svg/icons/safe.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
From 3eb6db1a2534db789d8ef10de5c24332cd759d97 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Wed, 18 May 2022 12:32:20 +0200
Subject: [PATCH 30/65] Revert "Session Vault (#480)" (#481)
This reverts commit 447ff3b3ab10d5f97148c844259e6e0d6056a21f.
---
.../SessionList/SessionListHeader.js | 21 +++++--
.../BugFinder/SessionsMenu/SessionsMenu.js | 10 ++--
.../components/Session_/PlayerBlockHeader.js | 6 +-
.../components/shared/Bookmark/Bookmark.tsx | 59 ++++---------------
frontend/app/svg/icons/safe-fill.svg | 4 --
frontend/app/svg/icons/safe.svg | 4 --
6 files changed, 34 insertions(+), 70 deletions(-)
delete mode 100644 frontend/app/svg/icons/safe-fill.svg
delete mode 100644 frontend/app/svg/icons/safe.svg
diff --git a/frontend/app/components/BugFinder/SessionList/SessionListHeader.js b/frontend/app/components/BugFinder/SessionList/SessionListHeader.js
index c57ec3e07..e4f949473 100644
--- a/frontend/app/components/BugFinder/SessionList/SessionListHeader.js
+++ b/frontend/app/components/BugFinder/SessionList/SessionListHeader.js
@@ -33,14 +33,23 @@ function SessionListHeader({
{ activeTab.name }
{ count ? numberWithCommas(count) : 0 }
- { activeTab.type !== 'bookmark' && (
-
- Sessions Captured in
-
-
- )}
+
+ Sessions Captured in
+
+
+ {/*
+ Session View
+ {}}
+ value='list'
+ />
+
*/}
Timezone
diff --git a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
index c8c96c95d..fa0594316 100644
--- a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
+++ b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
@@ -9,7 +9,7 @@ import { issues_types } from 'Types/session/issue'
import { fetchList as fetchSessionList } from 'Duck/sessions';
function SessionsMenu(props) {
- const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel, isEnterprise } = props;
+ const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel } = props;
const onMenuItemClick = (filter) => {
props.onMenuItemClick(filter)
@@ -66,11 +66,10 @@ function SessionsMenu(props) {
onMenuItemClick({ name: isEnterprise ? 'Vault' : 'Bookmarks', type: 'bookmark', description: isEnterprise ? 'Sessions saved to vault never get\'s deleted from records.' : '' })}
- // TODO show the description in header
+ onClick={() => onMenuItemClick({ name: 'Bookmarks', type: 'bookmark' })}
/>
@@ -87,7 +86,6 @@ export default connect(state => ({
captureRate: state.getIn(['watchdogs', 'captureRate']),
filters: state.getIn([ 'filters', 'appliedFilter' ]),
sessionsLoading: state.getIn([ 'sessions', 'fetchLiveListRequest', 'loading' ]),
- isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
}), {
fetchWatchdogStatus, clearEvents, fetchSessionList
})(SessionsMenu);
diff --git a/frontend/app/components/Session_/PlayerBlockHeader.js b/frontend/app/components/Session_/PlayerBlockHeader.js
index 4717c6329..58a524022 100644
--- a/frontend/app/components/Session_/PlayerBlockHeader.js
+++ b/frontend/app/components/Session_/PlayerBlockHeader.js
@@ -12,7 +12,6 @@ import SharePopup from '../shared/SharePopup/SharePopup';
import { fetchList as fetchListIntegration } from 'Duck/integrations/actions';
import { countries } from 'App/constants';
import SessionMetaList from 'Shared/SessionItem/SessionMetaList';
-import Bookmark from 'Shared/Bookmark'
import stl from './playerBlockHeader.css';
import Issues from './Issues/Issues';
@@ -163,8 +162,7 @@ export default class PlayerBlockHeader extends React.PureComponent {
<>
-
- {/*
*/}
+ />
Promise,
+ toggleFavorite: (session) => void,
favorite: Boolean,
- sessionId: any,
- isEnterprise: Boolean
+ sessionId: any
}
-function Bookmark(props : Props ) {
- const { sessionId, favorite, isEnterprise } = props;
- const [isFavorite, setIsFavorite] = useState(favorite);
- const ADDED_MESSAGE = isEnterprise ? 'Session added to vault' : 'Session added to your favorites';
- const REMOVED_MESSAGE = isEnterprise ? 'Session removed from vault' : 'Session removed from your favorites';
- const TOOLTIP_TEXT_ADD = isEnterprise ? 'Add to vault' : 'Add to favorites';
- const TOOLTIP_TEXT_REMOVE = isEnterprise ? 'Remove from vault' : 'Remove from favorites';
+function Bookmark({ toggleFavorite, sessionId, favorite } : Props ) {
- const ACTIVE_ICON = isEnterprise ? 'safe-fill' : 'star-solid';
- const INACTIVE_ICON = isEnterprise ? 'safe' : 'star';
-
-
- useEffect(() => {
- setIsFavorite(favorite);
- }, [favorite]);
-
- const toggleFavorite = async () => {
- props.toggleFavorite(sessionId).then(() => {
- toast.success(isFavorite ? REMOVED_MESSAGE : ADDED_MESSAGE);
- setIsFavorite(!isFavorite);
- });
- }
-
- return (
- toggleFavorite(sessionId) }
+ data-favourite={ favorite }
>
-
-
-
-
+
+
)
}
-export default connect(state => ({
- isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
-}), { toggleFavorite })(Bookmark)
+export default connect(null, { toggleFavorite })(Bookmark)
diff --git a/frontend/app/svg/icons/safe-fill.svg b/frontend/app/svg/icons/safe-fill.svg
deleted file mode 100644
index 76ed5854e..000000000
--- a/frontend/app/svg/icons/safe-fill.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/frontend/app/svg/icons/safe.svg b/frontend/app/svg/icons/safe.svg
deleted file mode 100644
index f06ce9c78..000000000
--- a/frontend/app/svg/icons/safe.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
From 6b631524f89aa1e5ddbe97d72b1389c343454922 Mon Sep 17 00:00:00 2001
From: ShiKhu
Date: Wed, 18 May 2022 16:46:30 +0200
Subject: [PATCH 31/65] fix(frontend-player):apply set_input_value on blure if
focused (for the case of remote controle)
---
.../managers/AssistManager.ts | 4 +-
.../MessageDistributor/managers/DOMManager.ts | 73 ++++++++++---------
2 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/frontend/app/player/MessageDistributor/managers/AssistManager.ts b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
index dc48b03f4..1588bd0a9 100644
--- a/frontend/app/player/MessageDistributor/managers/AssistManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
@@ -251,8 +251,8 @@ export default class AssistManager {
this.socket.emit("click", [ data.x, data.y ]);
}
- private toggleRemoteControl(newState: boolean){
- if (newState) {
+ private toggleRemoteControl(enable: boolean){
+ if (enable) {
this.md.overlay.addEventListener("mousemove", this.onMouseMove)
this.md.overlay.addEventListener("click", this.onMouseClick)
this.md.overlay.addEventListener("wheel", this.onWheel)
diff --git a/frontend/app/player/MessageDistributor/managers/DOMManager.ts b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
index df8ab4077..be8e5d18d 100644
--- a/frontend/app/player/MessageDistributor/managers/DOMManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
@@ -149,11 +149,11 @@ export default class DOMManager extends ListWalker {
//this.screen.setDisconnected(false);
this.stylesManager.reset();
- break;
+ return
case "create_text_node":
this.nl[ msg.id ] = document.createTextNode('');
this.insertNode(msg);
- break;
+ return
case "create_element_node":
// console.log('elementnode', msg)
if (msg.svg) {
@@ -168,20 +168,20 @@ export default class DOMManager extends ListWalker {
}
this.removeBodyScroll(msg.id);
this.removeAutocomplete(msg);
- break;
+ return
case "move_node":
this.insertNode(msg);
- break;
+ return
case "remove_node":
node = this.nl[ msg.id ]
- if (!node) { logger.error("Node not found", msg); break; }
- if (!node.parentElement) { logger.error("Parent node not found", msg); break; }
+ if (!node) { logger.error("Node not found", msg); return }
+ if (!node.parentElement) { logger.error("Parent node not found", msg); return }
node.parentElement.removeChild(node);
- break;
+ return
case "set_node_attribute":
let { id, name, value } = msg;
node = this.nl[ id ];
- if (!node) { logger.error("Node not found", msg); break; }
+ if (!node) { logger.error("Node not found", msg); return }
if (this.isLink[ id ] && name === "href") {
// @ts-ignore TODO: global ENV type
if (value.startsWith(window.ENV.ASSETS_HOST)) { // Hack for queries in rewrited urls
@@ -198,43 +198,54 @@ export default class DOMManager extends ListWalker {
logger.error(e, msg);
}
this.removeBodyScroll(msg.id);
- break;
+ return
case "remove_node_attribute":
- if (!this.nl[ msg.id ]) { logger.error("Node not found", msg); break; }
+ if (!this.nl[ msg.id ]) { logger.error("Node not found", msg); return }
try {
(this.nl[ msg.id ] as HTMLElement).removeAttribute(msg.name);
} catch(e) {
logger.error(e, msg);
}
- break;
+ return
case "set_input_value":
- if (!this.nl[ msg.id ]) { logger.error("Node not found", msg); break; }
- const val = msg.mask > 0 ? '*'.repeat(msg.mask) : msg.value;
- (this.nl[ msg.id ] as HTMLInputElement).value = val;
- break;
+ node = this.nl[ msg.id ]
+ if (!node) { logger.error("Node not found", msg); return }
+ if (!(node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement)) {
+ logger.error("Trying to set value of non-Input element", msg)
+ return
+ }
+ const val = msg.mask > 0 ? '*'.repeat(msg.mask) : msg.value
+ doc = this.screen.document
+ if (doc && node === doc.activeElement) {
+ // For the case of Remote Control
+ node.onblur = () => { node.value = val }
+ return
+ }
+ node.value = val
+ return
case "set_input_checked":
node = this.nl[ msg.id ];
- if (!node) { logger.error("Node not found", msg); break; }
+ if (!node) { logger.error("Node not found", msg); return }
(node as HTMLInputElement).checked = msg.checked;
- break;
+ return
case "set_node_data":
case "set_css_data":
node = this.nl[ msg.id ]
- if (!node) { logger.error("Node not found", msg); break; }
+ if (!node) { logger.error("Node not found", msg); return }
// @ts-ignore
node.data = msg.data;
if (node instanceof HTMLStyleElement) {
doc = this.screen.document
doc && rewriteNodeStyleSheet(doc, node)
}
- break;
+ return
case "css_insert_rule":
node = this.nl[ msg.id ];
- if (!node) { logger.error("Node not found", msg); break; }
+ if (!node) { logger.error("Node not found", msg); return }
if (!(node instanceof HTMLStyleElement) // link or null
|| node.sheet == null) {
logger.warn("Non-style node in CSS rules message (or sheet is null)", msg);
- break;
+ return
}
try {
node.sheet.insertRule(msg.rule, msg.index)
@@ -246,21 +257,21 @@ export default class DOMManager extends ListWalker {
logger.warn("Cannot insert rule.", e, msg)
}
}
- break;
+ return
case "css_delete_rule":
node = this.nl[ msg.id ];
- if (!node) { logger.error("Node not found", msg); break; }
+ if (!node) { logger.error("Node not found", msg); return }
if (!(node instanceof HTMLStyleElement) // link or null
|| node.sheet == null) {
logger.warn("Non-style node in CSS rules message (or sheet is null)", msg);
- break;
+ return
}
try {
node.sheet.deleteRule(msg.index)
} catch (e) {
logger.warn(e, msg)
}
- break;
+ return
case "create_i_frame_document":
node = this.nl[ msg.frameID ];
// console.log('ifr', msg, node)
@@ -282,17 +293,7 @@ export default class DOMManager extends ListWalker {
} else {
logger.warn("Context message host is not Element", msg)
}
-
- break;
- //not sure what to do with this one
- //case "disconnected":
- //setTimeout(() => {
- // if last one
- //if (this.msgs[ this.msgs.length - 1 ] === msg) {
- // this.setDisconnected(true);
- // }
- //}, 10000);
- //break;
+ return
}
}
From 01843b7805f0c1639e6da925f7f913441ad2d494 Mon Sep 17 00:00:00 2001
From: ShiKhu
Date: Wed, 18 May 2022 17:17:11 +0200
Subject: [PATCH 32/65] fix(frontend-assist): toggleAnnotation incapsulate +
fix inverse booleans
---
.../MessageDistributor/managers/AssistManager.ts | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/frontend/app/player/MessageDistributor/managers/AssistManager.ts b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
index 1588bd0a9..e9f4bd77d 100644
--- a/frontend/app/player/MessageDistributor/managers/AssistManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
@@ -262,6 +262,7 @@ export default class AssistManager {
this.md.overlay.removeEventListener("click", this.onMouseClick)
this.md.overlay.removeEventListener("wheel", this.onWheel)
update({ remoteControl: RemoteControlStatus.Disabled })
+ this.toggleAnnotation(false)
}
}
@@ -335,10 +336,9 @@ export default class AssistManager {
private handleCallEnd() {
this.callArgs && this.callArgs.onCallEnd()
this.callConnection && this.callConnection.close()
- update({ calling: CallingState.NoCall, annotating: false })
+ update({ calling: CallingState.NoCall })
this.callArgs = null
- this.annot?.remove()
- this.annot = null
+ this.toggleAnnotation(false)
}
private initiateCallEnd = () => {
@@ -352,6 +352,7 @@ export default class AssistManager {
this.callConnection && this.callConnection.close()
update({ calling: CallingState.NoCall })
this.callArgs = null
+ this.toggleAnnotation(false)
} else {
this.handleCallEnd()
}
@@ -389,7 +390,7 @@ export default class AssistManager {
if (typeof enable !== "boolean") {
enable = !!getState().annotating
}
- if (!enable && !this.annot) {
+ if (enable && !this.annot) {
const annot = this.annot = new AnnotationCanvas()
annot.mount(this.md.overlay)
annot.canvas.addEventListener("mousedown", e => {
@@ -416,7 +417,7 @@ export default class AssistManager {
this.socket.emit("moveAnnotation", [ data.x, data.y ])
})
update({ annotating: true })
- } else if (enable && !!this.annot) {
+ } else if (!enable && !!this.annot) {
this.annot.remove()
this.annot = null
update({ annotating: false })
From fa4d2efc1759070a5f83a1d3f3d3200132c557f8 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Thu, 19 May 2022 12:31:37 +0200
Subject: [PATCH 33/65] change(ui) - annotation with call or remote
---
.../Assist/components/AssistActions/AssistActions.tsx | 6 +++---
.../app/player/MessageDistributor/managers/AssistManager.ts | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx
index 88713a6ae..5b2255b53 100644
--- a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx
+++ b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx
@@ -82,16 +82,16 @@ function AssistActions({ toggleChatWindow, userId, calling, annotating, peerConn
return (
- {onCall && (
+ {(onCall || remoteActive) && (
<>
toggleAnnotation(!annotating) }
role="button"
>
diff --git a/frontend/app/player/MessageDistributor/managers/AssistManager.ts b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
index e9f4bd77d..04fcc40d0 100644
--- a/frontend/app/player/MessageDistributor/managers/AssistManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
@@ -386,7 +386,7 @@ export default class AssistManager {
}
toggleAnnotation(enable?: boolean) {
- if (getState().calling !== CallingState.OnCall) { return }
+ // if (getState().calling !== CallingState.OnCall) { return }
if (typeof enable !== "boolean") {
enable = !!getState().annotating
}
From 4dc4861a6b7f020986b0657ef49ff9ac15605343 Mon Sep 17 00:00:00 2001
From: Sudheer Salavadi
Date: Fri, 20 May 2022 16:52:47 +0200
Subject: [PATCH 34/65] Streamlined countries names (#455)
---
frontend/app/constants/countries.js | 38 ++++++++++++++---------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/frontend/app/constants/countries.js b/frontend/app/constants/countries.js
index 68a65b000..9927066da 100644
--- a/frontend/app/constants/countries.js
+++ b/frontend/app/constants/countries.js
@@ -30,7 +30,7 @@ export default {
BL: 'Saint Barthélemy',
BM: 'Bermuda',
BN: 'Brunei Darussalam',
- BO: 'Bolivia, Plurinational State Of',
+ BO: 'Bolivia',
BQ: 'Bonaire, Saint Eustatius And Saba',
BR: 'Brazil',
BS: 'Bahamas',
@@ -41,10 +41,10 @@ export default {
BY: 'Belarus',
BZ: 'Belize',
CA: 'Canada',
- CC: 'Cocos (Keeling) Islands',
- CD: 'Democratic Republic Of Congo',
+ CC: 'Cocos Islands',
+ CD: 'Congo',
CF: 'Central African Republic',
- CG: 'Republic Of Congo',
+ CG: 'Congo',
CH: 'Switzerland',
CI: "CĂ´te d'Ivoire",
CK: 'Cook Islands',
@@ -62,7 +62,7 @@ export default {
CX: 'Christmas Island',
CY: 'Cyprus',
CZ: 'Czech Republic',
- DD: 'German Democratic Republic',
+ DD: 'Germany',
DE: 'Germany',
DG: 'Diego Garcia',
DJ: 'Djibouti',
@@ -82,7 +82,7 @@ export default {
FI: 'Finland',
FJ: 'Fiji',
FK: 'Falkland Islands',
- FM: 'Micronesia, Federated States Of',
+ FM: 'Micronesia',
FO: 'Faroe Islands',
FQ: 'French Southern and Antarctic Territories',
FR: 'France',
@@ -121,7 +121,7 @@ export default {
IN: 'India',
IO: 'British Indian Ocean Territory',
IQ: 'Iraq',
- IR: 'Iran, Islamic Republic Of',
+ IR: 'Iran',
IS: 'Iceland',
IT: 'Italy',
JE: 'Jersey',
@@ -135,12 +135,12 @@ export default {
KI: 'Kiribati',
KM: 'Comoros',
KN: 'Saint Kitts And Nevis',
- KP: "Korea, Democratic People's Republic Of",
- KR: 'Korea, Republic Of',
+ KP: "Korea",
+ KR: 'Korea',
KW: 'Kuwait',
KY: 'Cayman Islands',
KZ: 'Kazakhstan',
- LA: "Lao People's Democratic Republic",
+ LA: "Laos",
LB: 'Lebanon',
LC: 'Saint Lucia',
LI: 'Liechtenstein',
@@ -159,7 +159,7 @@ export default {
MG: 'Madagascar',
MH: 'Marshall Islands',
MI: 'Midway Islands',
- MK: 'Macedonia, The Former Yugoslav Republic Of',
+ MK: 'Macedonia',
ML: 'Mali',
MM: 'Myanmar',
MN: 'Mongolia',
@@ -192,7 +192,7 @@ export default {
NZ: 'New Zealand',
OM: 'Oman',
PA: 'Panama',
- PC: 'Pacific Islands, Trust Territory of the',
+ PC: 'Pacific Islands',
PE: 'Peru',
PF: 'French Polynesia',
PG: 'Papua New Guinea',
@@ -202,7 +202,7 @@ export default {
PM: 'Saint Pierre And Miquelon',
PN: 'Pitcairn',
PR: 'Puerto Rico',
- PS: 'Palestinian Territory, Occupied',
+ PS: 'Palestine',
PT: 'Portugal',
PU: 'U.S. Miscellaneous Pacific Islands',
PW: 'Palau',
@@ -245,7 +245,7 @@ export default {
TH: 'Thailand',
TJ: 'Tajikistan',
TK: 'Tokelau',
- TL: 'Timor-Leste, Democratic Republic of',
+ TL: 'Timor-Leste',
TM: 'Turkmenistan',
TN: 'Tunisia',
TO: 'Tonga',
@@ -254,7 +254,7 @@ export default {
TT: 'Trinidad And Tobago',
TV: 'Tuvalu',
TW: 'Taiwan',
- TZ: 'Tanzania, United Republic Of',
+ TZ: 'Tanzania',
UA: 'Ukraine',
UG: 'Uganda',
UM: 'United States Minor Outlying Islands',
@@ -263,17 +263,17 @@ export default {
UZ: 'Uzbekistan',
VA: 'Vatican City State',
VC: 'Saint Vincent And The Grenadines',
- VD: 'Viet-Nam, Democratic Republic of',
- VE: 'Venezuela, Bolivarian Republic Of',
+ VD: 'VietNam',
+ VE: 'Venezuela',
VG: 'Virgin Islands (British)',
VI: 'Virgin Islands (US)',
- VN: 'Viet Nam',
+ VN: 'VietNam',
VU: 'Vanuatu',
WF: 'Wallis And Futuna',
WK: 'Wake Island',
WS: 'Samoa',
XK: 'Kosovo',
- YD: 'Yemen, Democratic',
+ YD: 'Yemen',
YE: 'Yemen',
YT: 'Mayotte',
YU: 'Yugoslavia',
From 9d19b93df28ba545d8fb5733917063542247f01f Mon Sep 17 00:00:00 2001
From: Sudheer Salavadi
Date: Fri, 20 May 2022 16:53:17 +0200
Subject: [PATCH 35/65] Streamlined Countries Names (#456)
---
frontend/app/constants/countryShortName.js | 28 +++++++++++-----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/frontend/app/constants/countryShortName.js b/frontend/app/constants/countryShortName.js
index 05948ccd6..38fea8f7e 100644
--- a/frontend/app/constants/countryShortName.js
+++ b/frontend/app/constants/countryShortName.js
@@ -19,8 +19,8 @@ export default (countryName) => {
return 'BRN';
case 'Central African Republic':
return 'CAF';
- case 'Democratic Republic of the Congo':
- case 'Republic of the Congo':
+ case 'Congo':
+ case 'Congo':
return 'Congo';
case 'Dominican Republic':
return 'DOM';
@@ -40,18 +40,18 @@ export default (countryName) => {
return 'NMI';
case 'New Caledonia':
return 'NCL';
- case 'Micronesia, Federated States Of':
+ case 'Micronesia':
return 'FSM';
- case 'Moldova, Republic Of':
+ case 'Moldova':
return 'MDA';
- case 'Macedonia, The Former Yugoslav Republic Of':
+ case 'Macedonia':
return 'Macedonia';
- case 'Lao People\'s Democratic Republic':
+ case 'Laos':
return 'LAO';
- case 'Korea, Republic Of':
- case 'Korea, Democratic People\'s Republic Of':
+ case 'Korea':
+ case 'Korea':
return 'PRK';
- case 'Iran, Islamic Republic Of':
+ case 'Iran':
return 'Iran';
case 'Heard Island and McDonald Islands':
return 'HMD';
@@ -65,7 +65,7 @@ export default (countryName) => {
return 'ASM';
case 'Brunei Darussalam':
return 'BRN';
- case 'Palestine, State Of':
+ case 'Palestine':
return 'PSE';
case 'Saint Kitts and Nevis':
return 'KNA';
@@ -75,8 +75,8 @@ export default (countryName) => {
return 'STP';
case 'Svalbard and Jan Mayen':
return 'SJM';
- case 'United Republic of Tanzania':
- case 'Tanzania, United Republic Of':
+ case 'Tanzania':
+ case 'Tanzania':
return 'TZA';
case 'United States Minor Outlying Islands':
return 'UMI';
@@ -84,9 +84,9 @@ export default (countryName) => {
return 'WLF';
case 'US Virgin Islands':
return 'VIR';
- case 'Venezuela, Bolivarian Republic Of':
+ case 'Venezuela':
return 'Venezuela';
- case 'Bolivia, Plurinational State Of':
+ case 'Bolivia':
return 'Bolivia';
case 'French Polynesia':
return 'PYF';
From 7ae3a756df27153bb217a90d5d6521f12537e07e Mon Sep 17 00:00:00 2001
From: Alex Kaminskii
Date: Fri, 20 May 2022 22:26:22 +0200
Subject: [PATCH 36/65] fix(player-assist): ignore tab press during remote
control
---
.../MessageDistributor/managers/AssistManager.ts | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/frontend/app/player/MessageDistributor/managers/AssistManager.ts b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
index 04fcc40d0..d8b93fb81 100644
--- a/frontend/app/player/MessageDistributor/managers/AssistManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/AssistManager.ts
@@ -246,7 +246,16 @@ export default class AssistManager {
this.socket && this.socket.emit("input", el.innerText)
}
}
- //el.onkeydown = e => e.preventDefault()
+ // TODO: send "focus" event to assist with the nodeID
+ el.onkeydown = e => {
+ if (e.key == "Tab") {
+ e.preventDefault()
+ }
+ }
+ el.onblur = () => {
+ el.oninput = null
+ el.onblur = null
+ }
}
this.socket.emit("click", [ data.x, data.y ]);
}
From 623098b7db0398ff63bc273c5565053aaf6133d8 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Fri, 20 May 2022 22:45:01 +0200
Subject: [PATCH 37/65] Update countryShortName.js
---
frontend/app/constants/countryShortName.js | 28 +++++++++++-----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/frontend/app/constants/countryShortName.js b/frontend/app/constants/countryShortName.js
index 38fea8f7e..05948ccd6 100644
--- a/frontend/app/constants/countryShortName.js
+++ b/frontend/app/constants/countryShortName.js
@@ -19,8 +19,8 @@ export default (countryName) => {
return 'BRN';
case 'Central African Republic':
return 'CAF';
- case 'Congo':
- case 'Congo':
+ case 'Democratic Republic of the Congo':
+ case 'Republic of the Congo':
return 'Congo';
case 'Dominican Republic':
return 'DOM';
@@ -40,18 +40,18 @@ export default (countryName) => {
return 'NMI';
case 'New Caledonia':
return 'NCL';
- case 'Micronesia':
+ case 'Micronesia, Federated States Of':
return 'FSM';
- case 'Moldova':
+ case 'Moldova, Republic Of':
return 'MDA';
- case 'Macedonia':
+ case 'Macedonia, The Former Yugoslav Republic Of':
return 'Macedonia';
- case 'Laos':
+ case 'Lao People\'s Democratic Republic':
return 'LAO';
- case 'Korea':
- case 'Korea':
+ case 'Korea, Republic Of':
+ case 'Korea, Democratic People\'s Republic Of':
return 'PRK';
- case 'Iran':
+ case 'Iran, Islamic Republic Of':
return 'Iran';
case 'Heard Island and McDonald Islands':
return 'HMD';
@@ -65,7 +65,7 @@ export default (countryName) => {
return 'ASM';
case 'Brunei Darussalam':
return 'BRN';
- case 'Palestine':
+ case 'Palestine, State Of':
return 'PSE';
case 'Saint Kitts and Nevis':
return 'KNA';
@@ -75,8 +75,8 @@ export default (countryName) => {
return 'STP';
case 'Svalbard and Jan Mayen':
return 'SJM';
- case 'Tanzania':
- case 'Tanzania':
+ case 'United Republic of Tanzania':
+ case 'Tanzania, United Republic Of':
return 'TZA';
case 'United States Minor Outlying Islands':
return 'UMI';
@@ -84,9 +84,9 @@ export default (countryName) => {
return 'WLF';
case 'US Virgin Islands':
return 'VIR';
- case 'Venezuela':
+ case 'Venezuela, Bolivarian Republic Of':
return 'Venezuela';
- case 'Bolivia':
+ case 'Bolivia, Plurinational State Of':
return 'Bolivia';
case 'French Polynesia':
return 'PYF';
From 0e3c4f540ae91f2f1bb8e4e34a36e268443b57e3 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Sat, 21 May 2022 10:21:36 +0200
Subject: [PATCH 38/65] Updated tracker-assist min version
---
.../app/components/shared/LiveSessionList/LiveSessionList.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx
index b0dbd80ac..9bd871182 100644
--- a/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx
+++ b/frontend/app/components/shared/LiveSessionList/LiveSessionList.tsx
@@ -139,7 +139,7 @@ function LiveSessionList(props: Props) {
title={"No live sessions."}
subtext={
- See how to {'enable Assist'} and ensure you're using tracker-assist v3.5.0 or higher.
+ See how to {'enable Assist'} and ensure you're using tracker-assist v3.5.11 or higher.
}
image={
Date: Sat, 21 May 2022 11:36:50 +0200
Subject: [PATCH 39/65] feat(api): fixed custom metrics template
---
api/chalicelib/core/dashboards.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/api/chalicelib/core/dashboards.py b/api/chalicelib/core/dashboards.py
index 7b7bfe252..141380ef8 100644
--- a/api/chalicelib/core/dashboards.py
+++ b/api/chalicelib/core/dashboards.py
@@ -37,6 +37,9 @@ def get_templates(project_id, user_id):
for w in r["widgets"]:
w["created_at"] = TimeUTC.datetime_to_timestamp(w["created_at"])
w["edited_at"] = TimeUTC.datetime_to_timestamp(w["edited_at"])
+ for s in w["series"]:
+ s["created_at"] = TimeUTC.datetime_to_timestamp(s["created_at"])
+ s["filter"] = helper.old_search_payload_to_flat(s["filter"])
return helper.list_to_camel_case(rows)
From f9fb349008cd088e6c39b41eae93df466fb2f171 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Sat, 21 May 2022 12:33:46 +0200
Subject: [PATCH 40/65] hotfix - dashboard and errors (#494)
* change(ui) - errors list - handle status change
* fix(ui) - dashbaord - reload on save
* change(ui) - dashboard - reload templates
---
.../DashboardModal/DashboardModal.tsx | 7 ++-
frontend/app/components/Errors/List/List.js | 11 ++---
frontend/app/duck/errors.js | 44 +++++++++++++------
frontend/app/mstore/dashboardStore.ts | 39 +++++++---------
frontend/app/types/errorInfo.js | 1 +
5 files changed, 59 insertions(+), 43 deletions(-)
diff --git a/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx b/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
index 055833ee7..027d6b631 100644
--- a/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
@@ -22,11 +22,14 @@ function DashboardModal(props) {
const loading = useObserver(() => dashboardStore.isSaving);
const onSave = () => {
- dashboardStore.save(dashboard).then((_dashboard: any) => {
- hideModal();
+ dashboardStore.save(dashboard).then(async (_dashboard: any) => {
+ if (dashboard.exists()) {
+ await dashboardStore.fetch(dashboard.dashboardId)
+ }
dashboardStore.selectDashboardById(_dashboard.dashboardId).then(() => {
history.push(withSiteId(dashboardSelected(_dashboard.dashboardId), siteId));
});
+ hideModal();
})
}
diff --git a/frontend/app/components/Errors/List/List.js b/frontend/app/components/Errors/List/List.js
index 82ecce40c..f75d25e39 100644
--- a/frontend/app/components/Errors/List/List.js
+++ b/frontend/app/components/Errors/List/List.js
@@ -10,7 +10,6 @@ import Divider from 'Components/Errors/ui/Divider';
import ListItem from './ListItem/ListItem';
import { debounce } from 'App/utils';
-const PER_PAGE = 10;
const sortOptionsMap = {
'occurrence-desc': 'Last Occurrence',
'occurrence-desc': 'First Occurrence',
@@ -29,6 +28,7 @@ const sortOptions = Object.entries(sortOptionsMap)
ignoreLoading: state.getIn([ "errors", "ignore", "loading" ]),
mergeLoading: state.getIn([ "errors", "merge", "loading" ]),
currentPage: state.getIn(["errors", "currentPage"]),
+ limit: state.getIn(["errors", "limit"]),
total: state.getIn([ 'errors', 'totalCount' ]),
sort: state.getIn([ 'errors', 'options', 'sort' ]),
order: state.getIn([ 'errors', 'options', 'order' ]),
@@ -142,6 +142,7 @@ export default class List extends React.PureComponent {
total,
sort,
order,
+ limit,
} = this.props;
const {
checkedAll,
@@ -224,9 +225,9 @@ export default class List extends React.PureComponent {
>
{ list.map(e =>
-
+
this.props.updateCurrentPage(page)}
- limit={PER_PAGE}
+ limit={limit}
debounceRequest={500}
/>
diff --git a/frontend/app/duck/errors.js b/frontend/app/duck/errors.js
index 2d54b3a0a..4cd236387 100644
--- a/frontend/app/duck/errors.js
+++ b/frontend/app/duck/errors.js
@@ -42,6 +42,7 @@ const initialState = Map({
stats: Map(),
sourcemapUploaded: true,
currentPage: 1,
+ limit: PER_PAGE,
options: Map({
sort: DEFAULT_SORT,
order: DEFAULT_ORDER,
@@ -57,7 +58,7 @@ function reducer(state = initialState, action = {}) {
let updError;
switch (action.type) {
case EDIT_OPTIONS:
- return state.mergeIn(["options"], action.instance);
+ return state.mergeIn(["options"], action.instance).set('currentPage', 1);
case success(FETCH):
return state.set("instance", ErrorInfo(action.data));
case success(FETCH_TRACE):
@@ -68,15 +69,15 @@ function reducer(state = initialState, action = {}) {
.set("totalCount", data ? data.total : 0)
.set("list", List(data && data.errors).map(ErrorInfo)
.filter(e => e.parentErrorId == null)
- .map(e => e.update("chart", chartWrapper)));
+ .map(e => e.update("chart", chartWrapper)))
case success(RESOLVE):
- updError = { errorId: action.id, status: RESOLVED };
+ updError = { errorId: action.id, status: RESOLVED, disabled: true };
return updateItemInList(updateInstance(state, updError), updError);
case success(UNRESOLVE):
- updError = { errorId: action.id, status: UNRESOLVED };
+ updError = { errorId: action.id, status: UNRESOLVED, disabled: true };
return updateItemInList(updateInstance(state, updError), updError);
case success(IGNORE):
- updError = { errorId: action.id, status: IGNORED };
+ updError = { errorId: action.id, status: IGNORED, disabled: true };
return updateItemInList(updateInstance(state, updError), updError);
case success(TOGGLE_FAVORITE):
return state.mergeIn([ "instance" ], { favorite: !state.getIn([ "instance", "favorite" ]) })
@@ -158,28 +159,43 @@ export function fetchBookmarks() {
}
}
-export function resolve(id) {
- return {
+export const resolve = (id) => (dispatch, getState) => {
+ const list = getState().getIn(['errors', 'list']);
+ const index = list.findIndex(e => e.get('errorId') === id);
+ const error = list.get(index);
+ if (error.get('status') === RESOLVED) return;
+
+ return dispatch({
types: array(RESOLVE),
id,
call: client => client.get(`/errors/${ id }/solve`),
- }
+ })
}
-export function unresolve(id) {
- return {
+export const unresolve = (id) => (dispatch, getState) => {
+ const list = getState().getIn(['errors', 'list']);
+ const index = list.findIndex(e => e.get('errorId') === id);
+ const error = list.get(index);
+ if (error.get('status') === UNRESOLVED) return;
+
+ return dispatch({
types: array(UNRESOLVE),
id,
call: client => client.get(`/errors/${ id }/unsolve`),
- }
+ })
}
-export function ignore(id) {
- return {
+export const ignore = (id) => (dispatch, getState) => {
+ const list = getState().getIn(['errors', 'list']);
+ const index = list.findIndex(e => e.get('errorId') === id);
+ const error = list.get(index);
+ if (error.get('status') === IGNORED) return;
+
+ return dispatch({
types: array(IGNORE),
id,
call: client => client.get(`/errors/${ id }/ignore`),
- }
+ })
}
export function merge(ids) {
diff --git a/frontend/app/mstore/dashboardStore.ts b/frontend/app/mstore/dashboardStore.ts
index 65dcaf82b..e19757ee6 100644
--- a/frontend/app/mstore/dashboardStore.ts
+++ b/frontend/app/mstore/dashboardStore.ts
@@ -355,30 +355,25 @@ export default class DashboardStore implements IDashboardSotre {
fetchTemplates(): Promise
{
return new Promise((resolve, reject) => {
- if (this.widgetCategories.length > 0) {
- resolve(this.widgetCategories)
- } else {
- metricService.getTemplates().then(response => {
- const categories: any[] = []
- response.forEach(category => {
- const widgets: any[] = []
- // TODO speed_location is not supported yet
- category.widgets.filter(w => w.predefinedKey !== 'speed_locations').forEach(widget => {
- const w = new Widget().fromJson(widget)
- widgets.push(w)
- })
- const c: any = {}
- c.widgets = widgets
- c.name = category.category
- c.description = category.description
- categories.push(c)
+ metricService.getTemplates().then(response => {
+ const categories: any[] = []
+ response.forEach(category => {
+ const widgets: any[] = []
+ category.widgets.filter(w => w.predefinedKey !== 'speed_locations').forEach(widget => {
+ const w = new Widget().fromJson(widget)
+ widgets.push(w)
})
- this.widgetCategories = categories
- resolve(this.widgetCategories)
- }).catch(error => {
- reject(error)
+ const c: any = {}
+ c.widgets = widgets
+ c.name = category.category
+ c.description = category.description
+ categories.push(c)
})
- }
+ this.widgetCategories = categories
+ resolve(this.widgetCategories)
+ }).catch(error => {
+ reject(error)
+ })
})
}
diff --git a/frontend/app/types/errorInfo.js b/frontend/app/types/errorInfo.js
index 364fa8e65..db4c2f3a0 100644
--- a/frontend/app/types/errorInfo.js
+++ b/frontend/app/types/errorInfo.js
@@ -37,6 +37,7 @@ const ErrorInfo = Record({
chart30: [],
tags: [],
lastHydratedSession: Session(),
+ disabled: false,
}, {
fromJS: ({ stack, lastHydratedSession, ...other }) => ({
...other,
From b741a1ced86ee334330ab8de431aea1502d776b9 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Sat, 21 May 2022 12:52:46 +0200
Subject: [PATCH 41/65] change(ui) - dashboard - templates loading
---
.../DashboardMetricSelection.tsx | 6 +++--
.../DashboardModal/DashboardModal.tsx | 27 ++++++++++---------
frontend/app/mstore/dashboardStore.ts | 6 ++++-
3 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/frontend/app/components/Dashboard/components/DashboardMetricSelection/DashboardMetricSelection.tsx b/frontend/app/components/Dashboard/components/DashboardMetricSelection/DashboardMetricSelection.tsx
index 400654df2..dc532c679 100644
--- a/frontend/app/components/Dashboard/components/DashboardMetricSelection/DashboardMetricSelection.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardMetricSelection/DashboardMetricSelection.tsx
@@ -3,6 +3,7 @@ import WidgetWrapper from '../WidgetWrapper';
import { useObserver } from 'mobx-react-lite';
import cn from 'classnames';
import { useStore } from 'App/mstore';
+import { Loader } from 'UI';
function WidgetCategoryItem({ category, isSelected, onClick, selectedWidgetIds }) {
const selectedCategoryWidgetsCount = useObserver(() => {
@@ -27,6 +28,7 @@ function WidgetCategoryItem({ category, isSelected, onClick, selectedWidgetIds }
function DashboardMetricSelection(props) {
const { dashboardStore } = useStore();
let widgetCategories: any[] = useObserver(() => dashboardStore.widgetCategories);
+ const loadingTemplates = useObserver(() => dashboardStore.loadingTemplates);
const [activeCategory, setActiveCategory] = React.useState();
const [selectAllCheck, setSelectAllCheck] = React.useState(false);
const selectedWidgetIds = useObserver(() => dashboardStore.selectedWidgets.map((widget: any) => widget.metricId));
@@ -53,7 +55,7 @@ function DashboardMetricSelection(props) {
}
return useObserver(() => (
-
+
Categories
@@ -110,7 +112,7 @@ function DashboardMetricSelection(props) {
-
+
));
}
diff --git a/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx b/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
index 027d6b631..1335db817 100644
--- a/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardModal/DashboardModal.tsx
@@ -18,6 +18,7 @@ function DashboardModal(props) {
const { dashboardStore } = useStore();
const selectedWidgetsCount = useObserver(() => dashboardStore.selectedWidgets.length);
const { hideModal } = useModal();
+ const loadingTemplates = useObserver(() => dashboardStore.loadingTemplates);
const dashboard = useObserver(() => dashboardStore.dashboardInstance);
const loading = useObserver(() => dashboardStore.isSaving);
@@ -61,18 +62,20 @@ function DashboardModal(props) {
>
)}
-
-
-
- {selectedWidgetsCount} Widgets
-
+
+ {!loadingTemplates && (
+
+
+ {selectedWidgetsCount} Widgets
+
+ )}
));
}
diff --git a/frontend/app/mstore/dashboardStore.ts b/frontend/app/mstore/dashboardStore.ts
index e19757ee6..6c137519a 100644
--- a/frontend/app/mstore/dashboardStore.ts
+++ b/frontend/app/mstore/dashboardStore.ts
@@ -25,6 +25,7 @@ export interface IDashboardSotre {
metricsPageSize: number
metricsSearch: string
+ loadingTemplates: boolean
isLoading: boolean
isSaving: boolean
isDeleting: boolean
@@ -92,9 +93,9 @@ export default class DashboardStore implements IDashboardSotre {
isLoading: boolean = true
isSaving: boolean = false
isDeleting: boolean = false
+ loadingTemplates: boolean = false
fetchingDashboard: boolean = false
sessionsLoading: boolean = false;
-
showAlertModal: boolean = false;
constructor() {
@@ -354,6 +355,7 @@ export default class DashboardStore implements IDashboardSotre {
}
fetchTemplates(): Promise
{
+ this.loadingTemplates = true
return new Promise((resolve, reject) => {
metricService.getTemplates().then(response => {
const categories: any[] = []
@@ -373,6 +375,8 @@ export default class DashboardStore implements IDashboardSotre {
resolve(this.widgetCategories)
}).catch(error => {
reject(error)
+ }).finally(() => {
+ this.loadingTemplates = false
})
})
}
From 089867cf0aba9406914cda44d8cf10b990283813 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Mon, 23 May 2022 14:43:03 +0200
Subject: [PATCH 42/65] fix(ui) - sessions - stop reloading on site change
---
frontend/app/components/Header/SiteDropdown.js | 7 ++++---
frontend/app/duck/search.js | 16 +++++++++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/frontend/app/components/Header/SiteDropdown.js b/frontend/app/components/Header/SiteDropdown.js
index 38fe6ec57..5ea1d5a9a 100644
--- a/frontend/app/components/Header/SiteDropdown.js
+++ b/frontend/app/components/Header/SiteDropdown.js
@@ -1,7 +1,7 @@
import { connect } from 'react-redux';
import { setSiteId } from 'Duck/site';
import { withRouter } from 'react-router-dom';
-import { hasSiteId, siteChangeAvaliable } from 'App/routes';
+import { hasSiteId, siteChangeAvaliable, isRoute, sessions as sessionsRoute } from 'App/routes';
import { STATUS_COLOR_MAP, GREEN } from 'Types/site';
import { Icon, SlideModal } from 'UI';
import { pushNewSite } from 'Duck/user'
@@ -15,6 +15,7 @@ import { fetchList as fetchAlerts } from 'Duck/alerts';
import { fetchWatchdogStatus } from 'Duck/watchdogs';
import { withStore } from 'App/mstore'
+const SESSIONS_PATH = sessionsRoute();
@withStore
@withRouter
@connect(state => ({
@@ -47,11 +48,11 @@ export default class SiteDropdown extends React.PureComponent {
}
switchSite = (siteId) => {
- const { mstore } = this.props
+ const { mstore, location } = this.props
this.props.setSiteId(siteId);
- this.props.clearSearch();
+ this.props.clearSearch(isRoute(SESSIONS_PATH, location.pathname));
this.props.fetchIntegrationVariables();
this.props.fetchAlerts();
this.props.fetchWatchdogStatus();
diff --git a/frontend/app/duck/search.js b/frontend/app/duck/search.js
index 491b24273..4bce53249 100644
--- a/frontend/app/duck/search.js
+++ b/frontend/app/duck/search.js
@@ -159,6 +159,11 @@ export const edit = reduceThenFetchResource((instance) => ({
instance,
}));
+export const editDefault = (instance) => ({
+ type: EDIT,
+ instance,
+});
+
export const setActiveTab = reduceThenFetchResource((tab) => ({
type: SET_ACTIVE_TAB,
tab
@@ -188,8 +193,9 @@ export const updateCurrentPage = reduceThenFetchResource((page) => ({
page,
}));
-export const applySavedSearch = (filter) => (dispatch, getState) => {
- dispatch(edit({ filters: filter ? filter.filter.filters : [] }));
+export const applySavedSearch = (filter, reload = true) => (dispatch, getState) => {
+ const params = { filters: filter ? filter.filter.filters : [] };
+ dispatch(reload ? edit(params) : editDefault(params));
return dispatch({
type: APPLY_SAVED_SEARCH,
filter,
@@ -256,9 +262,9 @@ export function fetchFilterSearch(params) {
};
}
-export const clearSearch = () => (dispatch, getState) => {
- dispatch(applySavedSearch(new SavedFilter({})));
- dispatch(edit(new Filter({ filters: [] })));
+export const clearSearch = (reload = true) => (dispatch, getState) => {
+ dispatch(applySavedSearch(new SavedFilter({}), false));
+ dispatch(reload ? edit(new Filter({ filters: [] })) : editDefault(new Filter({ filters: [] })));
return dispatch({
type: CLEAR_SEARCH,
});
From 2b18939c5cff4b2de2063e9e09aa1fc75ed780a3 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Mon, 23 May 2022 15:48:40 +0200
Subject: [PATCH 43/65] fix(ui) - sessions - stop reloading on site change
---
frontend/app/components/Errors/List/List.js | 4 +---
frontend/app/components/Header/SiteDropdown.js | 6 ++----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/frontend/app/components/Errors/List/List.js b/frontend/app/components/Errors/List/List.js
index f75d25e39..b5cffb8d4 100644
--- a/frontend/app/components/Errors/List/List.js
+++ b/frontend/app/components/Errors/List/List.js
@@ -54,9 +54,7 @@ export default class List extends React.PureComponent {
}
componentDidMount() {
- if (this.props.list.size === 0) {
- this.props.applyFilter({ });
- }
+ this.props.applyFilter({ });
}
check = ({ errorId }) => {
diff --git a/frontend/app/components/Header/SiteDropdown.js b/frontend/app/components/Header/SiteDropdown.js
index 5ea1d5a9a..51bbf5cae 100644
--- a/frontend/app/components/Header/SiteDropdown.js
+++ b/frontend/app/components/Header/SiteDropdown.js
@@ -1,7 +1,7 @@
import { connect } from 'react-redux';
import { setSiteId } from 'Duck/site';
import { withRouter } from 'react-router-dom';
-import { hasSiteId, siteChangeAvaliable, isRoute, sessions as sessionsRoute } from 'App/routes';
+import { hasSiteId, siteChangeAvaliable, isRoute } from 'App/routes';
import { STATUS_COLOR_MAP, GREEN } from 'Types/site';
import { Icon, SlideModal } from 'UI';
import { pushNewSite } from 'Duck/user'
@@ -14,8 +14,6 @@ import { fetchList as fetchIntegrationVariables } from 'Duck/customField';
import { fetchList as fetchAlerts } from 'Duck/alerts';
import { fetchWatchdogStatus } from 'Duck/watchdogs';
import { withStore } from 'App/mstore'
-
-const SESSIONS_PATH = sessionsRoute();
@withStore
@withRouter
@connect(state => ({
@@ -52,7 +50,7 @@ export default class SiteDropdown extends React.PureComponent {
this.props.setSiteId(siteId);
- this.props.clearSearch(isRoute(SESSIONS_PATH, location.pathname));
+ this.props.clearSearch(location.pathname.includes('/sessions'));
this.props.fetchIntegrationVariables();
this.props.fetchAlerts();
this.props.fetchWatchdogStatus();
From 1bdaabb62e388069b49115295eb6244cc97f2747 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Wed, 25 May 2022 13:36:05 +0200
Subject: [PATCH 44/65] fix(ui) - active site in onboarding snippet
---
.../components/OnboardingTabs/InstallDocs/InstallDocs.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js
index bd2cb7d21..f68645628 100644
--- a/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js
+++ b/frontend/app/components/Onboarding/components/OnboardingTabs/InstallDocs/InstallDocs.js
@@ -30,7 +30,8 @@ function MyApp() {
}`
-function InstallDocs({ site }) {
+function InstallDocs({ sites, siteId }) {
+ const site = sites.find(s => s.id === siteId);
const _usageCode = usageCode.replace('PROJECT_KEY', site.projectKey)
const _usageCodeSST = usageCodeSST.replace('PROJECT_KEY', site.projectKey)
const [isSpa, setIsSpa] = useState(true)
@@ -102,5 +103,6 @@ function InstallDocs({ site }) {
// export default InstallDocs
export default connect(state => ({
- site: state.getIn([ 'site', 'instance' ]),
+ siteId: state.getIn([ 'site', 'siteId' ]),
+ sites: state.getIn([ 'site', 'list' ]),
}))(InstallDocs)
\ No newline at end of file
From 1842248ce34254515bc8b819818e31b77c6594ac Mon Sep 17 00:00:00 2001
From: Alex Kaminskii
Date: Wed, 25 May 2022 15:24:10 +0200
Subject: [PATCH 45/65] fix(player): apply scrolls after styles
---
.../MessageDistributor/managers/DOMManager.ts | 25 ++++++++++---------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/frontend/app/player/MessageDistributor/managers/DOMManager.ts b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
index be8e5d18d..0211794b8 100644
--- a/frontend/app/player/MessageDistributor/managers/DOMManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
@@ -298,25 +298,26 @@ export default class DOMManager extends ListWalker {
}
moveReady(t: number): Promise {
- this.moveApply(t, this.applyMessage); // This function autoresets pointer if necessary (better name?)
- this.nodeScrollManagers.forEach(manager => {
- const msg = manager.moveToLast(t); // TODO: reset (?)
-
- if (!!msg && !!this.nl[msg.id]) {
- const node = this.nl[msg.id] as HTMLElement;
- node.scrollLeft = msg.x;
- node.scrollTop = msg.y;
- }
- });
+ this.moveApply(t, this.applyMessage) // This function autoresets pointer if necessary (better name?)
/* Mount body as late as possible */
if (this.postponedBodyMessage != null) {
this.insertNode(this.postponedBodyMessage)
- this.postponedBodyMessage = null;
+ this.postponedBodyMessage = null
}
// Thinkabout (read): css preload
// What if we go back before it is ready? We'll have two handlres?
- return this.stylesManager.moveReady(t);
+ return this.stylesManager.moveReady(t).then(() => {
+ // Apply all scrolls after the styles got applied
+ this.nodeScrollManagers.forEach(manager => {
+ const msg = manager.moveGetLast(t)
+ if (!!msg && !!this.nl[msg.id]) {
+ const node = this.nl[msg.id] as HTMLElement
+ node.scrollLeft = msg.x
+ node.scrollTop = msg.y
+ }
+ })
+ })
}
}
\ No newline at end of file
From a113416ec7aac4a89e5b7acc2472bbd0571b39be Mon Sep 17 00:00:00 2001
From: Alex Kaminskii
Date: Wed, 25 May 2022 15:53:19 +0200
Subject: [PATCH 46/65] fix(player): main-version codefix
---
frontend/app/player/MessageDistributor/managers/DOMManager.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/app/player/MessageDistributor/managers/DOMManager.ts b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
index 0211794b8..fa3f4978d 100644
--- a/frontend/app/player/MessageDistributor/managers/DOMManager.ts
+++ b/frontend/app/player/MessageDistributor/managers/DOMManager.ts
@@ -311,7 +311,7 @@ export default class DOMManager extends ListWalker {
return this.stylesManager.moveReady(t).then(() => {
// Apply all scrolls after the styles got applied
this.nodeScrollManagers.forEach(manager => {
- const msg = manager.moveGetLast(t)
+ const msg = manager.moveToLast(t)
if (!!msg && !!this.nl[msg.id]) {
const node = this.nl[msg.id] as HTMLElement
node.scrollLeft = msg.x
From e78fe009de8f61c5dbf0be811c215cbee1773637 Mon Sep 17 00:00:00 2001
From: Shekar Siri
Date: Mon, 30 May 2022 12:01:03 +0200
Subject: [PATCH 47/65] fix(ui) - user id filter with query params
---
.../app/components/BugFinder/BugFinder.js | 29 ++++---------------
1 file changed, 6 insertions(+), 23 deletions(-)
diff --git a/frontend/app/components/BugFinder/BugFinder.js b/frontend/app/components/BugFinder/BugFinder.js
index 40652c94a..b3e3dbc0a 100644
--- a/frontend/app/components/BugFinder/BugFinder.js
+++ b/frontend/app/components/BugFinder/BugFinder.js
@@ -6,7 +6,6 @@ import {
} from 'Duck/sessions';
import { applyFilter, clearEvents, addAttribute } from 'Duck/filters';
import { fetchList as fetchFunnelsList } from 'Duck/funnels';
-import { KEYS } from 'Types/filter/customFilter';
import SessionList from './SessionList';
import stl from './bugFinder.css';
import withLocationHandlers from "HOCs/withLocationHandlers";
@@ -20,11 +19,10 @@ import { LAST_7_DAYS } from 'Types/app/period';
import { resetFunnel } from 'Duck/funnels';
import { resetFunnelFilters } from 'Duck/funnelFilters'
import NoSessionsMessage from 'Shared/NoSessionsMessage';
-// import TrackerUpdateMessage from 'Shared/TrackerUpdateMessage';
import SessionSearch from 'Shared/SessionSearch';
import MainSearchBar from 'Shared/MainSearchBar';
import { clearSearch, fetchSessions, addFilterByKeyAndValue } from 'Duck/search';
-import { FilterCategory, FilterKey, IssueType } from 'Types/filter/filterType';
+import { FilterKey } from 'Types/filter/filterType';
const weakEqual = (val1, val2) => {
if (!!val1 === false && !!val2 === false) return true;
@@ -80,32 +78,18 @@ export default class BugFinder extends React.PureComponent {
state = {showRehydratePanel: false}
constructor(props) {
super(props);
-
- // TODO should cache the response
- // props.fetchSources().then(() => {
- // defaultFilters[6] = {
- // category: 'Collaboration',
- // type: 'CUSTOM',
- // keys: this.props.sources.filter(({type}) => type === 'collaborationTool').map(({ label, key }) => ({ type: 'CUSTOM', source: key, label: label, key, icon: 'integrations/' + key, isFilter: false })).toJS()
- // };
- // defaultFilters[7] = {
- // category: 'Logging Tools',
- // type: 'ERROR',
- // keys: this.props.sources.filter(({type}) => type === 'logTool').map(({ label, key }) => ({ type: 'ERROR', source: key, label: label, key, icon: 'integrations/' + key, isFilter: false })).toJS()
- // };
- // });
- if (props.sessions.size === 0) {
- props.fetchSessions();
- }
props.resetFunnel();
props.resetFunnelFilters();
props.fetchFunnelsList(LAST_7_DAYS)
const queryFilter = this.props.query.all(allowedQueryKeys);
if (queryFilter.hasOwnProperty('userId')) {
- // props.addAttribute({ label: 'User Id', key: KEYS.USERID, type: KEYS.USERID, operator: 'is', value: queryFilter.userId })
props.addFilterByKeyAndValue(FilterKey.USERID, queryFilter.userId);
- }
+ } else {
+ if (props.sessions.size === 0) {
+ props.fetchSessions();
+ }
+ }
}
componentDidMount() {
@@ -133,7 +117,6 @@ export default class BugFinder extends React.PureComponent {
/>
- {/*
*/}
From cc726d1dbe72490af2fbb6201a262f8cc65df7b3 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Tue, 31 May 2022 10:14:55 +0100
Subject: [PATCH 48/65] feat(api): refactored user-auth
---
api/auth/auth_jwt.py | 18 ++++++++++--------
api/chalicelib/core/users.py | 14 +++++++-------
ee/api/chalicelib/core/users.py | 14 +++++++-------
3 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/api/auth/auth_jwt.py b/api/auth/auth_jwt.py
index 1ac8d5d79..4eff80789 100644
--- a/api/auth/auth_jwt.py
+++ b/api/auth/auth_jwt.py
@@ -19,10 +19,14 @@ class JWTAuth(HTTPBearer):
if not credentials.scheme == "Bearer":
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid authentication scheme.")
jwt_payload = authorizers.jwt_authorizer(credentials.scheme + " " + credentials.credentials)
+ auth_exists = jwt_payload is not None \
+ and users.auth_exists(user_id=jwt_payload.get("userId", -1),
+ tenant_id=jwt_payload.get("tenantId", -1),
+ jwt_iat=jwt_payload.get("iat", 100),
+ jwt_aud=jwt_payload.get("aud", ""))
if jwt_payload is None \
or jwt_payload.get("iat") is None or jwt_payload.get("aud") is None \
- or not users.auth_exists(user_id=jwt_payload["userId"], tenant_id=jwt_payload["tenantId"],
- jwt_iat=jwt_payload["iat"], jwt_aud=jwt_payload["aud"]):
+ or not auth_exists:
print("JWTAuth: Token issue")
if jwt_payload is not None:
print(jwt_payload)
@@ -34,21 +38,19 @@ class JWTAuth(HTTPBearer):
print("JWTAuth: iat is None")
if jwt_payload is not None and jwt_payload.get("aud") is None:
print("JWTAuth: aud is None")
- if jwt_payload is not None and \
- not users.auth_exists(user_id=jwt_payload["userId"], tenant_id=jwt_payload["tenantId"],
- jwt_iat=jwt_payload["iat"], jwt_aud=jwt_payload["aud"]):
+ if jwt_payload is not None and not auth_exists:
print("JWTAuth: not users.auth_exists")
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid token or expired token.")
- user = users.get(user_id=jwt_payload["userId"], tenant_id=jwt_payload["tenantId"])
+ user = users.get(user_id=jwt_payload.get("userId", -1), tenant_id=jwt_payload.get("tenantId", -1))
if user is None:
print("JWTAuth: User not found.")
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="User not found.")
jwt_payload["authorizer_identity"] = "jwt"
print(jwt_payload)
request.state.authorizer_identity = "jwt"
- request.state.currentContext = CurrentContext(tenant_id=jwt_payload["tenantId"],
- user_id=jwt_payload["userId"],
+ request.state.currentContext = CurrentContext(tenant_id=jwt_payload.get("tenantId", -1),
+ user_id=jwt_payload.get("userId", -1),
email=user["email"])
return request.state.currentContext
diff --git a/api/chalicelib/core/users.py b/api/chalicelib/core/users.py
index ceada34f8..591ffd264 100644
--- a/api/chalicelib/core/users.py
+++ b/api/chalicelib/core/users.py
@@ -562,13 +562,13 @@ def auth_exists(user_id, tenant_id, jwt_iat, jwt_aud):
{"userId": user_id})
)
r = cur.fetchone()
- return r is not None \
- and r.get("jwt_iat") is not None \
- and (abs(jwt_iat - TimeUTC.datetime_to_timestamp(r["jwt_iat"]) // 1000) <= 1 \
- or (jwt_aud.startswith("plugin") \
- and (r["changed_at"] is None \
- or jwt_iat >= (TimeUTC.datetime_to_timestamp(r["changed_at"]) // 1000)))
- )
+ return r is not None \
+ and r.get("jwt_iat") is not None \
+ and (abs(jwt_iat - TimeUTC.datetime_to_timestamp(r["jwt_iat"]) // 1000) <= 1 \
+ or (jwt_aud.startswith("plugin") \
+ and (r["changed_at"] is None \
+ or jwt_iat >= (TimeUTC.datetime_to_timestamp(r["changed_at"]) // 1000)))
+ )
def authenticate(email, password, for_change_password=False, for_plugin=False):
diff --git a/ee/api/chalicelib/core/users.py b/ee/api/chalicelib/core/users.py
index b70f6a269..bfb4936b8 100644
--- a/ee/api/chalicelib/core/users.py
+++ b/ee/api/chalicelib/core/users.py
@@ -611,13 +611,13 @@ def auth_exists(user_id, tenant_id, jwt_iat, jwt_aud):
{"userId": user_id, "tenant_id": tenant_id})
)
r = cur.fetchone()
- return r is not None \
- and r.get("jwt_iat") is not None \
- and (abs(jwt_iat - TimeUTC.datetime_to_timestamp(r["jwt_iat"]) // 1000) <= 1 \
- or (jwt_aud.startswith("plugin") \
- and (r["changed_at"] is None \
- or jwt_iat >= (TimeUTC.datetime_to_timestamp(r["changed_at"]) // 1000)))
- )
+ return r is not None \
+ and r.get("jwt_iat") is not None \
+ and (abs(jwt_iat - TimeUTC.datetime_to_timestamp(r["jwt_iat"]) // 1000) <= 1 \
+ or (jwt_aud.startswith("plugin") \
+ and (r["changed_at"] is None \
+ or jwt_iat >= (TimeUTC.datetime_to_timestamp(r["changed_at"]) // 1000)))
+ )
def change_jwt_iat(user_id):
From ca72d8b09d213a05b2230eec1c46497c20c9e123 Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Fri, 3 Jun 2022 12:47:44 +0200
Subject: [PATCH 49/65] chore(actions): enable build from branch
---
.github/workflows/api-ee.yaml | 1 +
.github/workflows/utilities.yaml | 1 +
.github/workflows/workers-ee.yaml | 1 +
.github/workflows/workers.yaml | 1 +
4 files changed, 4 insertions(+)
diff --git a/.github/workflows/api-ee.yaml b/.github/workflows/api-ee.yaml
index cfd3ca07e..70ecb8757 100644
--- a/.github/workflows/api-ee.yaml
+++ b/.github/workflows/api-ee.yaml
@@ -1,5 +1,6 @@
# This action will push the chalice changes to aws
on:
+ workflow_dispatch:
push:
branches:
- dev
diff --git a/.github/workflows/utilities.yaml b/.github/workflows/utilities.yaml
index 603c09126..45e238d20 100644
--- a/.github/workflows/utilities.yaml
+++ b/.github/workflows/utilities.yaml
@@ -1,5 +1,6 @@
# This action will push the utilities changes to aws
on:
+ workflow_dispatch:
push:
branches:
- dev
diff --git a/.github/workflows/workers-ee.yaml b/.github/workflows/workers-ee.yaml
index a61d75160..0a8c12a73 100644
--- a/.github/workflows/workers-ee.yaml
+++ b/.github/workflows/workers-ee.yaml
@@ -1,6 +1,7 @@
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
on:
+ workflow_dispatch:
push:
branches:
- dev
diff --git a/.github/workflows/workers.yaml b/.github/workflows/workers.yaml
index 49fd0948b..00aa71912 100644
--- a/.github/workflows/workers.yaml
+++ b/.github/workflows/workers.yaml
@@ -1,6 +1,7 @@
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
on:
+ workflow_dispatch:
push:
branches:
- dev
From d4d89e6f2bfac15097a560d32224d1a1586d790b Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 9 Jun 2022 15:51:37 +0200
Subject: [PATCH 50/65] :broom: Fixed Slack url
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index ee91f95ea..43cc5d0b9 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,7 @@ For those who want to simply use OpenReplay as a service, [sign up](https://app.
Please refer to the [official OpenReplay documentation](https://docs.openreplay.com/). That should help you troubleshoot common issues. For additional help, you can reach out to us on one of these channels:
-- [Discord](https://discord.openreplay.com)Â (Connect with our engineers and community)
+- [Slack](https://slack.openreplay.com)Â (Connect with our engineers and community)
- [GitHub](https://github.com/openreplay/openreplay/issues)Â (Bug and issue reports)
- [Twitter](https://twitter.com/OpenReplayHQ)Â (Product updates, Great content)
- [Website chat](https://openreplay.com) (Talk to us)
From 4d1a13d8f56484142e6e3265ab09155d81cf5638 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Mon, 13 Jun 2022 13:19:24 +0200
Subject: [PATCH 51/65] feat(api): optimised get session details
---
api/chalicelib/core/events.py | 7 +++----
api/chalicelib/core/resources.py | 13 ++++++++++---
api/chalicelib/core/sessions.py | 6 ++++--
ee/api/chalicelib/core/resources.py | 12 +++++++++---
4 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/api/chalicelib/core/events.py b/api/chalicelib/core/events.py
index 272b86002..c2e2edfe1 100644
--- a/api/chalicelib/core/events.py
+++ b/api/chalicelib/core/events.py
@@ -464,14 +464,13 @@ def search(text, event_type, project_id, source, key):
return {"data": rows}
-def get_errors_by_session_id(session_id):
+def get_errors_by_session_id(session_id, project_id):
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""\
SELECT er.*,ur.*, er.timestamp - s.start_ts AS time
FROM {event_type.ERROR.table} AS er INNER JOIN public.errors AS ur USING (error_id) INNER JOIN public.sessions AS s USING (session_id)
- WHERE
- er.session_id = %(session_id)s
- ORDER BY timestamp;""", {"session_id": session_id}))
+ WHERE er.session_id = %(session_id)s AND s.project_id=%(project_id)s
+ ORDER BY timestamp;""", {"session_id": session_id, "project_id": project_id}))
errors = cur.fetchall()
for e in errors:
e["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(e["stacktrace_parsed_at"])
diff --git a/api/chalicelib/core/resources.py b/api/chalicelib/core/resources.py
index d85e56b6f..1e2f4718e 100644
--- a/api/chalicelib/core/resources.py
+++ b/api/chalicelib/core/resources.py
@@ -1,8 +1,10 @@
from chalicelib.utils import helper, pg_client
+from decouple import config
-def get_by_session_id(session_id, project_id):
+def get_by_session_id(session_id, project_id, start_ts, duration):
with pg_client.PostgresClient() as cur:
+ delta = config("events_ts_delta", cast=int, default=5 * 60) * 1000
ch_query = """\
SELECT
timestamp AS datetime,
@@ -16,8 +18,13 @@ def get_by_session_id(session_id, project_id):
success,
COALESCE(status, CASE WHEN success THEN 200 END) AS status
FROM events.resources INNER JOIN sessions USING (session_id)
- WHERE session_id = %(session_id)s AND project_id= %(project_id)s;"""
- params = {"session_id": session_id, "project_id": project_id}
+ WHERE session_id = %(session_id)s
+ AND project_id= %(project_id)s
+ AND sessions.start_ts=%(start_ts)s
+ AND resources.timestamp>=%(res_start_ts)s
+ AND resources.timestamp>=%(res_end_ts)s;"""
+ params = {"session_id": session_id, "project_id": project_id, "start_ts": start_ts, "duration": duration,
+ "res_start_ts": start_ts - delta, "res_end_ts": start_ts + duration + delta, }
cur.execute(cur.mogrify(ch_query, params))
rows = cur.fetchall()
return helper.list_to_camel_case(rows)
diff --git a/api/chalicelib/core/sessions.py b/api/chalicelib/core/sessions.py
index adc549d1e..95a6bdd50 100644
--- a/api/chalicelib/core/sessions.py
+++ b/api/chalicelib/core/sessions.py
@@ -85,7 +85,7 @@ def get_by_id2_pg(project_id, session_id, user_id, full_data=False, include_fav_
else:
data['events'] = events.get_by_sessionId2_pg(project_id=project_id, session_id=session_id,
group_clickrage=True)
- all_errors = events.get_errors_by_session_id(session_id=session_id)
+ all_errors = events.get_errors_by_session_id(session_id=session_id, project_id=project_id)
data['stackEvents'] = [e for e in all_errors if e['source'] != "js_exception"]
# to keep only the first stack
data['errors'] = [errors.format_first_stack_frame(e) for e in all_errors if
@@ -94,7 +94,9 @@ def get_by_id2_pg(project_id, session_id, user_id, full_data=False, include_fav_
data['userEvents'] = events.get_customs_by_sessionId2_pg(project_id=project_id,
session_id=session_id)
data['mobsUrl'] = sessions_mobs.get_web(sessionId=session_id)
- data['resources'] = resources.get_by_session_id(session_id=session_id, project_id=project_id)
+ data['resources'] = resources.get_by_session_id(session_id=session_id, project_id=project_id,
+ start_ts=data["start_ts"],
+ duration=data["duration"])
data['metadata'] = __group_metadata(project_metadata=data.pop("projectMetadata"), session=data)
data['issues'] = issues.get_by_session_id(session_id=session_id)
diff --git a/ee/api/chalicelib/core/resources.py b/ee/api/chalicelib/core/resources.py
index 4e4f1c4e8..7666e66cf 100644
--- a/ee/api/chalicelib/core/resources.py
+++ b/ee/api/chalicelib/core/resources.py
@@ -1,16 +1,22 @@
from chalicelib.utils import helper
from chalicelib.utils import ch_client
from chalicelib.utils.TimeUTC import TimeUTC
+from decouple import config
-def get_by_session_id(session_id, project_id):
+def get_by_session_id(session_id, project_id, start_ts, duration):
with ch_client.ClickHouseClient() as ch:
+ delta = config("events_ts_delta", cast=int, default=5 * 60) * 1000
ch_query = """\
SELECT
datetime,url,type,duration,ttfb,header_size,encoded_body_size,decoded_body_size,success,coalesce(status,if(success, 200, status)) AS status
FROM resources
- WHERE session_id = toUInt64(%(session_id)s) AND project_id=%(project_id)s;"""
- params = {"session_id": session_id, "project_id": project_id}
+ WHERE session_id = toUInt64(%(session_id)s)
+ AND project_id=%(project_id)s
+ AND datetime >= toDateTime(%(res_start_ts)s / 1000)
+ AND datetime <= toDateTime(%(res_end_ts)s / 1000);"""
+ params = {"session_id": session_id, "project_id": project_id, "start_ts": start_ts, "duration": duration,
+ "res_start_ts": start_ts - delta, "res_end_ts": start_ts + duration + delta, }
rows = ch.execute(query=ch_query, params=params)
results = []
for r in rows:
From 3cb45b7a908627370f1d49f7aa0e9e2c0eabaee2 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Fri, 10 Jun 2022 17:36:22 +0200
Subject: [PATCH 52/65] feat(api): limited long task DB
---
api/chalicelib/core/sessions.py | 6 +++---
api/chalicelib/utils/pg_client.py | 11 ++++++++---
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/api/chalicelib/core/sessions.py b/api/chalicelib/core/sessions.py
index 95a6bdd50..e5fa913dc 100644
--- a/api/chalicelib/core/sessions.py
+++ b/api/chalicelib/core/sessions.py
@@ -1201,7 +1201,7 @@ def get_session_ids_by_user_ids(project_id, user_ids):
def delete_sessions_by_session_ids(session_ids):
- with pg_client.PostgresClient(long_query=True) as cur:
+ with pg_client.PostgresClient(unlimited_query=True) as cur:
query = cur.mogrify(
"""\
DELETE FROM public.sessions
@@ -1215,7 +1215,7 @@ def delete_sessions_by_session_ids(session_ids):
def delete_sessions_by_user_ids(project_id, user_ids):
- with pg_client.PostgresClient(long_query=True) as cur:
+ with pg_client.PostgresClient(unlimited_query=True) as cur:
query = cur.mogrify(
"""\
DELETE FROM public.sessions
@@ -1229,6 +1229,6 @@ def delete_sessions_by_user_ids(project_id, user_ids):
def count_all():
- with pg_client.PostgresClient(long_query=True) as cur:
+ with pg_client.PostgresClient(unlimited_query=True) as cur:
row = cur.execute(query="SELECT COUNT(session_id) AS count FROM public.sessions")
return row.get("count", 0)
diff --git a/api/chalicelib/utils/pg_client.py b/api/chalicelib/utils/pg_client.py
index 3d60dda5c..1655a9579 100644
--- a/api/chalicelib/utils/pg_client.py
+++ b/api/chalicelib/utils/pg_client.py
@@ -74,12 +74,17 @@ class PostgresClient:
cursor = None
long_query = False
- def __init__(self, long_query=False):
+ def __init__(self, long_query=False, unlimited_query=False):
self.long_query = long_query
- if long_query:
+ if unlimited_query:
+ long_config = dict(_PG_CONFIG)
+ long_config["application_name"] += "-UNLIMITED"
+ self.connection = psycopg2.connect(**long_config)
+ elif long_query:
long_config = dict(_PG_CONFIG)
long_config["application_name"] += "-LONG"
- self.connection = psycopg2.connect(**_PG_CONFIG)
+ long_config["options"] = f"-c statement_timeout={config('pg_long_timeout', cast=int, default=5*60) * 1000}"
+ self.connection = psycopg2.connect(**long_config)
else:
self.connection = postgreSQL_pool.getconn()
From 78a7e85392352731ceaae3fbc0eb608054330cf5 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Fri, 10 Jun 2022 11:35:25 +0200
Subject: [PATCH 53/65] feat(api): changed connexion pool configuration
feat(alerts): changed connexion pool configuration
---
api/.env.default | 3 ++-
api/Dockerfile.alerts | 1 +
api/chalicelib/utils/pg_client.py | 4 +++-
ee/api/.env.default | 3 ++-
ee/api/Dockerfile.alerts | 1 +
5 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/api/.env.default b/api/.env.default
index 30ff0b02d..aa14fc993 100644
--- a/api/.env.default
+++ b/api/.env.default
@@ -36,7 +36,8 @@ pg_password=asayerPostgres
pg_port=5432
pg_user=postgres
pg_timeout=30
-pg_minconn=45
+pg_minconn=20
+pg_maxconn=50
PG_RETRY_MAX=50
PG_RETRY_INTERVAL=2
put_S3_TTL=20
diff --git a/api/Dockerfile.alerts b/api/Dockerfile.alerts
index 76e8c262a..59356aae8 100644
--- a/api/Dockerfile.alerts
+++ b/api/Dockerfile.alerts
@@ -6,6 +6,7 @@ COPY . .
RUN pip install -r requirements.txt
RUN mv .env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh
ENV pg_minconn 2
+ENV pg_maxconn 10
ENV APP_NAME alerts
# Add Tini
diff --git a/api/chalicelib/utils/pg_client.py b/api/chalicelib/utils/pg_client.py
index 1655a9579..2abc9f6c7 100644
--- a/api/chalicelib/utils/pg_client.py
+++ b/api/chalicelib/utils/pg_client.py
@@ -52,7 +52,9 @@ def make_pool():
except (Exception, psycopg2.DatabaseError) as error:
print("Error while closing all connexions to PostgreSQL", error)
try:
- postgreSQL_pool = ORThreadedConnectionPool(config("pg_minconn", cast=int, default=20), 100, **PG_CONFIG)
+ postgreSQL_pool = ORThreadedConnectionPool(config("pg_minconn", cast=int, default=20),
+ config("pg_maxconn", cast=int, default=80),
+ **PG_CONFIG)
if (postgreSQL_pool):
print("Connection pool created successfully")
except (Exception, psycopg2.DatabaseError) as error:
diff --git a/ee/api/.env.default b/ee/api/.env.default
index 8215908b2..7687566d7 100644
--- a/ee/api/.env.default
+++ b/ee/api/.env.default
@@ -45,7 +45,8 @@ pg_password=asayerPostgres
pg_port=5432
pg_user=postgres
pg_timeout=30
-pg_minconn=45
+pg_minconn=20
+pg_maxconn=50
PG_RETRY_MAX=50
PG_RETRY_INTERVAL=2
put_S3_TTL=20
diff --git a/ee/api/Dockerfile.alerts b/ee/api/Dockerfile.alerts
index 6aec0f98b..3784045e0 100644
--- a/ee/api/Dockerfile.alerts
+++ b/ee/api/Dockerfile.alerts
@@ -7,6 +7,7 @@ COPY . .
RUN pip install -r requirements.txt
RUN mv .env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh
ENV pg_minconn 2
+ENV pg_maxconn 10
ENV APP_NAME alerts
# Add Tini
From f33afd3a09db3e4a66342befdda243318661dbb1 Mon Sep 17 00:00:00 2001
From: Taha Yassine Kraiem
Date: Mon, 13 Jun 2022 15:24:21 +0200
Subject: [PATCH 54/65] feat(api): get sessions details fix
---
api/chalicelib/core/sessions.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/api/chalicelib/core/sessions.py b/api/chalicelib/core/sessions.py
index e5fa913dc..b2c3e2b11 100644
--- a/api/chalicelib/core/sessions.py
+++ b/api/chalicelib/core/sessions.py
@@ -95,7 +95,7 @@ def get_by_id2_pg(project_id, session_id, user_id, full_data=False, include_fav_
session_id=session_id)
data['mobsUrl'] = sessions_mobs.get_web(sessionId=session_id)
data['resources'] = resources.get_by_session_id(session_id=session_id, project_id=project_id,
- start_ts=data["start_ts"],
+ start_ts=data["startTs"],
duration=data["duration"])
data['metadata'] = __group_metadata(project_metadata=data.pop("projectMetadata"), session=data)
From 29472f4b4db606545e288ea5cb3b690b2b813245 Mon Sep 17 00:00:00 2001
From: rjshrjndrn
Date: Fri, 17 Jun 2022 11:01:13 +0200
Subject: [PATCH 55/65] ci(workers): build both ee and oss for deployment
changes
Signed-off-by: rjshrjndrn
---
.github/workflows/api-ee.yaml | 1 +
.github/workflows/workers-ee.yaml | 1 +
2 files changed, 2 insertions(+)
diff --git a/.github/workflows/api-ee.yaml b/.github/workflows/api-ee.yaml
index 70ecb8757..f66e408b7 100644
--- a/.github/workflows/api-ee.yaml
+++ b/.github/workflows/api-ee.yaml
@@ -6,6 +6,7 @@ on:
- dev
paths:
- ee/api/**
+ - api/**
name: Build and Deploy Chalice EE
diff --git a/.github/workflows/workers-ee.yaml b/.github/workflows/workers-ee.yaml
index 0a8c12a73..1637bb794 100644
--- a/.github/workflows/workers-ee.yaml
+++ b/.github/workflows/workers-ee.yaml
@@ -7,6 +7,7 @@ on:
- dev
paths:
- ee/backend/**
+ - backend/**
name: Build and deploy workers EE
From 449890320ef7bd07720c2d70a1de009a391bedcd Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Fri, 17 Jun 2022 12:29:32 +0200
Subject: [PATCH 56/65] Added OVHcloud deployment link
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 43cc5d0b9..0f9f35669 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,7 @@ OpenReplay can be deployed anywhere. Follow our step-by-step guides for deployin
- [Azure](https://docs.openreplay.com/deployment/deploy-azure)
- [Digital Ocean](https://docs.openreplay.com/deployment/deploy-digitalocean)
- [Scaleway](https://docs.openreplay.com/deployment/deploy-scaleway)
+- [OVHcloud](https://docs.openreplay.com/deployment/deploy-ovhcloud)
- [Kubernetes](https://docs.openreplay.com/deployment/deploy-kubernetes)
## OpenReplay Cloud
From 270e9ca46addcf0a37ca861a81db2b37d190d1f2 Mon Sep 17 00:00:00 2001
From: Rajesh Rajendran
Date: Fri, 17 Jun 2022 11:03:40 +0000
Subject: [PATCH 57/65] feat(backend/db): send metadata directly to db (removed
from batches) (#544)
Co-authored-by: Alexander Zavorotynskiy
---
backend/pkg/db/postgres/messages-common.go | 3 +--
backend/services/db/messages.go | 6 +++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/backend/pkg/db/postgres/messages-common.go b/backend/pkg/db/postgres/messages-common.go
index 1f4f781ce..223fcade6 100644
--- a/backend/pkg/db/postgres/messages-common.go
+++ b/backend/pkg/db/postgres/messages-common.go
@@ -155,12 +155,11 @@ func (conn *Conn) InsertUserAnonymousID(sessionID uint64, userAnonymousID string
}
func (conn *Conn) InsertMetadata(sessionID uint64, keyNo uint, value string) error {
- return conn.batchQueue(sessionID, fmt.Sprintf(`
+ return conn.exec(fmt.Sprintf(`
UPDATE sessions SET metadata_%v = $1
WHERE session_id = $2`, keyNo),
value, sessionID,
)
- // conn.insertAutocompleteValue(sessionID, "METADATA", value)
}
func (conn *Conn) InsertIssueEvent(sessionID uint64, projectID uint32, e *messages.IssueEvent) error {
diff --git a/backend/services/db/messages.go b/backend/services/db/messages.go
index d3e4ae1ed..c80432fe8 100644
--- a/backend/services/db/messages.go
+++ b/backend/services/db/messages.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
. "openreplay/backend/pkg/messages"
)
@@ -8,7 +9,10 @@ func insertMessage(sessionID uint64, msg Message) error {
switch m := msg.(type) {
// Common
case *Metadata:
- return pg.InsertMetadata(sessionID, m)
+ if err := pg.InsertMetadata(sessionID, m); err != nil {
+ return fmt.Errorf("insert metadata err: %s", err)
+ }
+ return nil
case *IssueEvent:
return pg.InsertIssueEvent(sessionID, m)
//TODO: message adapter (transformer) (at the level of pkg/message) for types:
From 68e5555f25a549e8ce438f9e2d5f8c5b0365c41c Mon Sep 17 00:00:00 2001
From: Rajesh Rajendran
Date: Tue, 21 Jun 2022 10:48:51 +0000
Subject: [PATCH 58/65] feat(backend): added metadata insertion retrier (temp
solution) (#548)
Co-authored-by: Alexander Zavorotynskiy
---
backend/pkg/db/cache/messages-common.go | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/backend/pkg/db/cache/messages-common.go b/backend/pkg/db/cache/messages-common.go
index 8ca7b2f85..90b97efbf 100644
--- a/backend/pkg/db/cache/messages-common.go
+++ b/backend/pkg/db/cache/messages-common.go
@@ -1,7 +1,9 @@
package cache
import (
+ "log"
. "openreplay/backend/pkg/messages"
+ "time"
// . "openreplay/backend/pkg/db/types"
)
@@ -45,6 +47,12 @@ func (c *PGCache) InsertMetadata(sessionID uint64, metadata *Metadata) error {
return nil
}
if err := c.Conn.InsertMetadata(sessionID, keyNo, metadata.Value); err != nil {
+ // Try to insert metadata after one minute
+ time.AfterFunc(time.Minute, func() {
+ if err := c.Conn.InsertMetadata(sessionID, keyNo, metadata.Value); err != nil {
+ log.Printf("metadata retry err: %s", err)
+ }
+ })
return err
}
session.SetMetadata(keyNo, metadata.Value)
From 8886e4f3e24603a1fe1c0cf9aa6f20d01d8bfe4f Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 23 Jun 2022 11:56:52 +0200
Subject: [PATCH 59/65] Update issue templates
---
.github/ISSUE_TEMPLATE/bug_report.md | 33 ++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000..06ae8de54
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,33 @@
+---
+name: Bug report
+about: Report an issue and help improve OpenReplay.
+title: ''
+labels: bug
+assignees: estradino
+
+---
+
+**Describe the issue**
+A short description of what the issue is.
+
+**Steps to reproduce the issue**
+1. Step 1
+2. Step 2
+3. You got it :)
+
+**Expected behavior**
+What you expected to happen.
+
+**Screenshots**
+If possible, that would be make our life easier.
+
+**OpenReplay Environment**
+ - Frontend stack [e.g. React/Axios/MobX, Next]
+ - OpenReplay version: [e.g. 1.6.0]
+ - Tracker version: [e.g. 3.5.10]
+ - Plugins used: [e.g. Fetch, Redux]
+ - Cloud provider: [e.g. AWS, GCP]
+ - System specs: [e.g. 2vCPU/16Gb with 50Gb of storage]
+
+**Additional context**
+Add additional information you think might be relevant for this behavior.
From 21d168b1961abb615641e7e36cb308fb2dc715b0 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 23 Jun 2022 12:00:32 +0200
Subject: [PATCH 60/65] Update issue templates
---
.github/ISSUE_TEMPLATE/feature_request.md | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 000000000..4579d6608
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,10 @@
+---
+name: Feature request
+about: Suggest an idea or a feature to improve OpenReplay
+title: ''
+labels: feature-request
+assignees: estradino
+
+---
+
+Briefly describe the feature you would like to see shipped with the upcoming versions of OpenReplay, the use-case (very important to us) and the alternatives solutions you've considered.
From 08e3b205fd583e48c974794116f77fb4769b2a7f Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 23 Jun 2022 12:00:53 +0200
Subject: [PATCH 61/65] Update issue templates
---
.github/ISSUE_TEMPLATE/bug_report.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 06ae8de54..9974e35bf 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,6 +1,6 @@
---
name: Bug report
-about: Report an issue and help improve OpenReplay.
+about: Report an issue and help improve OpenReplay
title: ''
labels: bug
assignees: estradino
From 4c2ee49d14879cbe8138cbe3d5c5e511b5559867 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 23 Jun 2022 12:12:34 +0200
Subject: [PATCH 62/65] Create config.yml
---
.github/ISSUE_TEMPLATE/config.yml | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/config.yml
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..23ecbd8cb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,11 @@
+blank_issues_enabled: true
+contact_links:
+ - name: Documentation Request
+ url: https://github.com/openreplay/documentation/issues
+ about: Report a mistake or suggest anything we might be missing in the docs
+ - name: Discussions
+ url: https://github.com/openreplay/openreplay/discussions
+ about: Ask and answer various questions on GitHub Discussions
+ - name: Join our Slack Community
+ url: https://slack.openreplay.com
+ about: Take the discussion further by joining our community on Slack
From 466ca5f971dd87c264e2b293a181e7b89f0c9dd3 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 23 Jun 2022 12:15:35 +0200
Subject: [PATCH 63/65] Update issue templates
---
.github/ISSUE_TEMPLATE/bug_report.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 9974e35bf..78cc7c8f3 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -22,7 +22,7 @@ What you expected to happen.
If possible, that would be make our life easier.
**OpenReplay Environment**
- - Frontend stack [e.g. React/Axios/MobX, Next]
+ - Frontend stack: [e.g. React/Axios/MobX, Next]
- OpenReplay version: [e.g. 1.6.0]
- Tracker version: [e.g. 3.5.10]
- Plugins used: [e.g. Fetch, Redux]
From 6bb7ed3f0ff9ab65e2753fbb4caf8324131e3f66 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Thu, 23 Jun 2022 12:16:05 +0200
Subject: [PATCH 64/65] Update issue templates
---
.github/ISSUE_TEMPLATE/feature_request.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 4579d6608..7121b13e4 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -7,4 +7,4 @@ assignees: estradino
---
-Briefly describe the feature you would like to see shipped with the upcoming versions of OpenReplay, the use-case (very important to us) and the alternatives solutions you've considered.
+Briefly describe the feature you would like to see shipped with the upcoming versions of OpenReplay, the use-case (very important to us) and the alternative solutions you've considered so far.
From 2a6ca316915251e52b104ca6365ba5bdf68d6072 Mon Sep 17 00:00:00 2001
From: Mehdi Osman
Date: Wed, 29 Jun 2022 14:41:28 +0200
Subject: [PATCH 65/65] Update LICENSE.md
---
ee/LICENSE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ee/LICENSE.md b/ee/LICENSE.md
index 5f6043f8f..ed992009e 100644
--- a/ee/LICENSE.md
+++ b/ee/LICENSE.md
@@ -1,4 +1,4 @@
The OpenReplay Enterprise license (the “Enterprise License”)
-Copyright (c) 2022 Asayer SAS.
+Copyright (c) 2022 Asayer, Inc.
To license the Enterprise Edition of OpenReplay, and take advantage of its additional features, functionality and support, you must agree to the terms of the OpenReplay Enterprise License Agreement. Please contact OpenReplay at [sales@openreplay.com](mailto:sales@openreplay.com).