Compare commits

...
Sign in to create a new pull request.

2018 commits

Author SHA1 Message Date
nick-delirium
90510aa33b ui: fix double metric selection in list 2025-06-06 16:19:54 +02:00
GitHub Action
96a70f5d41 Increment frontend chart version to v1.22.42 2025-06-04 11:41:56 +02:00
rjshrjndrn
d4a13edcf0 fix(actions): frontend image with proper tag
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-06-04 11:33:19 +02:00
GitHub Action
51fad91a22 Increment frontend chart version to v1.22.41 2025-06-04 10:48:50 +02:00
nick-delirium
36abcda1e1 ui: fix audioplayer start point 2025-06-04 10:39:08 +02:00
Mehdi Osman
dd5f464f73
Increment frontend chart version to v1.22.40 (#3479)
Co-authored-by: GitHub Action <action@github.com>
2025-06-03 16:22:12 +02:00
Delirium
f9ada41272
ui: recreate period on db visit (#3478) 2025-06-03 16:05:52 +02:00
rjshrjndrn
9e24a3583e feat(nginx): add integrations endpoint with CORS support
Add new /integrations/ location block that proxies requests to
integrations-openreplay:8080 service. Includes proper CORS headers
for cross-origin requests and WebSocket upgrade support.

- Rewrite /integrations/ path to root
- Configure proxy headers for forwarding
- Set connection timeouts for stability
- Add CORS headers for API access

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-06-02 10:55:50 +02:00
Taha Yassine Kraiem
0a3129d3cd fix(chalice): fixed JIRA integration 2025-05-30 15:25:41 +02:00
Mehdi Osman
99d61db9d9
Increment frontend chart version to v1.22.39 (#3460)
Co-authored-by: GitHub Action <action@github.com>
2025-05-30 15:07:29 +02:00
Delirium
133958622e
ui: fix alert create button (#3459) 2025-05-30 14:56:21 +02:00
GitHub Action
fb021f606f Increment frontend chart version to v1.22.38 2025-05-29 12:21:04 +02:00
rjshrjndrn
a2905fa8ed fix: move cd - command after git operations in patch workflow
Move the directory restoration command after the git operations to
ensure all git commands execute in the correct working directory
before returning to the previous directory.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-29 12:16:28 +02:00
rjshrjndrn
beec2283fd refactor(ci): restructure patch-build workflow script
- Extract inline bash script into structured functions
- Add proper error handling with set -euo pipefail
- Improve variable scoping with readonly and local declarations
- Add descriptive function names and comments
- Fix shell quoting and parameter expansion
- Consolidate build logic into reusable functions
- Add proper cleanup of temporary files
- Improve readability and maintainability of the CI script

The refactored script maintains the same functionality while being
more robust and easier to understand.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-29 12:16:28 +02:00
GitHub Action
6c8b55019e Increment frontend chart version 2025-05-29 10:29:46 +02:00
rjshrjndrn
e3e3e11227 fix(action): proper registry
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-29 10:18:55 +02:00
Shekar Siri
c6f7de04cc Revert "fix(ui): new card data state is not updating"
This reverts commit 2921c17cbf.
2025-05-28 22:16:00 +02:00
Shekar Siri
2921c17cbf fix(ui): new card data state is not updating 2025-05-28 19:49:01 +02:00
Mehdi Osman
7eb3f5c4c8
Increment frontend chart version (#3436)
Co-authored-by: GitHub Action <action@github.com>
2025-05-26 16:10:35 +02:00
Rajesh Rajendran
5a9a8e588a
chore(actions): rebase only if not main (#3435)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-26 16:04:50 +02:00
Rajesh Rajendran
4b14258266
fix(action): clone repo (#3433)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-26 15:50:13 +02:00
Rajesh Rajendran
744d2d4311
actions fix or 2070 (#3432)
* chore(build): Better error handling

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(build): remove fetch depth, as it might cause issue in rebase

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(build): proper platform

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-26 15:45:48 +02:00
Taha Yassine Kraiem
64242a5dc0 refactor(DB): changed supported platforms in CH 2025-05-26 11:51:49 +02:00
Rajesh Rajendran
cae3002697
feat(ci): Support building from branch for old patch (#3419)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-20 15:19:04 +02:00
GitHub Action
3d3c62196b Increment frontend chart version 2025-05-20 11:44:16 +02:00
nick-delirium
e810958a5d ui: fix ant imports 2025-05-20 11:26:20 +02:00
nick-delirium
39fa9787d1 ui: prevent network row modal from changing replayer time 2025-05-20 11:21:50 +02:00
nick-delirium
c9c1ad4dde ui: comments etc 2025-05-20 11:21:50 +02:00
nick-delirium
d9868928be ui: improve network panel row mapping 2025-05-20 11:21:50 +02:00
GitHub Action
a460d8c9a2 Increment frontend chart version 2025-05-15 15:18:19 +02:00
nick-delirium
930417aab4 ui: fix session search on url change 2025-05-15 15:12:30 +02:00
GitHub Action
07bc184f4d Increment chalice chart version 2025-05-14 18:59:43 +02:00
Rajesh Rajendran
71b7cca569
Patch/api v1.22.0 (#3401)
* fix(chalice): fixed duplicate autocomplete values

* ci(actions): possible fix for pull --rebase

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
Co-authored-by: Taha Yassine Kraiem <tahayk2@gmail.com>
2025-05-14 18:42:25 +02:00
Mehdi Osman
355d27eaa0
Increment frontend chart version (#3397)
Co-authored-by: GitHub Action <action@github.com>
2025-05-13 13:38:15 +02:00
Mehdi Osman
66b485cccf
Increment db chart version (#3396)
Co-authored-by: GitHub Action <action@github.com>
2025-05-13 10:34:28 +02:00
Alexander
de33a42151
feat(db): custom event's ts (#3395) 2025-05-12 17:52:24 +02:00
Rajesh Rajendran
f12bdebf82
ci(actions): fix push denied (#3392) (#3393) (#3394)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-12 17:19:41 +02:00
Rajesh Rajendran
bbfa20c693
ci(actions): fix push denied (#3392) (#3393)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-12 16:58:19 +02:00
Rajesh Rajendran
f264ba043d
ci(actions): fix push denied (#3392)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-12 16:55:23 +02:00
Rajesh Rajendran
a05dce8125
main (#3391)
* ci(actions): Update pr description

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): run only on pull request merge

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-12 16:50:20 +02:00
Mehdi Osman
3a1635d81f
Increment frontend chart version (#3389)
Co-authored-by: GitHub Action <action@github.com>
2025-05-12 16:12:43 +02:00
Delirium
ccb332c636
ui: change <slot> check (#3388) 2025-05-12 16:02:26 +02:00
Rajesh Rajendran
80ffa15959
ci(actions): Auto update tag for patch build (#3387)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-12 15:54:10 +02:00
Rajesh Rajendran
b2e961d621
ci(actions): Auto update tag for patch build (#3386)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-05-12 15:49:19 +02:00
Mehdi Osman
b4d0598f23
Increment frontend chart version (#3385)
Co-authored-by: GitHub Action <action@github.com>
2025-05-12 15:46:29 +02:00
Delirium
e77f083f10
ui: fixup toggler closing (#3384) 2025-05-12 15:40:30 +02:00
Delirium
58da1d3f64
fix litjs support, fix autocomplete modal options reset, fix dashboard chart density (#3382)
* Litjs fixes2 (#3381)

* ui: fixes for litjs capture

* ui: introduce vmode for lwc light dom

* ui: fixup the mode toggle and remover

* ui: fix filter options reset, fix dashboard chart density
2025-05-12 15:27:44 +02:00
GitHub Action
447fc26a2a Increment frontend chart version 2025-05-12 10:46:33 +02:00
nick-delirium
9bdf6e4f92 ui: fix heatmaps crash 2025-05-12 10:37:48 +02:00
GitHub Action
01f403e12d Increment chalice chart version 2025-05-07 12:28:44 +02:00
Taha Yassine Kraiem
39eb943b86 fix(chalice): fixed get error's details 2025-05-07 12:15:33 +02:00
GitHub Action
366b0d38b0 Increment frontend chart version 2025-05-06 16:28:28 +02:00
nick-delirium
f4d5b3c06e ui: fix max meta length, add horizontal layout for player 2025-05-06 16:23:47 +02:00
Mehdi Osman
93ae18133e
Increment frontend chart version (#3366)
Co-authored-by: GitHub Action <action@github.com>
2025-05-06 13:16:57 +02:00
Andrey Babushkin
fbe5d78270
Revert update (#3365)
* Revert "Increment chalice chart version"

This reverts commit 5e0e5730ba.

* revert updates

* changed chalice version
2025-05-06 13:08:08 +02:00
Mehdi Osman
b803eed1d4
Increment frontend chart version (#3362)
Co-authored-by: GitHub Action <action@github.com>
2025-05-05 17:49:39 +02:00
Andrey Babushkin
9ed3cb1b7e
Add searched events (#3361)
* add filtered events to search

* removed consoles

* changed styles to tailwind

* changed styles to tailwind

* fixed errors
2025-05-05 17:40:10 +02:00
GitHub Action
5e0e5730ba Increment chalice chart version 2025-05-05 17:04:29 +02:00
Taha Yassine Kraiem
d78b33dcd2 refactor(DB): remove TTL for CH tables 2025-05-05 16:49:37 +02:00
Taha Yassine Kraiem
4b1ca200b4 fix(chalice): fixed empty error_id for table of errors 2025-05-05 16:49:37 +02:00
rjshrjndrn
08d930f9ff fix(docker-compose): proper volume path #3279
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-28 17:28:40 +02:00
Mehdi Osman
da37809bc8
Increment frontend chart version (#3345)
Co-authored-by: GitHub Action <action@github.com>
2025-04-28 11:38:04 +02:00
Andrey Babushkin
d922fc7ad5
Patch frontend inline css (#3344)
* add inlineCss enum

* updated changelog
2025-04-28 11:29:53 +02:00
GitHub Action
796360fdd2 Increment frontend chart version 2025-04-28 11:01:55 +02:00
nick-delirium
13dbb60d8b ui: fix velement applychanges 2025-04-28 10:40:11 +02:00
Андрей Бабушкин
9e20a49128 add slot tag to custom elements 2025-04-28 10:34:43 +02:00
nick-delirium
91f8cc1399 ui: move debouncecall 2025-04-28 10:34:43 +02:00
Andrey Babushkin
f8ba3f6d89 Css batching (#3326)
* tracker: initial css inlining functionality

* tracker: add tests, adjust sheet id, stagger rule sending

* ui: rereoute custom html component fragments

* removed sorting

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>
2025-04-28 10:34:43 +02:00
Delirium
85e30b3692 tracker css batching/inlining (#3334)
* tracker: initial css inlining functionality

* tracker: add tests, adjust sheet id, stagger rule sending

* removed sorting

* upgrade css inliner

* ui: better logging for ocunter

* tracker: force-fetch mode for cssInliner

* tracker: fix ts warns

* tracker: use debug opts

* tracker: 16.2.0 changelogs, inliner opts

* tracker: remove debug options

---------

Co-authored-by: Андрей Бабушкин <andreybabushkin2000@gmail.com>
2025-04-28 10:34:43 +02:00
nick-delirium
0360e3726e ui: fixup autoplay on inactive tabs 2025-04-28 10:34:43 +02:00
nick-delirium
77bbb5af36 tracker: update css inject 2025-04-28 10:34:43 +02:00
Andrey Babushkin
ab0d4cfb62 Css inliner tuning (#3337)
* tracker: don't send double sheets

* tracker: don't send double sheets

* tracker: slot checker

* add slot tag to custom elements

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>
2025-04-28 10:34:43 +02:00
Andrey Babushkin
3fd506a812 Css batching (#3326)
* tracker: initial css inlining functionality

* tracker: add tests, adjust sheet id, stagger rule sending

* ui: rereoute custom html component fragments

* removed sorting

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>
2025-04-28 10:34:43 +02:00
Shekar Siri
e8432e2dec change(ui): force the table cards events order to use and istead the defaul then 2025-04-24 10:09:19 +02:00
GitHub Action
5c76a8524c Increment frontend chart version 2025-04-23 18:41:46 +02:00
rjshrjndrn
3ba40a4811 feat(cli): Add support for image versions
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-23 17:52:50 +02:00
rjshrjndrn
f9a3f24590 fix(docker-compose): clickhouse migration
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-23 17:52:50 +02:00
rjshrjndrn
85d6d0abac fix(docker-compose): remove shell interpolation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-23 17:52:50 +02:00
Rajesh Rajendran
b3594136ce or 1940 upstream docker release with the existing installation (#3316)
* chore(docker): Adding dynamic env generator
* ci(make): Create deployment yamls
* ci(make): Generating docker envs
* change env name structure
* proper env names
* chore(docker): clickhouse
* chore(docker-compose): generate env file format
* chore(docker-compose): Adding docker-compose
* chore(docker-compose): format make
* chore(docker-compose): Update version
* chore(docker-compose): adding new secrets
* ci(make): default target
* ci(Makefile): Update common protocol
* chore(docker-compose): refactor folder structure
* ci(make): rename to docker-envs
* feat(docker): add clickhouse volume definition
Add clickhouse persistent volume to the docker-compose configuration
to ensure data is preserved between container restarts.
* refactor: move env files to docker-envs directory
Updates all environment file references in docker-compose.yaml to use a
consistent directory structure, placing them under the docker-envs/
directory for better organization.
* fix(docker): rename imagestorage to images
 The `imagestorage` service and related environment file
 have been renamed to `images` for clarity and consistency.
 This change reflects the service's purpose of handling
 images.
* feat(docker): introduce docker-compose template
 A new docker-compose template
 to generate docker-compose files from a list of services.
 The template uses helm syntax.
* fix: Properly set FILES variable in Makefile
 The FILES variable was not being set correctly in the
 Makefile due to subshell issues. This commit fixes the
 variable assignment and ensures that the variable is
 accessible in subsequent commands.
* feat: Refactor docker-compose template for local development
 This commit introduces a complete overhaul of the
 docker-compose template, switching from a helm-based
 template to a native docker-compose.yml file. This
 change simplifies local development and makes it easier
 to manage the OpenReplay stack.
 The new template includes services for:
 - PostgreSQL
 - ClickHouse
 - Redis
 - MinIO
 - Nginx
 - Caddy
 It also includes migration jobs for setting up the
 database and MinIO.
* fix(docker-compose): Add fallback empty environment
 Add an empty environment to the docker-compose template to prevent
 errors when the env_file is missing. This ensures that the
 container can start even if the environment file is not present.
* feat(docker): Add domainname and aliases to services
 This change adds the `domainname` and `aliases` attributes to each
 service in the docker-compose.yaml file. This is to ensure that
 the services can communicate with each other using their fully
 qualified domain names. Also adds shared volume and empty
 environment variables.
* update version
* chore(docker): don't pull parallel
* chore(docker-compose): proper pull
* chore(docker-compose): Update db service urls
* fix(docker-compose): clickhouse url
* chore(clickhouse): Adding clickhouse db migration
* chore(docker-compose): Adding clickhouse
* fix(tpl): variable injection
* chore(fix): compose tpl variable rendering
* chore(docker-compose): Allow override pg variable
* chore(helm): remove assist-server
* chore(helm): pg integrations
* chore(nginx): removed services
* chore(docker-compose): Mulitple aliases
* chore(docker-compose): Adding more env vars
* feat(install): Dynamically generate passwords
 dynamic password generation by
 identifying `change_me_*` entries in `common.env` and
 replacing them with random passwords. This enhances
 security and simplifies initial setup.
 The changes include:
 - Replacing hardcoded password replacements with a loop
   that iterates through all `change_me_*` entries.
 - Using `grep` to find all `change_me_*` tokens.
 - Generating a random password for each token.
 - Updating the `common.env` file with the generated
   passwords.
* chore(docker-compose): disable clickhouse password
* fix(docker-compose): clickhouse-migration
* compose: chalice env
* chore(docker-compose): overlay vars
* chore(docker): Adding ch port
* chore(docker-compose): disable clickhouse password
* fix(docker-compose): migration name
* feat(docker): skip specific values
* chore(docker-compose): define namespace
---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-23 17:52:50 +02:00
GitHub Action
8f67edde8d Increment chalice chart version 2025-04-23 12:26:20 +02:00
Taha Yassine Kraiem
74ed29915b fix(chalice): enforce AND operator for table of requests and table of pages 2025-04-23 11:51:38 +02:00
GitHub Action
3ca71ec211 Increment chalice chart version 2025-04-22 19:23:11 +02:00
Taha Yassine Kraiem
0e469fd056 fix(chalice): fixes for table of requests 2025-04-22 19:03:35 +02:00
KRAIEM Taha Yassine
a8cb0e1643 fix(chalice): fixes for table of requests 2025-04-22 19:03:35 +02:00
GitHub Action
e171f0d8d5 Increment frontend chart version 2025-04-22 17:56:00 +02:00
nick-delirium
68ea291444 ui: fix timepicker and timezone interactions 2025-04-22 17:42:56 +02:00
GitHub Action
05cbb831c7 Increment frontend chart version 2025-04-22 10:32:00 +02:00
nick-delirium
5070ded1f4 ui: fix empty sank sessions fetch 2025-04-22 10:27:16 +02:00
GitHub Action
77610a4924 Increment frontend chart version 2025-04-16 17:45:25 +02:00
nick-delirium
7c34e4a0f6 ui: virtualizer for filter options list 2025-04-16 17:36:34 +02:00
GitHub Action
330e21183f Increment frontend chart version 2025-04-15 18:25:49 +02:00
Shekar Siri
30ce37896c feat(widget-sessions): improve session filtering logic
- Refactored session filtering logic to handle nested filters properly.
- Enhanced `fetchSessions` to ensure null checks and avoid errors.
- Updated `loadData` to handle `USER_PATH` and `HEATMAP` metric types.
- Improved UI consistency by adjusting spacing and formatting.
- Replaced redundant code with cleaner, more maintainable patterns.

This change improves the reliability and readability of the session
filtering and loading logic in the WidgetSessions component.
2025-04-15 18:15:03 +02:00
Andrey Babushkin
80a7817e7d
removed sorting by id (#3305) 2025-04-15 13:32:53 +02:00
Jorgen Evens
1b9c568cb1 fix(helm): fix broken volumeMounts indentation 2025-04-14 15:51:41 +02:00
GitHub Action
3759771ae9 Increment frontend chart version 2025-04-14 12:06:09 +02:00
Shekar Siri
f6ae5aba88 feat(SessionsBy): add specific filter for FETCH metric
Added a conditional check to handle the FETCH metric in the SessionsBy
component. When the metric is FETCH, a specific filter with key
FETCH_URL, operator is, and value derived from data.name is applied.
This ensures proper filtering behavior for FETCH-related metrics.
2025-04-14 12:01:51 +02:00
Mehdi Osman
5190dc512a
Increment frontend chart version (#3297)
Co-authored-by: GitHub Action <action@github.com>
2025-04-14 11:54:25 +02:00
Andrey Babushkin
3fcccb51e8
Patch assist (#3296)
* add global method support

* fix errors

* remove wrong updates

* remove wrong updates

* add onDrag as option

* fix wrong updates
2025-04-14 11:33:06 +02:00
GitHub Action
26077d5689 Increment frontend chart version 2025-04-11 14:56:11 +02:00
Shekar Siri
00c57348fd feat(search): enhance filter value handling
- Added `checkFilterValue` function to validate and update filter values
  in `SearchStoreLive`.
- Updated `FilterItem` to handle undefined `value` gracefully by providing
  a default empty array.

These changes improve robustness in filter value processing.
2025-04-11 14:36:25 +02:00
Shekar Siri
1f9bc5520a feat(search): add rounding to next minutes for date ranges
- Introduced `roundToNextMinutes` utility function to round timestamps
  to the next specified minute interval.
- Updated `Search` class to use the rounding function for non-custom
  date ranges.
- Modified `getRange` in `period.js` to align LAST_24_HOURS with
  15-minute intervals.
- Added `roundToNextMinutes` implementation in `utils/index.ts`.
2025-04-11 12:01:15 +02:00
Shekar Siri
aef94618f6 Revert "Increment frontend chart version"
This reverts commit 2a330318c7.
2025-04-11 11:03:01 +02:00
GitHub Action
2a330318c7 Increment frontend chart version 2025-04-11 11:01:53 +02:00
Shekar Siri
6777d5ce2a feat(dashboard): set initial drill down period
Change default drill down period from LAST_7_DAYS to LAST_24_HOURS
and preserve current period when drilling down on chart click
2025-04-11 10:49:17 +02:00
rjshrjndrn
8a6f8fe91f chore(action): cloning specific tag
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-10 15:45:50 +02:00
Mehdi Osman
7b078fed4c
Increment frontend chart version (#3278)
Co-authored-by: GitHub Action <action@github.com>
2025-04-07 15:24:32 +02:00
Andrey Babushkin
894d4c84b3
Patch assist canvas (#3277)
* resolved conflict

* removed comments
2025-04-07 15:13:36 +02:00
Alexander
46390a3ba9
feat(assist-server): added the github action (#3275) 2025-04-07 10:43:48 +02:00
rjshrjndrn
621667f5ce ci(action): Build and patch github tags
feat(workflow): update commit timestamp for patching

Add a step to set the commit timestamp of the HEAD commit to be 1
second newer than the oldest of the last 3 commits. This ensures
proper chronological order while preserving the commit content.

- Fetch deeper history to access commit history
- Get oldest timestamp from recent commits
- Set new commit date with BSD-compatible date command
- Verify timestamp change with git log

The workflow was previously checking out 'main' branch with a
comment indicating it needed to be fixed. This change makes it
properly checkout the tag specified by the workflow input.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-04 16:09:05 +02:00
rjshrjndrn
a72f476f1c chore(ci): tag patching
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-04-04 13:15:56 +02:00
Mehdi Osman
623946ce4e
Increment assist chart version (#3267)
Co-authored-by: GitHub Action <action@github.com>
2025-04-03 13:29:02 -04:00
Mehdi Osman
2d099214fc
Increment frontend chart version (#3266)
Co-authored-by: GitHub Action <action@github.com>
2025-04-03 18:27:05 +02:00
Andrey Babushkin
b0e7054f89
Assist patch canvas (#3265)
* add agent info to assist and tracker

* removed AGENTS_CONNECTED event
2025-04-03 18:22:08 +02:00
Mehdi Osman
a9097270af
Increment chalice chart version (#3260)
Co-authored-by: GitHub Action <action@github.com>
2025-04-02 16:43:46 +02:00
Alexander
5d514ddaf2
feat(chalice): added for_spot=True for authenticate_sso (#3259) 2025-04-02 16:35:19 +02:00
Mehdi Osman
43688bb03b
Increment assist chart version (#3256)
Co-authored-by: GitHub Action <action@github.com>
2025-04-01 16:04:41 +02:00
Mehdi Osman
e050cee7bb
Increment frontend chart version (#3255)
Co-authored-by: GitHub Action <action@github.com>
2025-03-31 18:19:52 +02:00
Andrey Babushkin
6b35df7125
pulled updates (#3254) 2025-03-31 18:13:51 +02:00
GitHub Action
8e099b6dc3 Increment frontend chart version 2025-03-31 17:25:58 +02:00
nick-delirium
c0a4734054 ui: fix double fetches for sessions 2025-03-31 17:19:33 +02:00
GitHub Action
7de1efb5fe Increment frontend chart version 2025-03-31 12:08:45 +02:00
nick-delirium
d4ff28ddbe ui: fix modules label 2025-03-31 11:54:13 +02:00
nick-delirium
b2256f72d0 ui: fix modules mapper 2025-03-31 11:48:14 +02:00
GitHub Action
a63bda1c79 Increment frontend chart version 2025-03-31 11:17:34 +02:00
nick-delirium
3a0176789e ui: filter keys 2025-03-31 10:34:02 +02:00
nick-delirium
f2b7271fca ui: add old devtool filters 2025-03-31 10:31:06 +02:00
GitHub Action
d50f89662b Increment frontend chart version 2025-03-28 21:37:59 +01:00
GitHub Action
35051d201c Increment assist chart version 2025-03-28 21:37:59 +01:00
rjshrjndrn
214be95ecc fix(init): remove duplicate clone
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-28 21:25:24 +01:00
Delirium
dbc142c114
UI patches (28.03) (#3231)
* ui: force getting url for location in tabmanagers

* Assist add turn servers (#3229)

* fixed conflicts

* add offers

* add config to sicket query

* add config to sicket query

* add config init

* removed console logs

* removed wrong updates

* fixed conflicts

* add offers

* add config to sicket query

* add config to sicket query

* add config init

* removed console logs

* removed wrong updates

* ui: fix chat draggable, fix default params

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* ui: fix spritemap generation for assist sessions

* ui: fix yarnlock

* fix errors

* updated widget link

* resolved conflicts

* updated widget url

---------

Co-authored-by: Andrey Babushkin <55714097+reyand43@users.noreply.github.com>
Co-authored-by: Андрей Бабушкин <andreybabushkin2000@gmail.com>
2025-03-28 17:32:12 +01:00
GitHub Action
443f5e8f08 Increment frontend chart version 2025-03-27 12:36:54 +01:00
Shekar Siri
9f693f220d refactor(auth): separate SSO support from enterprise edition
Add dedicated isSSOSupported property to correctly identify when SSO
authentication is available, properly handling the 'msaas' edition
case separately from enterprise edition checks. This fixes SSO
visibility in the login interface.
2025-03-27 12:28:10 +01:00
GitHub Action
5ab30380b0 Increment chalice chart version 2025-03-26 17:48:08 +01:00
Taha Yassine Kraiem
fc86555644 refactor(chalice): changed user-journey 2025-03-26 17:18:17 +01:00
GitHub Action
2a3c611a27 Increment frontend chart version 2025-03-26 16:48:29 +01:00
Delirium
1d6fb0ae9e ui: shrink icons when no space, adjust player area for events export … (#3217)
* ui: shrink icons when no space, adjust player area for events export panel, fix panel size

* ui: rm log
2025-03-26 16:38:48 +01:00
GitHub Action
bef91a6136 Increment frontend chart version 2025-03-25 18:15:34 +01:00
Shekar Siri
1e2bd19d32 fix(dashboard): update filter condition in MetricsList
Change the filter type comparison from checking against 'all' to
checking against an empty string. This ensures proper filtering
behavior when filtering metrics in the dashboard component.
2025-03-25 18:10:13 +01:00
rjshrjndrn
3b58cb347e chore(http): remove default token_string
scripts/helmcharts/openreplay/charts/http/scripts/entrypoint.sh

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-24 19:31:01 +01:00
GitHub Action
ca4590501a Increment frontend chart version 2025-03-24 17:45:24 +01:00
Andrey Babushkin
fd12cc7585
fix(GraphQL): remove unused useTranslation hook (#3200) (#3206)
Co-authored-by: PiRDub <pirddeveloppeur@gmail.com>
2025-03-24 17:38:45 +01:00
rjshrjndrn
6abded53e0 feat(helm): add TOKEN_SECRET environment variable
Add TOKEN_SECRET environment variable to HTTP service deployment and
generate a random value for it in vars.yaml.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-24 16:55:35 +01:00
GitHub Action
82c5e5e59d Increment frontend chart version 2025-03-24 14:34:51 +01:00
nick-delirium
c77b0cc4de ui: fixes for onboarding ui 2025-03-24 14:30:22 +01:00
nick-delirium
de344e62ef ui: onboarding fixes 2025-03-24 14:30:22 +01:00
Mehdi Osman
deb78a62c0
Increment frontend chart version (#3189)
Co-authored-by: GitHub Action <action@github.com>
2025-03-21 11:00:14 +01:00
Shekar Siri
0724cf05f0
fix(auth): remove unnecessary captcha token validation (#3188)
The token validation checks were redundant as the validation is already
handled by the captcha wrapper component. This change simplifies the
password reset flow while maintaining security.
2025-03-21 10:55:39 +01:00
GitHub Action
cc704f1bc3 Increment frontend chart version 2025-03-20 16:18:42 +01:00
nick-delirium
4c159b2d26 ui: fix table column export 2025-03-20 16:08:58 +01:00
Mehdi Osman
42df33bc01
Increment assist chart version (#3181)
Co-authored-by: GitHub Action <action@github.com>
2025-03-19 14:58:26 +01:00
Alexander
ae95b48760
feat(assist): improved caching mechanism for cluster mode (#3180) 2025-03-19 14:53:58 +01:00
Mehdi Osman
4be3050e61
Increment frontend chart version (#3179)
Co-authored-by: GitHub Action <action@github.com>
2025-03-19 14:47:37 +01:00
Shekar Siri
8eec6e983b
feat(auth): implement withCaptcha HOC for consistent reCAPTCHA (#3177)
* feat(auth): implement withCaptcha HOC for consistent reCAPTCHA

This commit refactors the reCAPTCHA implementation across the application
by introducing a Higher Order Component (withCaptcha) that encapsulates
captcha verification logic. The changes:

- Create a reusable withCaptcha HOC in withRecaptcha.tsx
- Refactor Login, ResetPasswordRequest, and CreatePassword components
- Extract SSOLogin into a separate component
- Improve error handling and user feedback
- Standardize loading and verification states across forms
- Make captcha implementation more maintainable and consistent

* feat(auth): support msaas edition for enterprise features

Add msaas to the isEnterprise check alongside ee edition to properly
display enterprise features. Use userStore.isEnterprise in SSOLogin
component instead of directly checking authDetails.edition for
consistent
enterprise status detection.
2025-03-19 14:36:56 +01:00
Taha Yassine Kraiem
5fec615044 refactor(chalice): cleaned code
fix(chalice): fixed session-search-pg sortKey issue
fix(chalice): fixed CH-query-formatter to handle special chars
fix(chalice): fixed /ids response
2025-03-18 13:51:10 +01:00
Mehdi Osman
f77568a01c
Increment frontend chart version (#3167)
Co-authored-by: GitHub Action <action@github.com>
2025-03-18 13:45:09 +01:00
Shekar Siri
618e4dc59f
refactor(searchStore): reformat filterMap function parameters (#3166)
- Reformat the parameters of the filterMap function for better readability.
- Comment out the fetchSessions call in clearSearch method to avoid unnecessary session fetch.
2025-03-15 11:42:14 +01:00
nick-delirium
b94fcb11e5
ui: fix pageselect for insights 2025-03-14 17:35:54 +01:00
nick-delirium
f93ee6fb8f
ui: fix filekey on prefetched sessions 2025-03-14 17:30:00 +01:00
Alexander
23820b7ea5
feat(ender): grab all sessions per tick (#3163) 2025-03-14 17:16:56 +01:00
nick-delirium
e92bfe3cfe
ui: fix efs file replay 2025-03-14 17:06:36 +01:00
Gabriele Angrisani
102f0c7b06 fix redis volume reference folder (#2805) 2025-03-14 15:34:11 +01:00
Laurenz Glück
8d57cc55a5 fix: updates docker-compose setup to be compatible with v1.21.0 2025-03-14 15:34:11 +01:00
nick-delirium
24b36efc9d
ui: update env sample 2025-03-14 15:06:11 +01:00
Alexander
fe91cad4af feat(db): moved out the error_id from json 2025-03-14 14:51:19 +01:00
Taha Yassine Kraiem
033ffcb7b9 refactor(DB): changed product_analytics.events to expose error_id
fix(chalice): fixed search events by error
2025-03-14 14:32:17 +01:00
Taha Yassine Kraiem
499048e46c refactor(chalice): changed pg_client to send keep-alive signals 2025-03-14 14:32:17 +01:00
nick-delirium
5b6c653862
ui: fix rm unused assets 2025-03-14 13:31:09 +01:00
nick-delirium
4169ab87c6
ui: fix comparison reset 2025-03-14 13:19:00 +01:00
Taha Yassine Kraiem
80229a0214 refactor(chalice): use new errors columns 2025-03-14 10:53:09 +01:00
Taha Yassine Kraiem
fb48ba8300 refactor(chalice): refactored errors helper
refactor(chalice): removed errors-tags
2025-03-14 10:53:09 +01:00
Taha Yassine Kraiem
b0f3c50c0f refactor(DB): DB changes 2025-03-14 10:53:09 +01:00
Alexander
5806362ce0 feat(db): added missing columns for events 2025-03-14 10:31:15 +01:00
rjshrjndrn
2458af460b feat(docker): switch to Chainguard nginx image
Replace nginx:alpine with cgr.dev/chainguard/nginx base image and
remove unnecessary permission changes since the Chainguard image
handles permissions differently and runs with proper security defaults.
2025-03-13 17:45:38 +01:00
Alexander
6c891cb131 feat(db): removed js exception tags in CH 2025-03-13 17:25:53 +01:00
rjshrjndrn
8e41c3ce91 fix(chalice): default envs
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 17:08:50 +01:00
rjshrjndrn
14d0a77a73 feat(chalice): add JWT expiration configuration
Add JWT_EXPIRATION environment variable to the chalice helm chart with
default value set to 86400 s (24 hours).
2025-03-13 17:00:23 +01:00
rjshrjndrn
0333c56d52 feat(clickhouse): Upgrade version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 16:39:03 +01:00
rjshrjndrn
52d4abb61c fix(cli): download clickhouse
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 16:36:20 +01:00
rjshrjndrn
b0e7d3aa79 ci(make): download-cli
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 16:19:13 +01:00
rjshrjndrn
e9eea78283 ci(make): Upgrade installation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 16:04:25 +01:00
rjshrjndrn
0f4c509582 ci(make): get version for chart
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 16:02:17 +01:00
rjshrjndrn
820bca6308 build(api): implement multi-stage Dockerfile
- Use multi-stage build to reduce final image size
- Move build dependencies to builder stage
- Copy only necessary files to final stage
- Use UV for faster Python package installation
- Clean up duplicate operations
2025-03-13 14:51:59 +01:00
rjshrjndrn
51e71a4d52 ci(make): pull the latest images
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 14:37:13 +01:00
rjshrjndrn
2c9e9576c5 ci(Makefile): clean installation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 14:12:53 +01:00
Taha Yassine Kraiem
9e7f751df6 fix(chalice): fixed EE error-details undefined status 2025-03-13 13:59:46 +01:00
Taha Yassine Kraiem
b6d0e71544 fix(chalice): fixed EE imports for errors 2025-03-13 13:53:10 +01:00
rjshrjndrn
93a9e03026 fix(api): improve Dockerfile with best practices
- Use lowercase labels in accordance with Docker conventions
- Pin package versions for better build reproducibility
- Consolidate RUN commands to reduce image layers
- Use JSON array notation for CMD instruction
- Restore GIT_SHA label for proper image versioning
- Maintain consistent code formatting and ordering

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 13:48:53 +01:00
rjshrjndrn
a62f6f6bb0 ci(build): remove peers
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 13:48:53 +01:00
Taha Yassine Kraiem
cd80aa85ea refactor(chalice): refactored error-details code 2025-03-13 13:46:03 +01:00
Taha Yassine Kraiem
961c685310 refactor(chalice): refactored error-details code
refactor(chalice): moved error-details to use new product-analytics DB structure
2025-03-13 13:46:03 +01:00
Alexander
160b5ac2c8 feat(metrics): moved back the metrics endpoint to support the undocumented functionality 2025-03-13 13:34:23 +01:00
nick-delirium
1cca40d4c5
ui: fix calendar self-close 2025-03-13 13:08:44 +01:00
rjshrjndrn
bd2a59266d feat(api): migrate to uv package manager
- Add uv as dependency manager for faster installations
- Remove pinned versions from apk packages for better maintenance
- Fix lxml installation and dependency issues in requirements.txt
- Add environment setup steps in Dockerfile

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 13:01:02 +01:00
Alexander
8acee7d357 feat(connector): fixed several release bugs 2025-03-13 12:28:23 +01:00
rjshrjndrn
fb49c715cb refactor(chalice): remove peers from health checks and fix formatting
Updated health.py to remove the peers-openreplay service from health
checks and applied consistent formatting throughout the file. This
includes proper line breaks, trailing commas for multi-line data
structures, and consistent indentation patterns.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 11:51:04 +01:00
nick-delirium
221bee70f5
ui: add hash to css filenames 2025-03-13 11:45:22 +01:00
rjshrjndrn
8eb431f70c fix(docker): pin pip packages in API Dockerfile
Add exact version pinning for all packages installed via pip to improve
build reproducibility and security. Also consolidates package install
steps and improves the docker image build process with proper cleanup
of build dependencies.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 11:38:57 +01:00
rjshrjndrn
820b0954e7 ci(makefile): install test
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-13 11:13:38 +01:00
Andrey Babushkin
19b350761c
add few locales (#3151) 2025-03-13 10:08:08 +01:00
Alexander
3b3e95a413
Observability upgrade (#3146)
* feat(metrics): grand update

* feat(metrics): fixed missing part in ee tracer

* feat(assets): added missing arg

* feat(metrics): fixed naming problems
2025-03-13 08:09:29 +01:00
Taha Yassine Kraiem
fe1130397c fix(alerts): fixed crash while processing over CH 2025-03-12 17:15:41 +01:00
Taha Yassine Kraiem
fd4b71d854 fix(chalice): fixed EE docker image 2025-03-12 16:47:04 +01:00
nick-delirium
404ffd5b2d
ui: add hash to css filenames 2025-03-12 16:46:07 +01:00
Taha Yassine Kraiem
5af63eb9f1 fix(chalice): fixed legacy sessions search for EE 2025-03-12 15:14:54 +01:00
Shekar Siri
038bfee383 change(ui): tabl loader 2025-03-12 14:41:33 +01:00
Taha Yassine Kraiem
bd09160a4a fix(chalice): fixed search usability-test's sessions 2025-03-12 13:43:01 +01:00
nick-delirium
136a5b2bfb
ui: wrap title with i18n 2025-03-12 13:21:51 +01:00
Taha Yassine Kraiem
33deaef0ce fix(chalice): changes sessions_search importer 2025-03-12 12:28:16 +01:00
Taha Yassine Kraiem
3f541e5d59 refactor(chalice): changed .gitignore 2025-03-12 12:23:03 +01:00
Kraiem Taha Yassine
ae463db150
fix(chalice): fixed empty bookmark/vault projects null-timestamp issue (#3142) 2025-03-12 12:11:34 +01:00
Taha Yassine Kraiem
9eb19fedf1 refactor(chalice): changed import/flags logic 2025-03-12 11:54:04 +01:00
Andrey Babushkin
5df934c9ce
fixed sessions layout (#3138) 2025-03-12 09:21:16 +01:00
Taha Yassine Kraiem
e027a2d016 fix(chalice): fixed circular imports 2025-03-11 17:02:01 +01:00
nick-delirium
c7f3c78740
ui: fix heatmap scaling (use true document height) 2025-03-11 17:00:46 +01:00
Taha Yassine Kraiem
3245579b7c fix(chalice): remove duplicate sessions when using MV 2025-03-11 16:37:00 +01:00
nick-delirium
0107c9c523
ui: fix in-session clickmap refresh 2025-03-11 16:24:26 +01:00
nick-delirium
05f4054b31
ui: fix sank tooltip spacing 2025-03-11 16:20:15 +01:00
Taha Yassine Kraiem
ce844296ed refactored(chalice): include sessions src 2025-03-11 15:46:05 +01:00
Taha Yassine Kraiem
0a5856afe1 refactored(chalice): optimized search-product-analytics-cards
fix(chalice): fixed search-product-analytics-cards
2025-03-11 14:06:48 +01:00
Taha Yassine Kraiem
45b8bdef8a fix(DB): fixed old-product-analytics wrong view_type 2025-03-11 13:13:39 +01:00
Taha Yassine Kraiem
264f28ed39 refactor(chalice): optimized autocomplete lazy initialization 2025-03-11 13:13:39 +01:00
Taha Yassine Kraiem
59d3253737 refactor(chalice): events-autocomplete lazy initialization 2025-03-11 12:09:49 +01:00
Taha Yassine Kraiem
1c8c231d13 refactor(chalice): metafilters-autocomplete lazy initialization 2025-03-11 11:58:57 +01:00
nick-delirium
77208b95e8
ui: fix locale json endings 2025-03-11 11:38:23 +01:00
nick-delirium
cdbbb482ce ui: translate more lines 2025-03-11 10:35:08 +01:00
nick-delirium
ccd8d76e98 ui: improve metadata display 2025-03-11 10:35:08 +01:00
Andrey Babushkin
17a5089c24
updated locales (#3129) 2025-03-10 23:19:54 +01:00
Shekar Siri
384866621c change(api): router to search with pagination schema 2025-03-10 19:15:26 +01:00
nick-delirium
743625f66b
ui: fixes for metadata list in sessions 2025-03-10 18:00:05 +01:00
Andrey Babushkin
ffd134c204
Fix localisation (#3128)
* fix localised errors

* fix locales

* fix locales

* fix highlight badges

* fix errors
2025-03-10 17:46:36 +01:00
Taha Yassine Kraiem
8da099ba98 fix(chalice): fix import issue 2025-03-10 17:11:39 +01:00
Andrey Babushkin
75ca0267ae
Fix localisation (#3126)
* fix localised errors

* fix locales

* fix locales

* fix highlight badges
2025-03-10 16:50:10 +01:00
Andrey Babushkin
6ab3c80985
Fix localisation (#3125)
* fix localised errors

* fix locales

* fix locales
2025-03-10 16:43:53 +01:00
Andrey Babushkin
eab2d3a2cf
Fix localisation (#3123)
* fix localised errors

* fix locales
2025-03-10 15:51:21 +01:00
Shekar Siri
c6cbc4eba8 fix(ui): align session date range text properly
Add text-start class to the date range container to ensure proper
left alignment of text in the SessionDateRange component.
2025-03-10 15:24:17 +01:00
Alexander
fdd26c567c feat(auth): added missing prefix support to other services 2025-03-10 15:18:00 +01:00
Alexander
4b9be69719 feat(spot): added missing prefix support to the auth middleware 2025-03-10 15:12:19 +01:00
Shekar Siri
b8511b6be1 change(api): schema for card search with filter and sort 2025-03-10 15:06:54 +01:00
Shekar Siri
5cc9945f16 change(api): keep the original formatting 2025-03-10 15:05:31 +01:00
Shekar Siri
cef251db6a feat(metrics): add metrics search functionality
Implement new search_metrics function in custom_metrics.py to allow
filtering and sorting of metrics. Add corresponding endpoint in the
metrics router and supporting schema classes in schemas.py. The new
implementation provides pagination, filtering, and sorting capabilities
for metrics.
2025-03-10 14:58:30 +01:00
Shekar Siri
687ab05f22 feat(metrics): implement server-side pagination and sorting
Refactors metrics list view to use server-side pagination and sorting
instead of client-side implementation. This improves performance for
large datasets by reducing client workload and network payload size.

Key changes:
- Add pagination API endpoint in MetricService
- Update MetricStore to handle server pagination
- Refactor ListView component to use server-side sorting
- Remove client-side sorting and pagination logic
2025-03-10 14:58:30 +01:00
Alexander
4b09213448 feat(images): added a proper observability 2025-03-10 14:14:43 +01:00
Taha Yassine Kraiem
af4a344c85 fix(chalice): fix multi-refresh token
fix(chalice): fix spot multi-refresh token
2025-03-10 13:14:39 +01:00
Taha Yassine Kraiem
c40e32d624 refactor(chalice): refactored dynamic routs 2025-03-10 12:02:03 +01:00
Taha Yassine Kraiem
afbf5fee7a fix(chalice): fix refresh token 2025-03-10 12:02:03 +01:00
rjshrjndrn
28b580499f feat(helm): add configurable assets origin
Add a helper template to allow customizing the assets origin URL.
This gives users the ability to override the default S3 endpoint
construction when needed, while maintaining backward compatibility.
This can be used when try to use proxy the bucket like cloudfront or
some custom domain.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-10 11:54:18 +01:00
nick-delirium
9d7c54554e
ui: fix live tag 2025-03-10 09:49:33 +01:00
Sudheer Salavadi
adf302bc34
Improved project tags message. (#3115) 2025-03-07 19:09:51 +01:00
Andrey Babushkin
6852d63cdb
fix localised errors (#3117) 2025-03-07 17:58:00 +01:00
Shekar Siri
41178ba841 change(ui): webpack config to use env vars 2025-03-07 17:50:32 +01:00
nick-delirium
90bc6bc83e
ui: restrict meta list to 1 2025-03-07 17:12:45 +01:00
Taha Yassine Kraiem
b8d365de3d fix(chalice): debug refresh token 2025-03-07 17:06:49 +01:00
Taha Yassine Kraiem
87e7acecde fix(chalice): debug refresh token 2025-03-07 16:49:34 +01:00
Taha Yassine Kraiem
e53301d18e fix(chalice): debug refresh token 2025-03-07 16:40:11 +01:00
Taha Yassine Kraiem
ff04276623 fix(chalice): debug refresh token 2025-03-07 16:21:48 +01:00
nick-delirium
b0e0321224
ui: fix ui crash 2025-03-07 16:09:51 +01:00
Taha Yassine Kraiem
e95417c1ed fix(chalice): debug refresh token 2025-03-07 15:49:51 +01:00
Alexander
5f3b3bb2ef feat(canvases): added a proper canvas observability 2025-03-07 15:46:27 +01:00
Taha Yassine Kraiem
06937b305a fix(chalice): debug refresh token 2025-03-07 15:38:23 +01:00
Andrey Babushkin
a693a36a6c
Add lokalisation (#3107)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs

* fix errors

* fix errors

* fix error

* add locales

* fix locales
2025-03-07 11:59:37 +01:00
Andrey Babushkin
c8ff481725
Add lokalisation (#3106)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs

* fix errors

* fix errors

* fix error

* add locales
2025-03-07 11:48:34 +01:00
Alexander
ef897538d1 feat(images): name fix in Dockerfile 2025-03-07 11:30:52 +01:00
Alexander
07ffb06db1 feat(images): renamed + small improvements 2025-03-07 11:22:55 +01:00
Andrey Babushkin
ad9883ceb2
Add lokalisation (#3105)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs

* fix errors

* fix errors

* fix error
2025-03-07 11:18:12 +01:00
Andrey Babushkin
5c9a29570c
Add lokalisation (#3104)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs

* fix errors
2025-03-07 10:43:08 +01:00
Andrey Babushkin
9f9990d737
Add lokalisation (#3103)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs
2025-03-06 18:17:38 +01:00
Andrey Babushkin
fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00
Taha Yassine Kraiem
b8091b69c2 refactor(chalice): fixed product analytics 2025-03-06 17:16:21 +01:00
Taha Yassine Kraiem
502303aee7 refactor(chalice): refactored product analytics 2025-03-06 17:12:19 +01:00
Taha Yassine Kraiem
632bc1cbb9 refactor(chalice): refactored product analytics 2025-03-06 17:12:19 +01:00
rjshrjndrn
bcc7d35b7f docs: improve services input description
Add example values (frontend,api,sink) to the services input
description in the release deployment workflow to make it clearer
for users what format is expected.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:24:25 +01:00
rjshrjndrn
45656ec6d7 fix(ci): maintain correct working directory in workflow
Adds working_dir variable to track the initial directory and ensures
proper directory navigation when processing services in the release
deployment workflow.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
15829d865e fix(workflow): move wait outside build services loop
The wait command was placed inside the service loop,
causing the workflow to wait after each individual service build.
Moving it outside ensures all service builds run in parallel before
proceeding to the next step.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
029376c3e4 fix(ci): add missing loop closures in deploy workflow
Add the required 'done' keywords at the end of for loops in the
Kubernetes deployment steps for both EE and FOSS clusters to ensure
proper script execution.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
3ca6f78bed perf(ci): parallelize FOSS and EE build steps
Improves build performance by running EE and FOSS builds in parallel
using depot's parallel build capabilities. Each service's builds now
run concurrently with proper process management via Bash background
jobs, reducing overall build time.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
12a729fafe refactor(ci): simplify image tag format
The image tag generation in the release deployment workflow was simplified
by removing the redundant IMAGE_TAG variable prepending. Now the tag is
directly composed of the branch name and short SHA, resulting in cleaner
and more readable image tags.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
0a17460c5a feat: add enterprise edition image build and deployment
Add parallel Enterprise Edition (-ee suffix) image building and update
K8s deployments to use the EE images in the EE cluster. This change
enables maintaining both community and enterprise edition deployments
from the same workflow.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
faadfa497f fix(actions): set default build script name before service loop
The workflow was missing a default value for the BUILD_SCRIPT_NAME
variable, which could cause failures when processing services. This
commit adds "build.sh" as the default value.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
bbeb508738 fix(actions): standardize registry URL in workflows
Replace all instances of RELEASE_OSS_REGISTRY secret with the already
defined IMAGE_REGISTRY_URL environment variable for consistency across
deployment steps. This eliminates duplicate references to the same
registry URL and simplifies future maintenance.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
333fd642be feat(ci): add DEPOT_TOKEN to release workflow env
Add the DEPOT_TOKEN secret to the environment variables section of the
release-deployment workflow to enable proper authentication with the
Depot service for Docker builds.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
rjshrjndrn
5e93178876 refactor(ci): revamp release deployment workflow
Completely redesign the release deployment workflow to:
- Simplify image building and deployment process
- Add branch-based tagging with commit SHA
- Replace AWS ECR login with direct Docker registry auth
- Improve service deployment with explicit image setting
- Update naming and descriptions for better clarity

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-03-06 16:22:55 +01:00
Taha Yassine Kraiem
da433e1666 refactor(chalice): refactored sessions code 2025-03-06 14:57:37 +01:00
nick-delirium
a87f6c658c
ui: drop old deprecated message types 2025-03-06 14:49:45 +01:00
Alexander
4ebbfd3501 feat(canvases): improved performance 2025-03-06 14:12:49 +01:00
Alexander
6dc3dcfd4e feat(proto): removed a part of deprecated messages (min supported tracker version is 6.0.0) 2025-03-06 13:49:18 +01:00
Taha Yassine Kraiem
74146eecf1 refactor(chalice): customizable long-query args 2025-03-06 12:51:36 +01:00
Taha Yassine Kraiem
2e69a6e4df refactor(chalice): refactored sessions package 2025-03-06 12:34:34 +01:00
Taha Yassine Kraiem
afacbc1460 refactor(alerts): refactored code 2025-03-06 12:20:46 +01:00
Taha Yassine Kraiem
6e1316c05f refactor(chalice): refactored code 2025-03-06 11:16:10 +01:00
Taha Yassine Kraiem
d3851cedec refactor(chalice): refactored code 2025-03-06 10:14:52 +01:00
nick-delirium
a1989eb574
tracker: 16.0.1 changelog 2025-03-06 09:38:58 +01:00
nick-delirium
95455f761b
ui: checkbox spacing 2025-03-05 17:10:21 +01:00
nick-delirium
69d1d88600
tracker: 16.0.1-beta 2025-03-05 16:51:27 +01:00
nick-delirium
ceb40992cc
tracker: export tracker App type from entry.ts 2025-03-05 15:56:53 +01:00
nick-delirium
1ab7d0ad7f
tracker: introduce singleton approach for tracker 2025-03-05 15:56:53 +01:00
nick-delirium
2ee535f213
tracker: move domparser location inside observer 2025-03-05 15:56:53 +01:00
nick-delirium
0ba1382c16
tracker: fix spritemap parser, add svgdoc cache 2025-03-05 15:56:53 +01:00
Shekar Siri
c025b2f1a5 fix(ui): disable table sorter tooltips and fix indentation
Removes the default tooltips that appear when hovering over sortable
column headers by setting showSorterTooltip={false} on Table components.
Also fixes indentation in text components and function parameters for
better code readability.

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-05 14:53:13 +01:00
Shekar Siri
918d9de4c9 change(ui): ignore logs 2025-03-05 13:57:53 +01:00
nick-delirium
047a5f52e7
ui: fix preset comparison check 2025-03-05 13:47:37 +01:00
Shekar Siri
7a88acfa9f change(ui): .gitignore 2025-03-05 13:29:14 +01:00
Taha Yassine Kraiem
366d2e1017 refactor(chalice): throw an error when endTimestamp is 0 for product analytics 2025-03-05 13:27:09 +01:00
Shekar Siri
46e6f1a503 feat(deploy): add production deployment target
Add new prod-deploy make target that validates environment
configuration before deploying to production. The target checks
for .env.production file and extracts NODE_ENV and API_EDP values
before executing the deployment process.

Also updates help documentation to include the new target.

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-05 13:21:18 +01:00
Shekar Siri
ce2a65f276 fix(filter-types): standardize SLOW_PAGE_LOAD enum value
Change SLOW_PAGE_LOAD enum string value from camelCase 'slow_pageLoad'
to snake_case 'slow_page_load' to maintain consistent naming convention
across all enum values.

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-05 12:46:39 +01:00
Shekar Siri
f168f90f10 feat(build): add Makefile for frontend application management
This commit introduces a Makefile for the frontend application that:
- Provides commands to start the app in background or foreground
- Includes utilities to check status and stop the application
- Reads environment variables from .env file with fallback values
- Sets up logging infrastructure with timestamped log files
- Includes help documentation for all available commands

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-05 11:58:25 +01:00
Taha Yassine Kraiem
b6cca71053 refactor(chalice): refactored vault 2025-03-05 11:38:40 +01:00
Taha Yassine Kraiem
2841740afb fix(chalice): fixed vault 2025-03-05 11:28:40 +01:00
Shekar Siri
927f96cb79 fix(ui): update icon in health modal refresh button
Replace the string-based icon reference 'arrow-repeat' with the React
component <RefreshCcw size={18} /> from lucide-react. Also fix indentation
in the category mapping section for better code organization.

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-05 11:26:40 +01:00
Shekar Siri
e174a11466 fix(ui): update spots list header title for consistency
Change header title from "Spot List" to "Spots" to improve UI consistency
and make the heading more concise.

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-05 11:22:26 +01:00
Shekar Siri
ee4c5cf45d feat(ui): improve session search and count functionality
- Replace latestList with latestSessionCount to better track new sessions
- Move debouncing logic to PrivateRoutes for improved consistency
- Fix session count checking with proper API integration
- Clean up code formatting and remove unnecessary function calls

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-04 19:37:20 +01:00
Taha Yassine Kraiem
78ddbb9233 fix(chalice): fixed error-exp 2025-03-04 17:04:31 +01:00
Shekar Siri
66edf44f8b fix(ui): resolve tooltip conditional rendering
- Replace separate delay and disabled props with conditional title
- Ensure tooltip only shows content when not disabled
- Maintain consistent tooltip behavior across the application
- Prevent potential rendering errors on disabled tooltips
- Improve code maintainability for tooltip components

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-04 16:39:25 +01:00
Shekar Siri
0af941e543 refactor(SessionList): optimize component performance
- Fix TypeScript error with SessionItem JSX component
- Convert SessionItem to use modern React hooks and patterns
- Implement useCallback and useMemo for better rendering performance
- Properly handle optional chaining for conditional properties
- Remove console.log statements from search store
- Fix useEffect dependencies to prevent unnecessary rerenders
- Cleanup unused imports and commented code

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-04 16:33:01 +01:00
Shekar Siri
fd64d721c6 fix(ui): resolve SessionItem JSX rendering error
- Fix TypeScript error with SessionItem component by providing proper props
- Remove unused isSessionsRoute variable
- Remove commented out code for better clarity
- Fix formatting and indentation throughout the file
- Update setTimeout formatting to match project style

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-04 16:07:35 +01:00
Shekar Siri
f965c69a26 refactor(Copyright): modernize component and add dynamic year
- Convert from function to React.memo for better performance
- Replace hardcoded year with dynamic current year calculation
- Update styling classes to use Tailwind format
- Add hover states to improve UX
- Add rel="noopener noreferrer" for security best practices
- Change container from div to semantic footer element

Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
2025-03-04 15:47:01 +01:00
Kraiem Taha Yassine
9bb93d5daa
fix(chalice): fixed get error details (#3084) 2025-03-04 15:20:51 +01:00
Shekar Siri
4d19586eb9 fix(ui): tailwind preflight that causing antd button with icon aligment issue 2025-03-04 15:05:53 +01:00
nick-delirium
5e10e168c6
ui: fix timetable crash on empty record 2025-03-04 13:41:52 +01:00
Kraiem Taha Yassine
aa2c14b7c1
refactor(chalice): refactored collaboration code (#3082) 2025-03-04 10:53:54 +01:00
Shekar Siri
4ef61f6fb5 change(ui): sessions list header y padding 2025-03-03 18:39:58 +01:00
nick-delirium
95a5037abf
tracker: fix up formatting, changelog 2025-03-03 17:07:46 +01:00
Aspyryan
23514d4b3f
Running buffer slicing when browser is idle (#3050)
* Fixed tracker uploadOfflineRecording

* Make FlushBuffer perform slicing when browser is idle

* Use map function to cast away proxy objects in flushBuffer
2025-03-03 17:06:41 +01:00
Delirium
ee46413b13
Events for E2E testing (#3081)
* ui: change export event ui, add rightblock panel

* ui: add timeline select checkbox

* ui: keep selected framework in localstorage

* ui: on timeline => on the timeline
2025-03-03 16:36:42 +01:00
nick-delirium
9f57271af2
ui: update loglevel for observed node warning, drop digit computing from attributeSender 2025-03-03 16:30:24 +01:00
Kraiem Taha Yassine
84771542a6
dev (#3080)
* fix(chalice): fixed unprocessed_sessions.py

* refactor(chalice): refactored favorite sessions

* fix(chalice): fixed errors handing issue
2025-03-03 13:43:59 +01:00
nick-delirium
83f8b67f74
ui: fix sankey crash, fix journey startpoint size 2025-03-03 12:36:31 +01:00
Shekar Siri
6af9f719c8 fix(ui): ui request credentials for refresh token 2025-03-03 12:24:26 +01:00
Shekar Siri
789427dd57 change(ui): copyright 2025-03-03 12:24:04 +01:00
Alexander
59bbc6a903 feat(canvas): fixed an issue with already existing archive 2025-03-03 08:20:17 +01:00
Alexander
0529ee3afd feat(db): reduced the error log length 2025-03-03 08:15:57 +01:00
Shekar Siri
307b0c1cd8 change(api): tenant_id usage 2025-02-28 21:52:54 +01:00
nick-delirium
11a2ea48bc
ui: fix caching for autocomplete values 2025-02-28 17:39:21 +01:00
Shekar Siri
1146900dc0 fix(ui): search call behaviour 2025-02-28 17:26:36 +01:00
Ghaida Bouchaala
0a999247e4
update docs links (#3076) 2025-02-28 16:54:04 +01:00
Alexander
f13ad8a882 feat(http): config changes 2025-02-28 15:41:45 +01:00
Alexander
0d12fdddc9 feat(canvas): moved logs to debug 2025-02-28 15:36:41 +01:00
Shekar Siri
c0a5415eb9 change(api): ee related changes for notes 2025-02-28 15:29:03 +01:00
Alexander
b8a70367ed feat(sessions): added the specific log 2025-02-28 15:22:56 +01:00
Shekar Siri
1efe5c87e8 change(db): ee related init schema updated for notes 2025-02-28 15:21:53 +01:00
Alexander
2dcbfe2ef9 feat(integrations): removed 'req' from jwt_spot_secret 2025-02-28 15:01:03 +01:00
Alexander
fedc48bd0e feat(backend): small changes from saas repo 2025-02-28 14:39:54 +01:00
nick-delirium
de72e79fc6
ui: rm random log 2025-02-28 14:37:09 +01:00
nick-delirium
d43bc3a2e9
tracker: fix tests, release 16.0 + 11.0 (assist) 2025-02-28 10:34:53 +01:00
nick-delirium
8ba6a17055
ui: fix error table pagination 2025-02-28 10:34:39 +01:00
nick-delirium
e5809a5eff
ui: fix long loader ui 2025-02-28 09:26:32 +01:00
Mehdi Osman
171fd5aa59
Update date 2025-02-27 19:42:44 -05:00
Kraiem Taha Yassine
533fb71cb7
Dev (#3074)
* fix(chalice): fixed public api

* fix(chalice): changed user-journey response

* fix(chalice): fixed viewed sessions
2025-02-27 23:42:29 +01:00
Kraiem Taha Yassine
90964e8f50
Dev (#3073)
* fix(chalice): fixed public api

* fix(chalice): changed user-journey response
2025-02-27 21:28:32 +01:00
Kraiem Taha Yassine
7d5ac6a8c9
fix(chalice): fixed public api (#3072) 2025-02-27 21:11:51 +01:00
Sudheer Salavadi
32b281f689
Improvements in Sessions list & Cobrowsing (#3071) 2025-02-27 20:26:03 +01:00
Kraiem Taha Yassine
b175c836a3
fix(chalice): fixed sessions favorite (#3070) 2025-02-27 19:01:01 +01:00
Kraiem Taha Yassine
4e54bced9c
fix(chalice): added get note by id (#3069) 2025-02-27 18:30:44 +01:00
nick-delirium
e2fa3c91e2
ui: fix tabclose events distribution 2025-02-27 17:48:47 +01:00
nick-delirium
19c8fba445
ui: fix button icons 2025-02-27 16:37:05 +01:00
nick-delirium
94e8e0319d
ui: fix cobrowse buttons 2025-02-27 16:17:41 +01:00
nick-delirium
ec8f9a349d
ui: hide training videos from saas 2025-02-27 16:03:18 +01:00
Alexander
992cb2feca feat(peers): removed peers actions 2025-02-27 13:29:57 +01:00
Alexander
844f79a989 feat(peers): removed the service itself 2025-02-27 13:28:43 +01:00
rjshrjndrn
1ec06d360e chore(helm): remove peers service 2025-02-27 10:38:15 +01:00
Andrey Babushkin
fd76f7c302
Migrate to webrtc (#3051)
* resolved conflicts

* resolved conflicts

* translated comments

* changed console.log message lang

* changed console to logs

* implementing conference call

* add isAgent flag

* add webrtc handlers

* add conference call

* removed conference calls

* fix lint error

---------

Co-authored-by: Andrey Babushkin <a.babushkin@lemon-ai.com>
2025-02-27 10:12:27 +01:00
Andrey Babushkin
c793d9d177
add handler (#3062)
* aff handler

* fix socket id handling
2025-02-27 10:12:06 +01:00
nick-delirium
1c1a41bb55
ui: pick series by name if no id exist 2025-02-27 09:41:49 +01:00
nick-delirium
6873f1c56b
ui: fix funnel wording 2025-02-26 17:33:13 +01:00
Kraiem Taha Yassine
d79665cbea
fix(chalice): fixed delete/update metadata used in conditional recording (#3068) 2025-02-26 15:59:10 +01:00
Shekar Siri
256c065153 fix(ui): metadata reload on project config 2025-02-26 14:52:44 +01:00
Kraiem Taha Yassine
114bd4080b
fix(chalice): fixed EE autocomplete top values (#3067)
fix(chalice): fixed funnels param
2025-02-25 18:22:51 +01:00
nick-delirium
d4965f2137
ui: fetch sessions from journey start point 2025-02-25 17:40:33 +01:00
nick-delirium
8ed97b353b
ui: fix empty funnel behavior 2025-02-25 17:12:11 +01:00
Delirium
ac232ef599
Str dict global (#3064)
* testing global string dictionary

* ui: v bump

* tracker: save last prefix

* tracker: substract years from dateid

* tracker: fix digit shaving
2025-02-25 15:19:31 +01:00
nick-delirium
264f35cc9e
ui: add pwright 2025-02-25 15:10:24 +01:00
nick-delirium
d85f63c72e
ui: add icon to e2e button 2025-02-25 14:55:29 +01:00
nick-delirium
4b16e50e5f
ui: export events for e2e 2025-02-25 14:54:02 +01:00
nick-delirium
735b86d778
ui: fix pathname reset 2025-02-25 10:15:49 +01:00
nick-delirium
78bb1c3c6b
ui: remove unused libraries 2025-02-24 16:22:48 +01:00
Delirium
968a3eefde
ui: migrating old components -> ant (#3060)
* ui: migrating old components -> ant

* ui: moving input, tooltip, toggler, checkbox... -> Toggler\s*(.)? from 'UI

* ui: more components moved

* ui: move popover to ant
2025-02-24 16:11:44 +01:00
nick-delirium
1122ced4c3
ui: remove utm and tagged element from mobile filter 2025-02-24 16:00:31 +01:00
nick-delirium
b406893d00
ui: fix funnel table 2025-02-24 15:57:42 +01:00
nick-delirium
8b2cf031ca
ui: chart drilldown -- fix datatable filtering, fix series filtering 2025-02-24 13:59:52 +01:00
nick-delirium
fe06f43dd5
ui: date picker and db name improvements 2025-02-24 10:37:08 +01:00
Kraiem Taha Yassine
64e08916f9
fix(chalice): fixed session's clickmap (#3056) 2025-02-21 18:21:49 +01:00
nick-delirium
99d6545720
ui: fix table crash 2025-02-21 17:48:38 +01:00
nick-delirium
7e4782ae71
ui: hide selection in tablemode 2025-02-21 17:36:28 +01:00
Kraiem Taha Yassine
ed3020dc7e
fix(chalice): fixed enumeration based session's filters (including custom events) (#3055) 2025-02-21 17:31:56 +01:00
nick-delirium
74f6c2cd66
ui: fix autoopen state 2025-02-21 17:15:37 +01:00
Kraiem Taha Yassine
0533624c25
fix(chalice): fixed EE create heatmaps card (#3054) 2025-02-21 16:25:12 +01:00
nick-delirium
c271e01dfc
ui: reload tags on project change 2025-02-21 15:42:59 +01:00
Kraiem Taha Yassine
c07ad14ffc
Dev (#3053)
* fix(chalice): support wrong payload for user-journey drill-down

* fix(chalice): ignore event's MV for v1.22
refactor(DB): ignore event's MV for v1.22

* fix(chalice): fixed EE metrics
2025-02-21 15:21:22 +01:00
Shekar Siri
b91d979c98 change(ui): recordings admin only access 2025-02-21 15:06:13 +01:00
Shekar Siri
d63877de1c change(ui): condition check for recordings module 2025-02-21 15:05:30 +01:00
Kraiem Taha Yassine
3a331d266c
Dev (#3052)
* fix(chalice): support wrong payload for user-journey drill-down

* fix(chalice): ignore event's MV for v1.22
refactor(DB): ignore event's MV for v1.22
2025-02-21 12:56:05 +01:00
nick-delirium
e8835d3058
ui: fix button styling for assist 2025-02-21 12:40:22 +01:00
nick-delirium
3c32e8eec1
ui: fix broken imports 2025-02-21 11:13:40 +01:00
nick-delirium
b1d51c19ea
ui: fix broken import 2025-02-21 11:04:52 +01:00
nick-delirium
f6015f31f5
ui: fix hlid opener 2025-02-21 10:58:45 +01:00
Shekar Siri
06113f7534 change(ui): notes to highlights modules and menu 2025-02-21 10:45:54 +01:00
nick-delirium
8500c1c11e
ui: disable hl edit for non creators 2025-02-21 10:38:15 +01:00
nick-delirium
fc542cd7d2
ui: fix chart label alignments 2025-02-21 10:33:10 +01:00
nick-delirium
44a1d96d2d
ui: journey fixes 2025-02-21 09:40:27 +01:00
Mehdi Osman
bb8e097759
Update .env.sample 2025-02-20 18:24:52 -05:00
Mehdi Osman
7e7387001f
Update .env.sample 2025-02-20 18:17:59 -05:00
nick-delirium
5dd1256cd3
ui: fix card modal from staying open 2025-02-20 17:58:25 +01:00
nick-delirium
bf56cc53a7
tracker: release 15.0.5-beta.1 2025-02-20 17:58:25 +01:00
Aspyryan
da9b926b25
Fixed tracker uploadOfflineRecording (#3048)
Co-authored-by: Jasper Baetsle <jasper.baetsle@orbid.be>
2025-02-20 17:58:25 +01:00
Kraiem Taha Yassine
ef3ed8b690
fix(chalice): fixed int value check (#3049) 2025-02-20 17:39:13 +01:00
nick-delirium
b86e6fdadc
ui: add sankey link sourceValue to chart tooltip 2025-02-20 17:07:48 +01:00
Kraiem Taha Yassine
1293cbde7d
fix(chalice): fixed cards different viewTypes (#3047) 2025-02-20 16:21:08 +01:00
nick-delirium
3e1f073e07
ui: fix subcat for heatmap 2025-02-20 15:39:43 +01:00
Shekar Siri
7cfe29adf3 change(ui): remove segments for mobile since it has only one category 2025-02-20 15:31:19 +01:00
nick-delirium
aa07d41bb5
ui: merge startpoint with widgetsessions mapper 2025-02-20 14:47:58 +01:00
nick-delirium
305c7ae064
ui: fix hasChanged flag, fix auto height for sankey 2025-02-20 14:21:56 +01:00
Kraiem Taha Yassine
724d5a2897
Dev (#3046)
* refactor(chalice): upgraded dependencies

* refactor(chalice): changed logging

* fix(chalice): fixed CH pagination
2025-02-20 13:30:36 +01:00
nick-delirium
f8a40fd875
ui: dissallow taint for clickmap thumbnails 2025-02-20 12:18:03 +01:00
nick-delirium
6c7880efbc
ui: dissallow taint for clickmap thumbnails 2025-02-20 12:05:29 +01:00
nick-delirium
2465029a6c
ui: remove broken sank tooltip row 2025-02-20 12:01:06 +01:00
nick-delirium
11824d2993
ui: set empty defaults for clickmap 2025-02-20 11:40:35 +01:00
nick-delirium
0a4379be6b
ui: fix heatmap expand state 2025-02-20 11:30:47 +01:00
Kraiem Taha Yassine
659aa7495f
fix(chalice): fixed assist record (#3045) 2025-02-19 13:48:44 +01:00
rjshrjndrn
af5d730028 fix(backend): go sum 2025-02-19 11:37:06 +01:00
rjshrjndrn
346fd76ea8 chore(db): Update min CH version 2025-02-19 10:57:03 +01:00
nick-delirium
963c8354c6
ui: fix playlink hover state 2025-02-19 09:27:05 +01:00
Kraiem Taha Yassine
4970bc365b
fix(chalice): fixed product analytics query issue for old CH version (#3044) 2025-02-18 18:28:30 +01:00
rjshrjndrn
def33daa6c fix(backend): go sum 2025-02-18 18:18:34 +01:00
Kraiem Taha Yassine
f752876675
refactor(chalice): product analytics log refactoring (#3043) 2025-02-18 18:00:49 +01:00
Alexander
e046bcbe0a feat(go.mod): upgraded CH library version 2025-02-18 17:32:12 +01:00
Kraiem Taha Yassine
3ed8b3c27d
Dev (#3041)
* refactor(chalice): refactored code

* refactor(DB): changed delta

* refactor(chalice): product analytics log refactoring
2025-02-18 16:37:37 +01:00
nick-delirium
e996600dc8
ui: fix data parser for heatmap 2025-02-18 15:19:41 +01:00
nick-delirium
00a834b143
ui: preset default chart view for few tablelike charts 2025-02-18 14:38:48 +01:00
nick-delirium
b4497edb05
ui: preset default chart view for heatmap 2025-02-18 14:36:22 +01:00
rjshrjndrn
231a3ac330 docs(vars): keep the ep empty for iam auth.
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-18 13:21:58 +01:00
rjshrjndrn
b70effa904 chore(helm): remove clickhouse resource requests
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-18 13:21:58 +01:00
nick-delirium
63b6b39d75
ui: fix weird dateRange interaction with time picker 2025-02-18 13:05:48 +01:00
nick-delirium
cd5d6e861d
ui: fix undef component in AssistSessionsModal 2025-02-18 10:02:09 +01:00
Shekar Siri
2144a90ea7 change(ui): spot menu item handle collapse 2025-02-17 17:59:23 +01:00
Shekar Siri
ecdb98b057 change(ui): spot menu item handle collapse 2025-02-17 17:56:24 +01:00
Kraiem Taha Yassine
8d0c9d5a1f
Dev (#3037)
* refactor(chalice): refactored code

* fix(frontend): changed LAST_7_DAYS/LAST_30_DAYS/PREV_7_DAYS/PREV_30_DAYS to return rounded boundaries
2025-02-17 17:55:32 +01:00
Kraiem Taha Yassine
f8a1c9447b
fix(frontend): fixed LAST_7_DAYS/LAST_30_DAYS/PREV_7_DAYS/PREV_30_DAYS time periods (#3036) 2025-02-17 16:39:17 +01:00
Alexander
f1614b6626 feat(canvas): removed unnecessary log 2025-02-17 15:21:37 +01:00
nick-delirium
adb359b3bf
ui: reset autocomplete values with project change 2025-02-17 14:47:56 +01:00
nick-delirium
9949928335
ui: support auto opening for AutocompleteModal 2025-02-14 16:14:17 +01:00
nick-delirium
6360b9a580
ui: re-download comparison data on metricOf change 2025-02-14 10:00:58 +01:00
nick-delirium
132de0af0d
ui: reduce limit for displayed session tabs 2025-02-14 09:54:55 +01:00
Kraiem Taha Yassine
b70a641af5
Dev (#3034)
* fix(chalice): changed trend - group by users

* fix(chalice): fixed partial right table issue
2025-02-13 18:12:21 +01:00
nick-delirium
ea142b9596
ui: special check for selected values 2025-02-13 17:27:29 +01:00
Sudheer Salavadi
08340eb0f4
Omni-Search filters modal updates (#3030) 2025-02-13 15:14:53 +01:00
Kraiem Taha Yassine
7b61d06454
Dev (#3031)
* fix(chalice): fixed share to slack

* fix(chalice): fixed empty right table limitation
2025-02-13 14:09:15 +01:00
nick-delirium
d031210365
ui: conditional rec fixes 2025-02-13 12:33:43 +01:00
Shekar Siri
4b21194ec5 fix(ui): webhooks ui fixes and improvements 2025-02-13 12:27:40 +01:00
nick-delirium
6bd5b60b1e
ui: check period start/end to prevent useless calculations 2025-02-13 10:59:47 +01:00
nick-delirium
c55b1971c4
ui: remove filtering function from sank 2025-02-13 10:39:53 +01:00
nick-delirium
e34e4fad6c
ui: fallback for hl 2025-02-12 16:03:55 +01:00
nick-delirium
57041140cb
ui: fix custom comparison period generation 2025-02-12 15:53:26 +01:00
Kraiem Taha Yassine
d70ecab1d9
fix(chalice): working on a fix for reversed user-journey (reversed depth) (#3029) 2025-02-12 15:52:17 +01:00
Kraiem Taha Yassine
c4c5fcc2b2
fix(chalice): working on a fix for reversed user-journey (reversed links) (#3028) 2025-02-12 15:32:18 +01:00
Kraiem Taha Yassine
118412d4ab
Dev (#3027)
* fix(chalice): fixed EE code afer refactoring

* fix(chalice): fixed sourcemaps presign URL

* fix(chalice): working on a fix for reversed user-journey
2025-02-12 14:48:38 +01:00
nick-delirium
38653d200f
ui: mobile hl player 2025-02-12 14:00:36 +01:00
nick-delirium
3be8e8092d
ui: reload hls on site change 2025-02-12 10:50:26 +01:00
nick-delirium
2654273f97
ui: fix sank sizes in db/in builder 2025-02-12 10:48:59 +01:00
nick-delirium
7dc70c0ce5
ui: rm meta cta from event list modal 2025-02-12 09:24:04 +01:00
rjshrjndrn
7d31197c78 fix(helm): regression #3026
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-11 19:12:17 +01:00
Sudheer Salavadi
f4b659e508
Improvements in Saved Search and Reset Password Modules (#3025) 2025-02-11 17:52:43 +01:00
rjshrjndrn
31290d7a89 feat(chalice): if iam role is using then the host variable should be empty
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-11 17:26:31 +01:00
nick-delirium
198c5e3a92
ui: fix autocomplete double fetch 2025-02-11 17:09:19 +01:00
nick-delirium
7da11341cf
ui: same filter keys for exclusion in sankey, fix meta cta 2025-02-11 16:58:42 +01:00
Shekar Siri
9492234ccc change(ui): close the share modal only on success 2025-02-11 16:46:53 +01:00
Shekar Siri
ed528e7b5e change(api): reset password error message 2025-02-11 16:37:25 +01:00
nick-delirium
d7a85d0920
ui: sankey styles fixes 2025-02-11 16:28:52 +01:00
rjshrjndrn
f7339c8954 fix(helm): handle empty s3 endpoint url
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-11 16:12:54 +01:00
Shekar Siri
febe784322 change(api): reset password error message 2025-02-11 16:05:06 +01:00
Kraiem Taha Yassine
f6cd20712d
fix(frontend): for Past 7 Days range, return an exact 7.00 days timeperiod instead of 7.99 days timeperiod (#3024) 2025-02-11 15:35:32 +01:00
Shekar Siri
c2b84d18b5 fix(ui): project create or delete handling 2025-02-11 15:23:46 +01:00
Kraiem Taha Yassine
6579b6842b
Dev (#3023)
* fix(chalice): removed support for all type: webVitals/errors/performance/resources predefined card because UI is not showing them anymore

* refactor(chalice): changed all charts CH queries
2025-02-11 15:11:55 +01:00
Shekar Siri
ba55b359fb change(ui): auth with api error messages and antd components 2025-02-11 14:44:24 +01:00
nick-delirium
0d9c265452
ui: table card creation fix, notif item swap, empty metadata 2025-02-11 14:35:58 +01:00
Kraiem Taha Yassine
b09becdcb7
Dev (#3022)
* refactor(chalice): refactored code

* refactor(chalice): removed support for domainsErrors4xx & domainsErrors5xx predefined cards because UI is not showing them anymore
refactor(chalice): removed support of processed_sessions & count_requests predefined cards because UI is not showing them anymore

* fix(chalice): fixed table of errors CH

* fix(chalice): removed support for errorsPerDomains & errorsPerType predefined cards because UI is not showing them anymore

* fix(chalice): removed support for speedLocation predefined card because UI is not showing it anymore
2025-02-11 13:54:47 +01:00
nick-delirium
4819907635
ui: fix sankey node titles, fix option saving, 2025-02-11 13:07:55 +01:00
nick-delirium
6e7ced6959
ui: show note start point instead of date 2025-02-11 11:49:25 +01:00
nick-delirium
3a2e822bea
ui: support empty hls 2025-02-11 11:39:15 +01:00
Shekar Siri
4245dd49e8 fix(api): notes message validation 2025-02-11 11:17:06 +01:00
nick-delirium
b93e953fd9
ui: rm hlid from page location 2025-02-11 11:07:21 +01:00
nick-delirium
a67ca7b870
ui: rm note icon 2025-02-11 10:57:18 +01:00
rjshrjndrn
d457332461 fix(actions): assist-stats-ee
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-10 18:02:01 +01:00
nick-delirium
36a0fad5b4
ui: funnel view type 2025-02-10 17:23:23 +01:00
nick-delirium
e6c7c43246
ui: chart alignments 2025-02-10 17:16:41 +01:00
nick-delirium
b04bcb935e
ui: fix drilldown reset 2025-02-10 17:06:04 +01:00
nick-delirium
9e17673a4a
ui: squeeze time ranges for charts 2025-02-10 15:55:09 +01:00
Rajesh Rajendran
1799f9d4a2
fix crons doesn't have proper commit (#3020)
* fix(action): probable image not correct tag issue

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(ci): possible fix for cron image update

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-10 15:51:29 +01:00
nick-delirium
eed357a79b
ui: rm log 2025-02-10 15:41:36 +01:00
nick-delirium
ff061567d8
ui: html converter test 2025-02-10 15:19:40 +01:00
nick-delirium
ebee06b37a
ui: test new snapshotter for thumbnail 2025-02-10 15:02:43 +01:00
Shekar Siri
442611cb26 fix(ui): mobile highlights modal 2025-02-10 14:16:32 +01:00
Kraiem Taha Yassine
ad022f9cea
fix(alerts): fixed alerts (#3019) 2025-02-10 13:11:50 +01:00
Taha Yassine Kraiem
b9ac2d2238 chore(actions): changed github actions 2025-02-10 12:58:21 +01:00
Shekar Siri
3191843829 change(ui): highlights messages to be nullable 2025-02-10 12:21:31 +01:00
nick-delirium
5267a1c830
ui: revert lib 2025-02-10 12:00:36 +01:00
nick-delirium
0b7b857d65
ui: swap html converter, fix tainted images map, forbid cors objects for highlight 2025-02-10 11:46:52 +01:00
nick-delirium
4ba16bada1
ui: fix api client pathing for spot, integrations 2025-02-10 11:35:33 +01:00
nick-delirium
c7523a1526
tracker: option to disable network 2025-02-10 10:03:27 +01:00
nick-delirium
3e722ea5ba
ui: fix sankey session filtering 2025-02-10 09:54:15 +01:00
nick-delirium
06bad31a7d
ui: prevent overflow in filter modals 2025-02-10 09:37:29 +01:00
Kraiem Taha Yassine
4f2b8d43b7
fix(alerts): fixed alerts (#3014) 2025-02-07 17:58:52 +01:00
Kraiem Taha Yassine
51ba151794
fix(alerts): fixed alerts (#3013) 2025-02-07 17:45:29 +01:00
Kraiem Taha Yassine
fda53bc4ad
fix(alerts): fixed alerts (#3012) 2025-02-07 17:24:34 +01:00
Shekar Siri
d45347da2b fix(ui): session share modal fetch list and modal component 2025-02-07 16:47:21 +01:00
Shekar Siri
9c1be9b22a change(react-native): version jump that fixes kotlin syntax issues 2025-02-07 15:57:22 +01:00
Shekar Siri
dd549b4c1f fix(ui): filters padding 2025-02-07 14:26:53 +01:00
Shekar Siri
5dc5f085b9 fix(ui): clear filters is disblaed for events 2025-02-07 14:05:09 +01:00
Shekar Siri
e325eee47e change(ui): debounce the highlights search 2025-02-07 14:00:52 +01:00
rjshrjndrn
0d68fcc428 fix(helm): check pg version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-07 11:29:28 +01:00
Shekar Siri
e73d633518 change(ui): notes route cleanup 2025-02-07 11:21:34 +01:00
Shekar Siri
22b95f308c change(ui): removed unsupported cards for mobile 2025-02-07 10:57:30 +01:00
Shekar Siri
f87c3e7a5e change(ui): text change for tend card 2025-02-07 10:32:31 +01:00
Shekar Siri
603df2d559 fix(ui): default filter for mobile is wrong 2025-02-07 10:13:08 +01:00
Shekar Siri
98405db9ff fix(ui): activeTab check crashing 2025-02-07 10:12:49 +01:00
Shekar Siri
d4092ebc69 fix(ui): filter item check for subcategory first 2025-02-06 15:51:44 +01:00
Shekar Siri
5d49a91dde fix(ui): drag events 2025-02-06 15:04:36 +01:00
Shekar Siri
8162236139 fix(ui): maintain the card type on reload on card create from the list or from the dashboard 2025-02-06 13:11:25 +01:00
Sudheer Salavadi
3dc933daf3
Product analytics refinements (#3011)
* Various UX, UI and Functional Improvements in  Dashboards & Cards

- Depth filter of Sankey chart data in frontend
- Dashboard & Cards empty state view updates
- Disabled save image feature on cards

* Fixed empty views and headers

* Various improvements across dashboards and cards.

* Dashboard and Sankey refinements.

* More improvements in Sankey and Dashboard

* Autocomplete with checklist -- improvements
2025-02-06 09:43:10 +01:00
Kraiem Taha Yassine
afb08cfe6d
fix(chalice): fixed EE sessions search for mobile projects (#3010)
refactor(chalice): enhanced sessions search payload validation
2025-02-05 18:50:14 +01:00
Shekar Siri
500d70aa67 fix(ui): project form to use the same component that shows errors 2025-02-05 16:59:13 +01:00
Kraiem Taha Yassine
c697c99fec
fix(chalice): fixed autocomplete (#3009) 2025-02-05 16:39:17 +01:00
rjshrjndrn
600eba27a1 fix(helm): varable value
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-05 14:51:36 +01:00
Alexander
c50515e799 feat(http): added missing web prefix to tags endpoint 2025-02-05 14:46:08 +01:00
Shekar Siri
d29c7f20a4 fix(ui): table csv export 2025-02-05 14:32:03 +01:00
Shekar Siri
a4b65c618f fix(ui): user journey is not sending the metricValue 2025-02-05 13:49:09 +01:00
rjshrjndrn
7a8be69c85 chore(init): Update kubernetes to version 1.31
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-05 12:36:44 +01:00
rjshrjndrn
92c142ec33 chore(databases): Update postgresql to 17.2
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-05 12:36:44 +01:00
rjshrjndrn
8d878a3445 feat(helm): Database version bounds
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-05 12:36:44 +01:00
rjshrjndrn
e1b05dbd33 chore(helmcharts): Update database versions
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-05 12:36:44 +01:00
Shekar Siri
30dd123f29 fix(ui): sessions listings settings filter 2025-02-05 12:21:41 +01:00
Sudheer Salavadi
f88ff53e15
Product analytics refinements (#3006)
* Various UX, UI and Functional Improvements in  Dashboards & Cards

- Depth filter of Sankey chart data in frontend
- Dashboard & Cards empty state view updates
- Disabled save image feature on cards

* Fixed empty views and headers

* Various improvements across dashboards and cards.

* Dashboard and Sankey refinements.
2025-02-05 10:43:16 +01:00
Kraiem Taha Yassine
cb8d87e367
Dev (#3003)
* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* fix(chalice): fixed boarding

* fix(chalice): fixed assign session

* refactor(assist-stats): upgraded dependencies

* fixed(assist-stats): fixed import issue

* fix(chalice): changed env vars

* fix(chalice): fixed search sessions for EE
2025-02-04 19:06:10 +01:00
rjshrjndrn
0e5fe14dc2 chore(helm): make s3 external endpoint
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-04 18:45:20 +01:00
rjshrjndrn
1feb4bdc64 chore(helm): Adding secret with db secrets
Use all the db jobs with secret from this.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-02-04 18:45:20 +01:00
Shekar Siri
de0c10de56 fix(ui): metric update in the list 2025-02-04 18:23:27 +01:00
Shekar Siri
c59dbbc79d fix(ui): table charts checking the total and list 2025-02-04 17:26:18 +01:00
Shekar Siri
49c408f44e fix(ui): update created card id 2025-02-04 16:52:47 +01:00
Shekar Siri
d374137e42 fix(ui): recording status check 2025-02-04 16:46:06 +01:00
Shekar Siri
7caa386d2d change(ui): session_replay permission check for sessions list, highlights and bookmarks/vault 2025-02-04 13:22:55 +01:00
Shekar Siri
82e170ff1c change(ui): do not set the active project on creation 2025-02-04 13:02:29 +01:00
Shekar Siri
047a4d0108 fix(ui): error handling 2025-02-04 12:55:27 +01:00
Shekar Siri
7485016f92 fix(ui): error handling 2025-02-04 12:55:27 +01:00
Alexander
ff6342298e feat(github): fixed some typos 2025-02-04 11:51:49 +01:00
Alexander
8d8e6176be feat(node.js): upgraded express module and node-alpine for sourcemap-reader and peers 2025-02-04 11:41:38 +01:00
Shekar Siri
82621012de fix(ui): issue form\ 2025-02-04 11:32:53 +01:00
Sudheer Salavadi
1b3a3dfc21
Product analytics refinements (#3002)
* Various UX, UI and Functional Improvements in  Dashboards & Cards

- Depth filter of Sankey chart data in frontend
- Dashboard & Cards empty state view updates
- Disabled save image feature on cards

* Fixed empty views and headers

* Various improvements across dashboards and cards.
2025-02-04 09:49:49 +01:00
Shekar Siri
da923f13b9 fix(rn-android): syntax issue 2025-02-03 15:44:33 +01:00
Sudheer Salavadi
2a52de073d
Interaction and UI updates in Sankey Chart (#2997) 2025-02-03 14:40:15 +01:00
Alexander
ea8729dd93 feat(assist): upgraded assist version 2025-02-03 13:45:29 +01:00
Alexander
84f9c02802 feat(assist): upgraded uws library (ee) 2025-02-03 13:27:00 +01:00
Alexander
6ec7fe64a7 feat(assist): upgraded node version for docker 2025-02-03 10:16:50 +01:00
Alexander
68c5d986fe feat(assist): upgraded the express module version (vuln cause) 2025-02-03 09:56:46 +01:00
Kraiem Taha Yassine
cb977d54e1
refactor(chalice): changed default env vars (#2996) 2025-01-31 18:47:42 +01:00
nick-delirium
392088be22
ui: some tweaks for visual adjust jump 2025-01-31 17:32:33 +01:00
Kraiem Taha Yassine
88c1f18c48
refactor(chalice): upgraded dependencies (#2995)
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies
2025-01-31 17:23:15 +01:00
Shekar Siri
8597f9ef84 fix(ui): sql query for status with number 2025-01-31 15:08:56 +01:00
Sudheer Salavadi
12f4d9a10c
Highlight on timeline 2025-01-31 11:23:55 +01:00
Kraiem Taha Yassine
ab7e9e505d
fix(chalice): user-journey reversed hide minor paths (#2992) 2025-01-30 18:50:26 +01:00
Delirium
0484c0ccdd
ui: tracked user profile and list (#2991)
* ui: tracked user profile and list

* ui: turnoff unsupported node cb

* ui: excess toggle
2025-01-30 18:06:12 +01:00
rjshrjndrn
e72d492e66 fix(clikhouse): minimal cpu/mem for clickhouse
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-30 16:55:20 +01:00
rjshrjndrn
12472cf84c fix(cli): string interpolation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-30 16:46:19 +01:00
rjshrjndrn
2fc4f552d5 chore(cli): proper formatting
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-30 16:42:29 +01:00
rjshrjndrn
dbcb651f40 fix(cli): string interpolation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-30 16:39:05 +01:00
rjshrjndrn
cd868f736b docs(cli): todo version constraint
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-30 16:22:51 +01:00
rjshrjndrn
d4b3791b19 chore(release): Adding clickhouse foss manifest 2025-01-30 16:20:38 +01:00
rjshrjndrn
a8f167b5af feat(cli): add version specific checks
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-30 16:15:38 +01:00
Kraiem Taha Yassine
5c1e5078b5
fix(chalice): fixed string fetchDuration value support (#2989) 2025-01-30 15:07:21 +01:00
Kraiem Taha Yassine
c2ce9b8466
Dev (#2988)
* fix(chalice): changed new user-journey to return identical response to the old user-journey

* fix(chalice): fixed boarding

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(DB): product analytics schema for CH
2025-01-30 13:39:18 +01:00
Kraiem Taha Yassine
3da965959b
fix(chalice): fixed get first mob (#2985) 2025-01-29 18:56:41 +01:00
Kraiem Taha Yassine
44108bd57e
Dev (#2982)
* refactor(chalice): code cleaning

* refactor(chalice): user journey use new DB structure

* refactor(chalice): fixed user journey when start event is different from the visible type
2025-01-28 17:29:07 +01:00
Alexander
30c0e5abe9 feat(api): fixed a crashloop in chalice-ee 2025-01-28 17:26:42 +01:00
rjshrjndrn
3dd56cbf13 fix: helm chart migration
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-28 16:27:38 +01:00
Taha Yassine Kraiem
084749b6f9 refactor(chalice): return file_key with first mob 2025-01-28 16:21:55 +01:00
Taha Yassine Kraiem
693634fb14 refactor(chalice): return file_key with first mob 2025-01-28 16:09:42 +01:00
Alexander
d50ad9e579 feat(go.mod): upgraded imports 2025-01-28 14:48:11 +01:00
Alexander
c83dec7774 feat(connector): fix the s3 upload method's signature 2025-01-28 14:39:10 +01:00
Alexander
2b05bb59af feat(http): added missing responser to the conditions module 2025-01-28 14:35:09 +01:00
nick-delirium
4c6f23e31f
ui: better index check 2025-01-28 14:18:36 +01:00
Kraiem Taha Yassine
312db29d23
Dev (#2979)
* refactor(chalice): code cleaning

* refactor(chalice): user journey use new DB structure
2025-01-28 13:39:11 +01:00
Shekar Siri
3038fe58d0 fix(ui): default settings values for existing users 2025-01-28 12:51:16 +01:00
Shekar Siri
defcc65848 fix(ui): co-browser (assist) list sorting - duration 2025-01-28 12:43:38 +01:00
Alexander
14d64256a9 feat(azure): added the missing func argument 2025-01-28 11:47:59 +01:00
rjshrjndrn
bced0611ea chore(devops): enable clickhouse for foss
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-28 11:46:51 +01:00
rjshrjndrn
1dbf29a595 chore(release): update version 2025-01-28 11:36:49 +01:00
Shekar Siri
93db47901d fix(ui): co-browser (assist) list sorting 2025-01-28 11:13:02 +01:00
nick-delirium
260ed8ac19
ui: better naming for lstorage key 2025-01-28 10:59:14 +01:00
nick-delirium
2585107bd7
ui: simplify saving for debug 2025-01-28 10:56:10 +01:00
nick-delirium
bd80b7fccd
ui: add debug toggler 2025-01-28 10:54:13 +01:00
nick-delirium
ab84a872db
ui: fix assist filter list 2025-01-27 16:47:42 +01:00
Alexander
b4d2e685de feat(azure): added the content encoding support 2025-01-27 15:41:25 +01:00
Alexander
16182031e1 feat(s3): added the content encoding support 2025-01-27 15:37:04 +01:00
nick-delirium
6cbe17c8e6
ui: fix note edit dropdown 2025-01-27 15:11:48 +01:00
nick-delirium
fbfd0a9854
tracker: fix singletab initialization 2025-01-27 15:00:35 +01:00
nick-delirium
778112c751
ui: fix network panel re-render 2025-01-27 12:08:46 +01:00
nick-delirium
0f744ec1a0
ui: fix tainted images for highlight? 2025-01-24 16:36:46 +01:00
nick-delirium
ab454894f8
ui: rename string 2025-01-24 15:18:44 +01:00
Delirium
6882c62a32
Better network sanitizer (#2969)
* tracker: improve network sanitization

* ui: fix hl image gen

* tracker: rm sanitizer thing
2025-01-24 14:06:34 +01:00
nick-delirium
c2878bacd4
ui: beautify 2025-01-24 11:45:01 +01:00
Alexander
1a70e61de8 feat(http): removed un-started handler 2025-01-24 11:30:20 +01:00
nick-delirium
f4c94aa2d1
tracker: remove unstarted call 2025-01-24 11:27:32 +01:00
nick-delirium
6ccf2e2887
ui: separate card types for device types 2025-01-24 10:42:13 +01:00
Delirium
2cd96b0df0
Highlight UI (#2951)
* ui: start highlight ui

* ui: tag items

* ui: connecting highlights to notes api...

* Highlight feature refinements (#2948)

* ui: move clips player to foss, connect notes api to hl

* ui: tune note/hl editing, prevent zoom slider body from jumping around

* ui: safe check for tag

* ui: fix thumbnail gen

* ui: fix thumbnail gen

* ui: make player modal wider, add shadow

* ui: custom warn barge for clips

* ui: swap icon for note event wrapper

* ui: rm other, fix cancel

* ui: moving around creation modal

* ui: bg tint

* ui: rm disabled for text btn

* ui: fix ownership sorting

* ui: close player on bg click

* ui: fix query, fix min distance for default range

* ui: move hl list header out of list comp

* ui: spot list header segmented size

* Various improvements in highlights (#2955)

* ui: update hl in hlPanel comp

* ui: rm debug

* ui: fix icons file

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
2025-01-24 09:59:54 +01:00
Delirium
622d0a7dfa
ui: omnisearch, timeseries charts redesign (#2791)
* ui: start redesign for live search/list

* ui: remove search field, show filters picker by default for assist

* ui: filter modal wip

* ui: filter modal wip

* ui: finish with omnisearch thing

* ui: start new dashboard redesign

* refining new card section

* ui: some "new dashboard" view improvs, fix icons fill inheritance, add ai button colors

* ui: split up search component (1.22+ tbd?), restrict filter type to own modals

* ui: mimic ant card

* ui: some changes for card creation flow, add series table to CustomMetricLineChart.tsx

* ui: more chart types, add table with filtering out series, start "compare to" thing

* ui: comparison designs

* ui: better granularity support, comparison view for bar chart

* ui: add comparison to more charts, add "metric" chart (BigNumChart.tsx)

* ui: cleanup logs

* ui: fix defualt import, fix sessheader crash, fix condition set ui

* ui: some refactoring and type coverage...

* ui: more refactoring; silence warnings for list renderers

* ui: moveing and renaming filters

* ui: add metricOf selector

* ui: check for metric type

* ui: fix crashes, add widget library table

* ui: change new series btn

* ui: restrict filterselection

* ui: fix timeseries table format

* ui: autoclose autocomplete modal

* ui: some fixes to issue filters default value, display and placeholder consistency

* ui: some dashboard issues with card selection modal and empty states

* ui: comparing for funnels, alternate column view, some refactoring to prepare for customizations...

* Style improvements in omnisearch headers

* Revert "Style improvements in omnisearch headers"

This reverts commit 89e51b0531.

* ui: show health status fetch error

* ui: table, bignum and comp for funnel, add csv export

* Omni-search improvements. (#2823)

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>

* ui: fix bad merge (git hallo?)

* ui: fix filter mapper

* rm husky

* ui: add card floater

* ui: add card floater

* ui: refactor local autocomplete input

* ui: filterout empty options

* UI improvements in New Cards (#2864)

* ui: some minor dashb improvements

* ui: metric type selector for head

* ui: change card type selector, add automapping

* ui: check chart/widget components for crashes

* ui: fix crash with table metrics

* ui: fix crashes related to metric type changes

* ui: filter category for clickmap filt

* ui: fix dash options menu, fix cr/up button

* ui: fix dash list menu propagation

* ui: hide addevent in heatmaps

* ui: fix time mapping for charts

* ui: fix exclusion component for path

* ui: fix series amount for path analysis, rm grid/list selector

* ui: fix icons in list view

* ui: fix for dlt button in widgets

* Various improvements Cards, OmniSearch and Cards  Listing (#2881)

* ui: some improvements for cards list view, funnels and general filter display

* ui: longer node width for journey

* Product Analytics UI Improvements. (#2896)

* Various improvements Cards, OmniSearch and Cards  Listing

* Improved cards listing page

* Various improvements in product analytics

* Charts UI improvements

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* Live se red s2 (#2902)

* Various improvements Cards, OmniSearch and Cards  Listing

* Improved cards listing page

* Various improvements in product analytics

* Charts UI improvements

* ui crash

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>

* ui: fix lucide version

* ui: fix custom comparison period

* ui: fix custom comparison period

* ui: handle minor paths on frontend for path/sankey

* ui: assign icon for event types in sankey nodes

* ui: some strings changed

* ui: hide btn control for table view

* Various improvements in graphs, and analytics pages. (#2908)

* Various improvements Cards, OmniSearch and Cards  Listing

* Improved cards listing page

* Various improvements in product analytics

* Charts UI improvements

* ui crash

* Chart improvements and layout toggling

* Various improvements

* Tooltips

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* ui: fix weekday mapper for x axis on >7d range

* ui: lower default density to 35, fix table card display

* ui: filterMinorPaths -> return input data if nodes arr. is empty

* ui: use default filter for sessions, move around saved search actions, remove tags modal

* ui: fix card creator visibility in grid, fix table exporter visiblility in grid

* ui: fix some proptype warnings

* ui: change new series default expand state

* ui: save comp range in widget details

* ui: move timeseries to apache echarts

* ui: use unique id for window values

* ui: add timestamp for comp tooltip row

* ui: rename var for readability

* ui: fix comparison for 24hr

* Streamlined icons and improved echarts trends (#2920)

* Various improvements Cards, OmniSearch and Cards  Listing

* Improved cards listing page

* Various improvements in product analytics

* Charts UI improvements

* ui crash

* Chart improvements and layout toggling

* Various improvements

* Tooltips

* Improved icons in cards listing page

* Update WidgetFormNew.tsx

* Sankey improvements

* Icon and text updates

Text alignment and color changes in x-ray
Icon Mapping with appropriate names and shapes

* Colors and Trend Chart Interaction updates

* ui

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* ui: series update observe

* ui: resize chart on window

* ui: move barchart to echarts

* ui: fixing bars under comparison

* ui: fixing horizontal bar tooltip

* ui: rm unused

* ui: keep state in storage

* ui: small fixes for granularity and comparisons

* ui: fix savesearch button, fix comparison period tracking

* ui: fix funnel type selection

* ui: fixing saved search button

* ui: enable error logging, remove immutable reference

* ui: update savedsearch drop

* ui: disable button if no saved

* ui: small ui fixes

* ui: add drill to summary charts, add more options to card category picker

* ui: filter compSeries with table

* ui: swap tag_el operator and value

* ui: fix top countries

* ui: further changes for search/cards

* ui: move focus to session list on line click

* ui: fix issue filter mapper

* ui: fix alert pre-init function, fix metric list options, fix legend placement

* ui: fixes for card library

* ui: work on new sankey chart

* ui: fix metadata prefetch

* ui: moving snakey to echarts

* ui: fix funnel comparison focus

* ui: stale loader

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
2025-01-24 09:58:35 +01:00
Shekar Siri
954e811be0
change(api): follow the new structure for cards (#2952)
* change(api): follow the new strucutre for caards

* change(api): update query to handle location and performance events

* change(api): ch query updaets - monitors - sessions with 4xx ..

* change(api): ch query updaets - monitors - table of errors

* change(api): ch query updates - use created_at

* change(api): ch query updates - fix the column name for errorId

* change(api): ch query updates - heatmaps

* change(api): ch query updates - funnels

* change(api): ch query updates - user jounrey / path finder

* change(api): ch query updates - user jounrey / path finder

* change(api): ch query updates - heatmaps fix

* refactor(chalice): changes

* refactor(chalice): changes

* refactor(chalice): changes

---------

Co-authored-by: Taha Yassine Kraiem <tahayk2@gmail.com>
2025-01-23 12:21:23 +01:00
Kraiem Taha Yassine
f535870811
Dev (#2967)
feat(chalice): new user journey: add ids to nodes
2025-01-21 16:19:30 +01:00
Kraiem Taha Yassine
6559fe27ee
Dev (#2962)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): new user journey: optimized post-processing + fixed DROP value
2025-01-21 15:41:18 +01:00
Kraiem Taha Yassine
c26c235f2f
Dev (#2961)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): new user journey 1/2

* feat(chalice): new user journey hideExcess support

* feat(chalice): new user journey create drop to drop nodes&links
2025-01-21 15:16:14 +01:00
Shekar Siri
57e604794c fix(ui): conditional capture metadata 2025-01-21 11:24:36 +01:00
Alexander
eb11f4bf58 feat(ender): optimized logs 2025-01-20 15:38:53 +01:00
Alexander
12a9448a8d feat(go): updated all golang imports 2025-01-20 14:47:56 +01:00
Alexander
9370a7a50e
Adapt CH client for a new PA events table (#2960)
* feat(db): use a new CH events schema

* feat(db): added a missing columns to issue events

* feat(db): correct order of the issue's arguments

* feat(db): crop for url related strings

* feat(db): added missing values

* feat(db): moved materialized columns to json

* feat(db): use the latest ch library with JSON support

* feat(db): added missing duration for requests event
2025-01-20 14:21:57 +01:00
Kraiem Taha Yassine
3f13eeef75
Dev (#2959)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): changed user journey
2025-01-20 12:35:25 +01:00
nick-delirium
e8169fdf2a
ui: update core yarn v 2025-01-20 10:47:52 +01:00
nick-delirium
325937dc4e
ui: update core yarn v 2025-01-20 10:42:16 +01:00
Kraiem Taha Yassine
74637f3042
Dev (#2954)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): hardcoded user journey for testing (+ support of drop&other events)

* refactor(chalice): upgraded dependencies
2025-01-17 18:15:26 +01:00
Kraiem Taha Yassine
eb0fd35688
Dev (#2953)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): new user journey query

* feat(chalice): hardcoded user journey for testing
2025-01-17 17:31:52 +01:00
rjshrjndrn
c692ff26b5 chore(cli): install k3s with cloudflare dns
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2025-01-17 16:46:35 +01:00
Shekar Siri
48bf849f4b feat(api): session highlights get a single record 2025-01-16 14:07:52 +01:00
Sudheer Salavadi
e71036b2f8
Projects Refinements (#2949) 2025-01-16 09:44:34 +01:00
nick-delirium
0911c6528c
ui: wrap error logs 2025-01-16 09:16:17 +01:00
Shekar Siri
d42905d394
feat(api): session highlights (#2947) 2025-01-14 15:21:19 +01:00
Sudheer Salavadi
016011dd23
Preferences > Project - UI Improvements (#2941) 2025-01-14 12:48:11 +01:00
Shekar Siri
9ee853365c fix(ui): user invitation 2025-01-13 13:48:13 +01:00
Kraiem Taha Yassine
a58bff9d11 Patch api v1 21 0 (#2932)
* fix(chalice): fixes for SSO

* fix(chalice): changed base image

* fix(chalice): changed requirements

(cherry picked from commit c8775f3c15)
2025-01-13 11:42:40 +01:00
Shekar Siri
830fb70ee0 fix(ui): project delete 2025-01-10 16:01:17 +01:00
Shekar Siri
637a265c24 change(ui): projects revamp - project edit 2025-01-09 15:43:42 +01:00
Shekar Siri
c28f677d10 change(ui): projects revamp - project edit 2025-01-09 15:41:12 +01:00
Shekar Siri
7c5af16493 change(ui): projects revamp - project edit 2025-01-09 15:21:17 +01:00
Shekar Siri
b5bf70a8e0 change(ui): projects revamp - install docs change 2025-01-09 15:21:17 +01:00
Kraiem Taha Yassine
a9bbf31f73
Dev (#2931)
* fix(chalice): fixed errors package
2025-01-09 13:19:10 +01:00
Kraiem Taha Yassine
c74d1671a5
Dev (#2930)
* fix(chalice): changed ee dockerfile to use pip instead of uv
2025-01-09 13:05:25 +01:00
Kraiem Taha Yassine
4c81b195a1
Dev (#2929)
* Revert "fix(chalice): changed ee dockerfile"

This reverts commit c6ba000c49.
2025-01-09 12:48:48 +01:00
Kraiem Taha Yassine
8c66fd412d
Dev (#2928)
* fix(chalice): changed ee dockerfile
2025-01-09 12:42:42 +01:00
Kraiem Taha Yassine
bd9f95851c
Dev (#2927)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgraded docker base image
refactor(crons): upgraded docker base image
refactor(alerts): upgraded docker base image
2025-01-08 16:28:07 +01:00
Kraiem Taha Yassine
2291980a89
Dev (#2926)
* fix(chalice): fixed path-finder first step-type issue

* refactor(chalice): removed time between steps in path-finder
2025-01-08 16:09:53 +01:00
Shekar Siri
80462e4534
change(ui): projects settings (#2924)
* change(ui): projects revamtp (wip)

* change(ui): projects revamtp (wip)

* change(ui): projects revamp - project form

* change(ui): projects revamp - capture rate tab

* change(ui): projects revamp - gdpr

* change(ui): projects revamp - reset state

* change(ui): projects revamp - progress avatar of samplerate, scroll etc.,

* change(ui): projects revamp - sync projects in list

* change(ui): projects revamp - project menu improvements
2025-01-08 11:50:22 +01:00
Shekar Siri
adf27d4cb7 fix(ui): total/count change as per the api response 2025-01-07 10:54:01 +01:00
Shekar Siri
22d04436c0 fix(ui): bookmarks separation and other page titles 2025-01-02 15:07:43 +01:00
Shekar Siri
e7e821daee fix(ui): session tags issue type to be lowercase 2025-01-02 11:24:15 +01:00
Alexander
700870f957 feat(assist): added a missing package to ee version 2024-12-31 14:01:15 +01:00
Alexander
0dfe1da0af feat(assist): use .cork() to avoid warnings for uws 2024-12-31 13:50:58 +01:00
Alexander
dcad0798e8 feat(assist): removed an old logs approach (exception reason) 2024-12-31 12:29:59 +01:00
Shekar Siri
776069fca1 change(react-native): android version jump to use v1.1.7 which has support of android graphql 2024-12-30 16:09:43 +01:00
Shekar Siri
463ffc8cae feat(android): sendMessage with support of graphql 2024-12-30 16:07:51 +01:00
Alexander
3003934374 feat(integrations): added support for both issues and events for sentry integration 2024-12-30 15:22:55 +01:00
nick-delirium
69e1e60c70
ui: bump finder version for css in js support 2024-12-30 13:45:13 +01:00
Shekar Siri
e8dbc40a5c change(react-native): android version jump to use v1.1.6 2024-12-30 12:46:39 +01:00
Shekar Siri
297f633906 fix(tracker): data type 2024-12-27 14:49:34 +01:00
Kraiem Taha Yassine
70bae502d3
Dev (#2914)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed get recording status
2024-12-27 14:11:39 +01:00
Kraiem Taha Yassine
c9d63d912f
Dev (#2913)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed get null card info
2024-12-26 16:06:25 +01:00
Kraiem Taha Yassine
b92d5c8706
Dev (#2912)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feature(chalice): store card's compare-to
2024-12-26 15:32:24 +01:00
nick-delirium
b18871c632
ui: fix multi assist view metadata mapper 2024-12-26 13:54:03 +01:00
Kraiem Taha Yassine
aad8542d97
Dev (#2911)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): support low-density for cards
2024-12-26 13:23:19 +01:00
Alexander
fe7e200dba feat(analytics): use validator as a singleton 2024-12-24 15:14:31 +01:00
Alexander
471558fec5 feat(analytics): added helm chart 2024-12-24 12:55:24 +01:00
Kraiem Taha Yassine
7b7856184e
Dev (#2907)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed view error code
2024-12-23 18:46:56 +01:00
Kraiem Taha Yassine
82ab91bc25
Dev (#2906)
* refactor(chalice): removed errors status
refactor(chalice): removed errors viewed
refactor(chalice): removed errors favorite
refactor(DB): removed errors viewed
refactor(DB): removed errors favorite

* refactor(chalice): ignore hide excess for Path Finder as it will be done in UI
2024-12-23 18:34:57 +01:00
Kraiem Taha Yassine
4c4e1b6580
Dev (#2905)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): pg client helper handles closed connexion

* refactor(chalice): upgraded dependencies
refactor(chalice): restricted get error's details
2024-12-23 17:19:43 +01:00
Alexander
763aed14a1 feat(analytics): moved charts data to the separate module 2024-12-23 15:32:30 +01:00
Alexander
230924c4b8 feat(analytics): removed unnecessary comments 2024-12-23 14:50:58 +01:00
Alexander
880f4f1a94 feat(analytics): better naming for cards and dashboards modules 2024-12-23 14:43:12 +01:00
Alexander
f05e84777b feat(analytics): small refactoring of the service's architecture 2024-12-23 14:24:06 +01:00
Kraiem Taha Yassine
5fe204020f
Dev (#2903)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed restricted sessions search
2024-12-23 11:54:28 +01:00
nick-delirium
4395c9ee46
tracker: react native 0.6.11 (background, ios crash, screen size) 2024-12-23 10:54:06 +01:00
nick-delirium
0658e3b3d9
tracker: update ios pkg ver 2024-12-23 10:49:13 +01:00
Shekar Siri
31ba4176aa change(react-native): android version jump to use v1.1.4 2024-12-23 10:48:18 +01:00
nick-delirium
2a75785181
ui: fix perfwarnings container margin 2024-12-23 10:26:56 +01:00
Kraiem Taha Yassine
ddfaaeb6c5
Dev (#2898)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): restricted sessions search
2024-12-20 18:23:48 +01:00
Kraiem Taha Yassine
7c4ff2ed3f
Dev (#2897)
* fix(alerts): fixed alerts

* fix(chalice): fixed product analytics

* fix(chalice): fixed product analytics
2024-12-20 17:37:01 +01:00
Kraiem Taha Yassine
21992ceadb
Dev (#2895)
* fix(chalice): fixed alerts
fix(DB): fixed missing table
2024-12-20 11:46:24 +01:00
Alexander
d35d201a10 feat(go imports): total imports upgrade 2024-12-20 11:05:28 +01:00
nick-delirium
9d4120e7d6
ui: show bg badge for mobile 2024-12-20 10:43:27 +01:00
Alexander
93d51acfc4 feat(pa): removed unnecessary s3 import 2024-12-20 10:40:33 +01:00
Alexander
fdae00c602 feat(go mod): vuln import update 2024-12-20 10:31:42 +01:00
Shekar Siri
9d82c2935a
feat(analytics): dashboard manage cards (#2893) 2024-12-20 10:27:58 +01:00
nick-delirium
99ddcd9708
ui: return throw for log parser (for consistency) 2024-12-20 10:22:35 +01:00
Kraiem Taha Yassine
f7ddf82591
Dev (#2894)
* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): multiple migration fixes
refactor(chalice): refactored ch-sessions code
2024-12-19 18:21:30 +01:00
vagelim
c004bc8932
feat: Add support for self-hosted Sentry instances with configurable URL (#2887) 2024-12-19 08:02:24 +01:00
nick-delirium
694de75052
tracker: changes to resource fails tracking 2024-12-18 15:10:20 +01:00
nick-delirium
3b68bebf40
tracker: changes to resource fails tracking 2024-12-18 14:48:54 +01:00
nick-delirium
b6080b2492
tracker: use simple string for sprites 2024-12-18 14:31:07 +01:00
nick-delirium
f791d06ecd
tracker: add use el / sprite map support, change graphql relay plugin 2024-12-18 14:04:29 +01:00
Alexander
d7f810809e feat(analytics): removed unnecessary keys import 2024-12-18 11:10:38 +01:00
Shekar Siri
21895677c3
feat(analytics): cards to use db (#2886) 2024-12-18 11:02:44 +01:00
Alexander
129ab734f3
feat(frontend): added a support for the self-hosted sentry (#2890) 2024-12-18 10:49:33 +01:00
Alexander
8882a18c0d feat(go mod): go modules updating 2024-12-18 10:23:18 +01:00
nick-delirium
4f8dd444ff
ui: fix sentry log check 2024-12-18 10:19:11 +01:00
Alexander
c42391c3da feat(integrations): added missing env configuration for docker-compose and helm-chart 2024-12-17 15:06:05 +01:00
Alexander
e27d2394d1 feat(go.mod): upgraded outdated imports 2024-12-17 11:39:13 +01:00
Alexander
77981feb2b feat(integrations): fixed a tags search in Sentry provider 2024-12-17 11:11:28 +01:00
Shekar Siri
e38b729edd feat(analytics): resolve conflcits 2024-12-16 15:37:05 +01:00
Shekar Siri
8ca332e2f0 Merge branch 'product-analytics-go' into dev 2024-12-16 15:36:38 +01:00
Shekar Siri
af761693aa feat(analytics): dashbaord check existence and paginated methods 2024-12-16 13:10:24 +01:00
Shekar Siri
64d9029554 feat(analytics): dashbaord creatge validation 2024-12-16 11:54:15 +01:00
Shekar Siri
0e00ca19ad feat(analytics): dashbaord creatge validation 2024-12-16 11:51:19 +01:00
Shekar Siri
a88002852d feat(analytics): dashbaord update and delete 2024-12-16 11:43:40 +01:00
nick-delirium
77673b15f8
ui: bundle prism locally 2024-12-16 11:17:08 +01:00
nick-delirium
efa0a2878b
ui: fix default language 2024-12-16 11:05:01 +01:00
nick-delirium
bc2259aef3
ui: fix prismjs loading 2024-12-16 10:52:06 +01:00
nick-delirium
92a6379e2c
ui: fix prismjs loading 2024-12-16 10:39:48 +01:00
Shekar Siri
0a49df3996 feat(analytics): dashbaord pgconn 2024-12-16 10:36:25 +01:00
Shekar Siri
69ef083abe
feat(pa): cards endpoints (#2871)
* feat(analytics): dashboards

* feat(analytics): cards api endpoints

* feat(analytics): validator dependency
2024-12-13 14:08:03 +01:00
Shekar Siri
00b7f65e31 feat(analytics): validator dependency 2024-12-13 13:28:44 +01:00
Shekar Siri
0c0cac8fbe feat(analytics): cards api endpoints 2024-12-13 11:53:46 +01:00
Kraiem Taha Yassine
48483be8f9
Dev (#2870)
* fix(chalice): fixed clickmap
2024-12-12 18:31:54 +01:00
Kraiem Taha Yassine
0eae03f29d
Dev (#2869)
* fix(chalice): fixed user's journey
2024-12-12 18:11:28 +01:00
Kraiem Taha Yassine
383bbee2dc
Dev (#2868)
* refactor(chalice): refactored product analytics
2024-12-12 17:56:41 +01:00
Kraiem Taha Yassine
77d4c890cf
Dev (#2867)
* fix(chalice): fixed CH funnels query for new driver
* fix(chalice): fixed CH funnels support for nonexistent sequence
2024-12-12 17:12:29 +01:00
Kraiem Taha Yassine
a654e30df2
Dev (#2866)
* refactor(chalice): refactored errors

* refactor(chalice): refactored metrics/cards/dashboards
refactor(chalice): refactored sessions
refactor(chalice): refactored sourcemaps
2024-12-12 12:37:39 +01:00
nick-delirium
e03bce3ba5
spot: 1.0.13 2024-12-12 10:47:37 +01:00
nick-delirium
92f3e8a0b5
spot: fix ingest resetting 2024-12-12 10:45:31 +01:00
nick-delirium
8d2b998f9a
spot: upgrade wxt, fix missing network timestamps
Signed-off-by: nick-delirium <nikita@openreplay.com>
2024-12-11 18:04:11 +01:00
Kraiem Taha Yassine
83c979ade0
Dev (#2860)
* refactor(chalice): refactored sessions
2024-12-11 17:20:14 +01:00
Shekar Siri
5640913e68 Merge branch 'dev' into product-analytics-go 2024-12-11 16:49:15 +01:00
Kraiem Taha Yassine
c93df14f93
Dev (#2858)
* refactor(chalice): refactored issue-tracking-tools*
2024-12-11 16:24:56 +01:00
Kraiem Taha Yassine
c151d55c67 fix(chalice): use card's global filters instead of series' filters (#2857)
(cherry picked from commit 94b541c758)
2024-12-11 16:18:34 +01:00
Kraiem Taha Yassine
d6e0865b8a
Dev (#2856)
refactor(chalice): refactored alerts
refactor(chalice): refactored autocomplete
refactor(chalice): refactored sessions*
refactor(chalice): refactored collaboration-tools
refactor(chalice): refactored log-tools*
refactor(chalice): refactored issue-tracking-tools*
2024-12-11 15:53:34 +01:00
nick-delirium
d30d1570bd
ui: fix mobile crash? 2024-12-11 14:59:34 +01:00
Shekar Siri
8e7cfebdba fix(ui): funnel - filter sessions by step 2024-12-11 14:36:20 +01:00
nick-delirium
ca035d699e
ui: fix spot tab lookup, improve js build speed 2024-12-11 13:16:02 +01:00
Shekar Siri
7cb6bc7d38 change(ui): tracker version warning message spacing 2024-12-11 11:33:49 +01:00
Shekar Siri
566d6c2fdb
feat(analytics): dashboards (#2788) 2024-12-11 09:55:07 +01:00
Shekar Siri
f1e43b12be change(react-native): android version jump 2024-12-11 09:42:45 +01:00
Shekar Siri
9a37ba0739
feat(react-native): expo support (#2850)
* change(react-native): android version jump

* change(react-native): updates to support expo

* change(react-native): swipe event fix

* change(react-native): version jump

* change(react-native): include plugin file and version jump
2024-12-11 09:41:16 +01:00
Kraiem Taha Yassine
e74effe24d
Dev (#2847)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactord alerts

* refactor(alerts): refactord alerts
refactor(alerts): moved CH
2024-12-10 18:19:12 +01:00
Alexander
dab822e772 feat(spot): added missing imports 2024-12-10 17:55:38 +01:00
Alexander
ec53099eb0 feat(spot): removed old code 2024-12-10 17:48:44 +01:00
nick-delirium
5cde5aefce
ui: more fixes... 2024-12-10 16:26:36 +01:00
nick-delirium
4eea15b053
ui: fix log panel crashing 2024-12-10 13:31:18 +01:00
Kraiem Taha Yassine
37f00f4d73
Dev (#2839)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): CH int and rollback scripts

* refactor(chalice): removed unsued funnels code
2024-12-10 13:11:46 +01:00
Alexander
9b75e4502f
ClickHouse support (#2830)
* feat(db): added CH support to db service

* feat(db): removed license check for CH client

* feat(db): removed fts integration

* feat(clickhouse): added config instead of direct env parsing

* feat(clickhouse): removed prev extraHandlers

* feat(clickhouse): an unified approach for data insertion to dbs

* feat(clickhouse): removed unused imports
2024-12-10 12:41:52 +01:00
nick-delirium
122416d311
ui: improve log list filtering 2024-12-10 12:09:49 +01:00
nick-delirium
890630dfa0
ui: fix tab name lookup 2024-12-10 12:05:26 +01:00
nick-delirium
42dd341e6c
ui: fixup 2024-12-10 11:08:12 +01:00
nick-delirium
922ccede98
ui: trim logs 2024-12-10 10:55:08 +01:00
Delirium
f6cf1cfb4a
Player ux improvements (#2834)
* Player UX improvements.

DevTools (Including multi-tab)
Actions panel (User events, Click maps, Tag Elements)

* ui: remove unused imports, remove str templ classnames

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
2024-12-10 10:21:08 +01:00
Kraiem Taha Yassine
0ac4ed1fa2
Dev (#2833)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored metrics

* refactor(chalice): refactored autocomplete
2024-12-09 17:47:41 +01:00
nick-delirium
013d866455
ui: move xray warn 2024-12-09 17:25:41 +01:00
nick-delirium
a010ef9d0f
ui: fix performance bottlenecks, split data sources in devtools panes 2024-12-09 17:20:08 +01:00
Kraiem Taha Yassine
71b96c1728
Dev (#2832)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored authorize

* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* refactor(chalice): refactored custom_metrics

* refactor(chalice): upgraded dependency
2024-12-09 16:34:53 +01:00
Kraiem Taha Yassine
d35837416b
Dev (#2831)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored authorize

* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* refactor(chalice): refactored custom_metrics
2024-12-09 16:05:54 +01:00
Alexander
d0ef617e40 feat(integrations): removed all unnecessary app exits 2024-12-09 14:20:04 +01:00
Kraiem Taha Yassine
aa8cebca7e
Dev (#2829)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored db-drivers
refactor(scripts): defined ch-dataPort
2024-12-09 13:59:46 +01:00
Kraiem Taha Yassine
f360961500
Dev (#2828)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgraded dependencies
refactor(chalice): new ch-driver logs
2024-12-09 13:11:17 +01:00
Kraiem Taha Yassine
962385651f
Dev (#2822)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): CH connexion logs
2024-12-06 15:16:14 +01:00
Kraiem Taha Yassine
ac47e339cf
Dev (#2821)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): defined CH ports
2024-12-06 14:34:24 +01:00
Kraiem Taha Yassine
d99187e14a
Dev (#2820)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed new ch-driver
fix(chalice): fixed redundant code
2024-12-06 11:18:50 +01:00
nick-delirium
e2417ef2be
tracker: fixing failuresOnly option in network (15.0.3 beta) 2024-12-06 10:16:58 +01:00
Kraiem Taha Yassine
2f693cd490
Dev (#2819)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): removed sessions insights
refactor(DB): removed sessions insights

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies
feat(chalice): moved CH to FOSS
feat(chalice): use clickhouse-connect
feat(chalice): use CH connexion pool
feat(scripts): defined ch-data-port
2024-12-05 17:43:52 +01:00
nick-delirium
c13a220b52
tracker: 15.0.2 2024-12-05 17:22:38 +01:00
PiRDub
844b9d80c3
fix(tracker): prevent raising security error accessing window.top (#2818)
* fix(tracker): prevent raising security error accessing window.top

* fix(canAccessTop): check window document access
2024-12-05 17:21:24 +01:00
nick-delirium
27e94fed35
ui: fixing resource success when mapped from timing messages 2024-12-05 17:20:45 +01:00
Kraiem Taha Yassine
5180ad8717
Dev (#2816)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): preparing for v1.22.0
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* refactor(chalice): removed sessions insights
2024-12-05 09:40:00 +01:00
Shekar Siri
8434044611 change(react-native): android version jump 2024-12-04 16:13:21 +01:00
Kraiem Taha Yassine
99bdb5dba7 fix(chalice): support webhook default ports (#2814)
* fix(chalice): support webhook default ports

* fix(chalice): support webhook default ports EE

(cherry picked from commit 04db322e54)
2024-12-04 13:10:53 +01:00
nick-delirium
e51455b8ea
ui: fix mobile player not scaling automatically 2024-12-03 17:29:20 +01:00
Shekar Siri
30c9f6184e change(ui): webhooks url allow port 2024-12-03 17:07:30 +01:00
Kraiem Taha Yassine
ca20ae3d10 fix(chalice): fixed edit user's role (#2810)
(cherry picked from commit e9a1a8c4eb)
2024-12-03 16:28:40 +01:00
Alexander
eeb1d616bc feat(integrations): removed user's creds from error message 2024-12-03 15:23:18 +01:00
Shekar Siri
594d57905f fix(ui): do not allow protected roles 2024-12-03 14:14:49 +01:00
nick-delirium
db92ae3bf0
ui: update autoretry policy for integrations 2024-12-03 13:48:16 +01:00
Shekar Siri
cadb2b456d fix(ui): 403 clear the token 2024-12-03 13:27:22 +01:00
Shekar Siri
8e8064abd5 fix(ui): trigger session search on change 2024-12-03 13:27:22 +01:00
Kraiem Taha Yassine
9d740c7bb2 fix(chalice): support session's search null duration (#2806)
(cherry picked from commit e7ad4c8bd0)
2024-12-03 13:25:12 +01:00
nick-delirium
4ec2dbfeca
tracker: update changelogs 2024-12-03 09:56:53 +01:00
Kraiem Taha Yassine
f1ce859e8b fix(chalice): fixed accept invitation response (#2803)
(cherry picked from commit 2e5517509b)
2024-12-02 23:07:30 +01:00
Delirium
eff22eb554
tracker (rn): sessionID method for react native connector
* tracker: rm env var

tracker: fix some ios react native issues, add sessionid method

* change(react-native): android native method to get sessionId

* change(react-native): android version jump

* change(react-native): android use promise

* tracker: clearing logs

---------

Co-authored-by: Shekar Siri <sshekarsiri@gmail.com>
2024-12-02 17:57:28 +01:00
Shekar Siri
076e664ced change(react-native): android use promise 2024-12-02 17:15:19 +01:00
Shekar Siri
f95c1c9c94 change(react-native): android version jump 2024-12-02 16:57:00 +01:00
Shekar Siri
67a3494804 change(react-native): android native method to get sessionId 2024-12-02 16:21:45 +01:00
Shekar Siri
77273b0df9 change(ui): remove pagination while checking for latest sessions 2024-12-02 14:14:06 +01:00
Shekar Siri
72d4867e42 fix(assist): pagination 2024-11-29 15:41:58 +01:00
Shekar Siri
ef9a077655 change(react-native): version jump 0.6.5 2024-11-28 12:32:47 +01:00
Shekar Siri
5831da93e1 change(react-native): added stop 2024-11-28 12:28:55 +01:00
Shekar Siri
197d6bbc0a change(react-native): version jump 0.6.4 2024-11-28 12:27:26 +01:00
Shekar Siri
0b72007006 change(react-native): android version jump 2024-11-28 12:06:50 +01:00
nick-delirium
54b07c6110
ui: porting fix from saas 2024-11-28 11:52:12 +01:00
Shekar Siri
99085a95a1 feat(analytics): dashboards 2024-11-27 16:13:26 +01:00
Shekar Siri
f5df3fb5b5 fix(ui): sessions, bookmark, notes navigation and search silters and timestamp issues 2024-11-26 12:57:57 +01:00
Shekar Siri
253feefe53 change(ui): search query params improvements 2024-11-26 12:57:57 +01:00
Shekar Siri
b84c05cbad fix(ui): latest sessions check clear the list 2024-11-26 12:57:57 +01:00
Kraiem Taha Yassine
043d6a9f53 fix(chalice): support user-city for assist (#2782)
(cherry picked from commit b00a90484e)
2024-11-26 10:43:50 +01:00
rjshrjndrn
5dbe313a68 Squashed commit of the following:
fix(helm): password
    remove: debug
    chore(helm): change helm hook to post upgrde, since pre-upgrde triggered
    before install
    fix(helm): remove default ns
    fix(helm): template number
    chore(helm): change trigger preference
    fix(helm): variable
    revert: disabling clickhouse pwd rotation, as CH not used
    chore(helm): trigger password update only if passwords are rotated
    chore(helm): Adding snippet for postgres/clickhouse secret rotation

    Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-25 18:37:06 +01:00
rjshrjndrn
73db2c44d0 fix(helm): version change check
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-25 18:28:34 +01:00
rjshrjndrn
4f269ce4a0 chore(helm): Adding opereplay config map for
Installation agnostic version access. This is useful for db migration,
especially when we install using argo, or other means
precedence to the autogenereated prev version.
Set migration is true if its argo deployment
fix the forceMigration override
2024-11-25 18:28:34 +01:00
rjshrjndrn
7c8912933f chore(cli): proper cleanup
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-25 18:28:34 +01:00
rjshrjndrn
f6f2a14a18 chore(helm): check github availability before clone
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-25 18:28:34 +01:00
Shekar Siri
aa213e036c fix(ui): sessions list persist page, show latest sessions 2024-11-25 12:09:30 +01:00
nick-delirium
ab331d57a4
tracker: fix bundling process, export types separately 2024-11-25 10:11:56 +01:00
nick-delirium
423d9cb671
tracker: bump assist minor v 2024-11-22 14:17:27 +01:00
PiRDub
d409b41ddb
chore(peerDeps): fix @openreplay/tracker min version (#2772) 2024-11-22 14:15:58 +01:00
nick-delirium
38367777b7
ui: fix ws panel crash 2024-11-22 14:05:51 +01:00
Alexander
6830c8879f
web module refactoring (#2725)
* feat(server): moved an http server object into a pkg subdir to be reusable for http, spots, and integrations

* feat(web): isolated web module (server, router, middleware, utils) used in spots and new integrations

* feat(web): removed possible panic

* feat(web): split all handlers from http service into different packages for better management.

* feat(web): changed router's method signature

* feat(web): added missing handlers interface

* feat(web): added health middleware to remove unnecessary checks

* feat(web): customizable middleware set for web servers

* feat(web): simplified the handler's structure

* feat(web): created an unified server.Run method for all web services (http, spot, integrations)

* feat(web): fixed a json size limit issue

* feat(web): removed Keys and PG connection from router

* feat(web): simplified integration's main file

* feat(web): simplified spot's main file

* feat(web): simplified http's main file (builder)

* feat(web): refactored audit trail functionality

* feat(web): added ee version of audit trail

* feat(web): added ee version of conditions module

* feat(web): moved ee version of some web session structs

* feat(web): new format of web metrics

* feat(web): added new web metrics to all handlers

* feat(web): added justExpired feature to web ingest handler

* feat(web): added small integrations improvements
2024-11-21 17:48:04 +01:00
Kraiem Taha Yassine
d95738bb0d fix(chalice): support top graphql autocomplete (#2767)
refactor(chalice): enforce UTC TZ
refactor(crons): enforce UTC TZ
refactor(alerts): enforce UTC TZ

(cherry picked from commit 884f3499ef)
2024-11-20 12:47:20 +01:00
nick-delirium
73ade8da81
sourcemapuploader: fix globe version 2024-11-20 09:54:35 +01:00
Kraiem Taha Yassine
27f1027ad2
Dev (#2764)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(DB): support previous DB upgrade
2024-11-19 18:14:06 +01:00
nick-delirium
88addf6e4a
ui: fix q controls session list refresh method 2024-11-19 17:27:51 +01:00
Kraiem Taha Yassine
f621f6ac00
Dev (#2762)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed metrics sort
2024-11-19 13:57:55 +01:00
Kraiem Taha Yassine
7eeb71ed25
Dev (#2761)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): allow CH drop of massive tables
2024-11-19 11:38:59 +01:00
Shekar Siri
2267ec44c2 fix(ui): integrations update issue, and error handling 2024-11-19 11:36:03 +01:00
Kraiem Taha Yassine
2ebfd99068
Dev (#2760)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed EE heatmaps

* refactor(sourcemaps uploader): upgraded dependencies
2024-11-19 11:18:31 +01:00
Kraiem Taha Yassine
c997549874
Dev (#2759)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed EE heatmaps
2024-11-19 10:50:53 +01:00
nick-delirium
fa723ebc87
ui: fix q controls 2024-11-19 10:36:50 +01:00
nick-delirium
18ee36832b
ui: if no tz, use local 2024-11-18 17:06:27 +01:00
Shekar Siri
ebdc2bd08c fix(ui): omnisearch call 2024-11-18 17:01:55 +01:00
nick-delirium
4db693a6b2
ui: assign non local if changed 2024-11-18 17:00:34 +01:00
nick-delirium
5b6a74f9a6
ui: keep track of local timezone for each visit 2024-11-18 16:58:23 +01:00
nick-delirium
a538546d62
tracker: update deps, fix tests, fix default lib for ts 2024-11-18 16:37:02 +01:00
Kraiem Taha Yassine
db38f914a8
Dev (#2758)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): support special characters for name
feat(chalice): return parsable error for alphanumeric exceptions
resolve #2713
2024-11-18 16:15:27 +01:00
Alexander
94b9a492f0 feat(assist): fixed the issue with overwritten metadata 2024-11-18 15:57:39 +01:00
nick-delirium
544457016a
tracker: ready for 15.0.0 2024-11-18 14:36:12 +01:00
rjshrjndrn
33a71f1a52 chore(api): fix vuln
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-18 14:24:57 +01:00
Kraiem Taha Yassine
78416fdbac
Dev (#2757)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* build(alerts): changed Dockerfile
build(crons): changed Dockerfile
2024-11-18 12:18:02 +01:00
nick-delirium
3f6d944553
tracker: upgrade sockets client 2024-11-18 11:55:17 +01:00
nick-delirium
dcbc437c7b
ui: fix signup flow 2024-11-18 11:42:27 +01:00
nick-delirium
c137ddb10d
ui: fix dep vulns 2024-11-18 09:54:21 +01:00
Alexander
7c443265a0 feat(node): upgraded node-alpine image version 2024-11-18 09:53:54 +01:00
Alexander
5be619d3ea feat(node): npm packages update for assist and peers 2024-11-18 09:41:30 +01:00
Shekar Siri
9ca08d7e23 fix(ui): check for enterprise 2024-11-15 17:46:23 +01:00
Shekar Siri
82d353ec49 fix(ui): show sessions menu 2024-11-15 17:31:59 +01:00
Kraiem Taha Yassine
dd5368219f
Dev (#2753)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): create role return list of projects
2024-11-15 16:58:36 +01:00
nick-delirium
5b46f673c3
ui: fix sidemenu check 2024-11-15 16:54:54 +01:00
Shekar Siri
ba745ed2c9 fix(ui): show password reset error message 2024-11-15 16:42:01 +01:00
Shekar Siri
5f40700de2 fix(ui): roles project and permissions selections to use antd select with multiple mode 2024-11-15 16:24:14 +01:00
nick-delirium
d48bb72d68
ui: fix critical stuff in lock 2024-11-15 16:13:07 +01:00
nick-delirium
e13ec2ab97
ui: fix in session map change 2024-11-15 16:05:59 +01:00
nick-delirium
8761f71bda
ui: update jwt with new pass 2024-11-15 15:50:33 +01:00
Kraiem Taha Yassine
746d7a04eb
Dev (#2752)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed typo in modules
2024-11-15 15:37:57 +01:00
Shekar Siri
ea53e7ce48 fix(ui): notes list pagination 2024-11-15 15:08:51 +01:00
nick-delirium
0115f6e604
ui: remove strict filter 2024-11-15 14:54:59 +01:00
nick-delirium
d30522f35b
ui: fix t&w add and watch option 2024-11-15 14:53:38 +01:00
nick-delirium
08329ed3a0
ui: display invalid credentials error for integrations 2024-11-15 11:38:09 +01:00
nick-delirium
11d4b168a1
ui: remove speed index card 2024-11-15 11:29:32 +01:00
Shekar Siri
2a7cb78b8b fix(ui): multiple search calls on load 2024-11-15 11:29:02 +01:00
nick-delirium
152720eeef
ui: fix clickmap udpate behavior 2024-11-15 11:25:56 +01:00
Alexander
03c18def0a feat(http): return 401 even after successfully saved batch for JustExpired case 2024-11-15 11:21:18 +01:00
Alexander
6d5629872a feat(integrations): added extra 422 error code for createIntegration method 2024-11-15 11:15:20 +01:00
Shekar Siri
3188b0ad6f fix(ui): sync dashboards edits properly 2024-11-15 11:07:44 +01:00
nick-delirium
99a83fab5e
tracker: release assist v 2024-11-15 11:07:13 +01:00
Alexander
24e8e018e5 feat(integrations): verify a credentials after saving them to db 2024-11-15 11:06:00 +01:00
Alexander
eb7e7de463 feat(backend): fix to save the latest message tracker just after the token has been expired 2024-11-15 10:56:58 +01:00
nick-delirium
1bf697e5d9
network layer: change beacon creation, publish .4 2024-11-15 10:14:49 +01:00
Kraiem Taha Yassine
1b748293d5
Dev (#2747)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): new webVital speed index by location
2024-11-14 17:57:05 +01:00
nick-delirium
9678c86a13
tracker: skip check for tracker contexts array in restart 2024-11-14 16:35:51 +01:00
Alexander
d2a5f42e37
Dynatrace mock (#2745)
* feat(web): small changes in dynatrace + mock for testing

* feat(backend): undo dynatrace mock

* feat(backend): removed commented code from page builder

* feat(backend): added 404 for not found sql response in integrations
2024-11-14 16:06:17 +01:00
nick-delirium
c47d1063c1
ui: return speed index card... 2024-11-14 14:27:04 +01:00
Shekar Siri
3ccb1c7aa6 change(ui): update authDetails to expire after a hour 2024-11-14 14:26:44 +01:00
Kraiem Taha Yassine
db33701a18
Dev (#2744)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed multiple issues
2024-11-14 13:17:50 +01:00
Shekar Siri
c1ef27fc9b change(ui): check for mobile project and hide live sessions and skip button 2024-11-14 12:14:25 +01:00
nick-delirium
769d8851bb
network proxy: prevent referring to window object on import, fixes #2742 2024-11-14 11:18:12 +01:00
Kraiem Taha Yassine
f321ffbdda
Dev (#2743)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
2024-11-14 10:58:26 +01:00
nick-delirium
7904e74343
ui: rename example cards 2024-11-14 10:09:06 +01:00
rjshrjndrn
6f18c1a301 chore(helm): precedence to the autogenereated prev version.
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-13 17:48:30 +01:00
rjshrjndrn
4df65c70ac chore(helm): Adding opereplay config map for
Installation agnostic version access. This is useful for db migration,
especially when we install using argo, or other means

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-13 17:48:30 +01:00
Kraiem Taha Yassine
40b7aa1c78
Dev (#2740)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed exp funnels group by users
2024-11-13 17:43:13 +01:00
nick-delirium
9dbae3bc92
tracker: fix rn bridge default options 2024-11-13 16:56:10 +01:00
Kraiem Taha Yassine
1375c14337
Dev (#2739)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): added dynatrace to the list of supported integrations
2024-11-13 16:50:49 +01:00
nick-delirium
aaf7830dc4
ui: dynatrace dates to str 2024-11-13 15:50:55 +01:00
nick-delirium
d5b182227d
ui: update dynatrace log processing 2024-11-13 13:13:48 +01:00
Kraiem Taha Yassine
c88bd374e9
Dev (#2738)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): changed the list of integration providers

* refactor(chalice): enable exp funnels by default

* refactor(chalice): removed issues list of pathAnalysis card

* refactor(chalice): removed unused code
2024-11-13 12:16:00 +01:00
Shekar Siri
7c2326c7d2 fix(ui): login error handling and loader 2024-11-13 11:36:55 +01:00
Kraiem Taha Yassine
61113ddc38
Dev (#2737)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored sessions search exp
refactor(chalice): support funnels exp
2024-11-12 18:21:18 +01:00
Shekar Siri
8c5ef24bcc change(ui): improve the url params to search 2024-11-12 17:48:12 +01:00
Shekar Siri
361eb0e35b fix(ui): url search params 2024-11-12 17:48:12 +01:00
nick-delirium
61e15b62ef
tracker: porting 14.x.x patches 2024-11-12 15:14:57 +01:00
Shekar Siri
d6d6e26208 fix(ui): dashboard report date format 2024-11-12 12:13:16 +01:00
nick-delirium
39f459b852
ui: fix assist calling 2024-11-12 11:41:15 +01:00
Shekar Siri
bbf6e51231 change(ui): path analysis show sessions instead issues 2024-11-12 11:29:36 +01:00
Shekar Siri
38bed444ca fix(ui): timestamp in fetch details 2024-11-12 11:14:13 +01:00
nick-delirium
7d9bd30939
tracker: change allowstart to keep true 2024-11-12 09:49:40 +01:00
Shekar Siri
db9fe8c72a fix(ui): replace redux code 2024-11-08 16:45:58 +01:00
Shekar Siri
ae69eebb1d fix(ui): null issues 2024-11-08 16:21:15 +01:00
Shekar Siri
c07be53124 fix(ui): hide co-browsing modal on cliking a session 2024-11-08 15:18:10 +01:00
Shekar Siri
ac0ca8bb3d fix(ui): restrict co-browing reports button to ee 2024-11-08 15:13:06 +01:00
rjshrjndrn
c832457f5b chore(helm): Adding integrations jwt token
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-11-08 15:07:57 +01:00
Shekar Siri
3723afe3b2 fix(ui): metadata edit call put to post 2024-11-08 12:03:28 +01:00
Shekar Siri
16778e9bb3 change(ui): funnel label change for sessions vs users 2024-11-08 11:37:10 +01:00
Shekar Siri
c222a72a8b change(ui): funnel counts 2024-11-07 17:16:44 +01:00
Shekar Siri
5104ecd9dd fix(ui): render dashboard 2024-11-07 16:46:36 +01:00
Kraiem Taha Yassine
d11aa741e0
Dev (#2729)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): cleaned exp search sessions code

* refactor(chalice): simplified funnels
refactor(chalice): support metric-format=user_id for funnels
2024-11-07 16:03:02 +01:00
Shekar Siri
92c4c5a1e3 fix(ui): removed trailing slash for add role endpoint 2024-11-07 13:08:44 +01:00
Kraiem Taha Yassine
404b2e75a2
Dev (#2728)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed wrong attribute name for table of requests
2024-11-07 12:18:54 +01:00
Shekar Siri
1232ab5b57 fix(ui): assist credential call with authorization 2024-11-07 11:46:07 +01:00
Shekar Siri
6b7a1499af fix(ui): assist sort selection 2024-11-07 10:42:52 +01:00
Shekar Siri
d41ea47347 fix(ui): assist sort 2024-11-07 10:31:36 +01:00
Shekar Siri
7a17a08a6e fix(ui): check for null card type 2024-11-07 10:12:38 +01:00
Shekar Siri
b83d8db2a9 fix(ui): assist cred call with header 2024-11-06 18:19:37 +01:00
Shekar Siri
baebdcd8d2 fix(ui): call the health vs healthz based on tenants sate and login state 2024-11-06 17:50:55 +01:00
Kraiem Taha Yassine
c2405dfbb3
Dev (#2727)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): removed unused code
2024-11-06 17:24:03 +01:00
Kraiem Taha Yassine
d1de937ed2
Dev (#2726)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): removed unused code&endpoints

* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* refactor(chalice): support userState filter for assist

* refactor(chalice): removed unused code
2024-11-06 16:36:53 +01:00
Shekar Siri
06667df5cd fix(ui): reset password handle error and display 2024-11-06 16:30:29 +01:00
Shekar Siri
d47491f989 fix(ui): health call after login/signup 2024-11-06 15:10:08 +01:00
Shekar Siri
ce7dd32a41 fix(ui): assist search 2024-11-06 12:58:21 +01:00
Shekar Siri
a6395684a8 fix(ui): saved search 2024-11-06 12:44:02 +01:00
Kraiem Taha Yassine
32813bea1b
Dev (#2724)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed path-analysis issues list
fix(chalice): fixed funnel empty sessions
refactor(DB): EE changes
2024-11-05 15:10:41 +01:00
Kraiem Taha Yassine
d2697061e9
Dev (#2722)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): changed dashboard&metrics constraints

* refactor(chalice): removed cards
refactor(chalice): removed code related to resources
refactor(DB): removed cards
refactor(DB): removed code related to resources
2024-11-04 17:57:14 +01:00
Shekar Siri
8deb37e8b0 change(ui): removed tracker docs promise 2024-11-04 13:56:52 +01:00
Shekar Siri
369adfc3f5 feat(ui): new timeseries cards in monitor tab with sessionsCount 2024-11-04 13:48:25 +01:00
Mehdi Osman
a9acf01f61
v1.21 2024-10-31 14:02:31 -04:00
nick-delirium
778e24b578
ui: change url order 2024-10-31 18:35:26 +01:00
nick-delirium
09c3a217cb
ui: session specific clickmap, return method 2024-10-31 18:33:13 +01:00
Shekar Siri
f1e5c858f1 fix(ui): optional subfilter check 2024-10-31 17:53:34 +01:00
nick-delirium
c15c003289
tracker: carry old startopts to ensure consistent restart behavior 2024-10-31 17:45:59 +01:00
Shekar Siri
d275ab5344 fix(ui): auto complete mapping 2024-10-31 17:31:17 +01:00
nick-delirium
b2068ee9d9
ui: change project edit 2024-10-31 17:19:52 +01:00
Shekar Siri
7f28f87f5c fix(ui): sort active item 2024-10-31 17:04:21 +01:00
nick-delirium
2c7fc9b88e
ui: rm random log 2024-10-31 17:00:41 +01:00
Shekar Siri
4192203071 fix(ui): sessions by cards issue with filter type and other props 2024-10-31 16:51:39 +01:00
nick-delirium
4b2db13449
tracker: missed code line from 14.x.x 2024-10-31 16:30:28 +01:00
Kraiem Taha Yassine
eaf762e1bd
Dev (#2719)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): added web_vitals to pages table

* refactor(DB): added session_integrations table
2024-10-31 16:23:52 +01:00
nick-delirium
5b5a3033d0
ui: remove more cards 2024-10-31 16:08:02 +01:00
nick-delirium
c184ab55dc
ui: remove more cards 2024-10-31 16:05:44 +01:00
Shekar Siri
ff2cd695ba fix(ui): reload on sort change 2024-10-31 15:54:15 +01:00
nick-delirium
187e24ee19
ui: fix class overlap for tenant key input 2024-10-31 15:47:57 +01:00
Alexander
30a69893bb
New backend logs integrations (#2717)
* feat(integrations): new version of backend integrations

* feat(integrations): added ingress rule

* feat(integrations): fixed a port number

* feat(integrations): enabled ingress in values.yaml

* feat(integrations): added startup log

* feat(integrations): added extra logger for 3 of 4 backend logs integrations.

* feat(integrations): removed a logs loop call

* feat(integrations): fixed a table name

* feat(integrations): disabled extra logger

* feat(integrations): made extra logger as an option

* feat(integrations): changed contentType for logs file

* feat(integrations): bug fix

* feat(integrations): struct/string config support for datadog provider

* feat(integrations): map config support for datadog provider

* feat(integrations): removed unnecessary transformation

* feat(integrations): fixed datadog and sentry response format

* feat(integrations): added correct creds parser for sentry provider

* feat(integrations): removed unnecessary return statement

* feat(integrations): added correct creds parser for elastic search

* feat(integrations): changed elastic to elasticsearch

* feat(integrations): added correct creds parser for dynatrace

* feat(integrations): fixed an issue in query request for elasticsearch provider

* feat(integrations): made extra logger configurable by env var

* feat(integrations): removed debug logs
2024-10-31 15:28:38 +01:00
Rajesh Rajendran
c0910b015a
Fix ci varibles and trivy failover voln db (#2718)
* ci(actios): Adding more secrets
* ci(actions): Update trivy version
* fix(ci): local variable
* ci(fix): variable substitution
* feat(docker): use insanely fast uv for pip
* chore(ci): Adding failover trivy db
* chore(requirements): Making the requirements file compatible with uv
---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-10-31 15:02:21 +01:00
nick-delirium
e809d087cb
ui: fix project editing 2024-10-31 14:34:55 +01:00
nick-delirium
b9bf65d67b
ui: fix session fetch on saved search apply 2024-10-31 14:08:38 +01:00
nick-delirium
c239d8d080
ui: fix css resolver semi insert 2024-10-31 12:31:09 +01:00
nick-delirium
568c1f211e
ui: fix css resolver semi insert 2024-10-31 12:26:20 +01:00
Shekar Siri
bf818d2683 fix(ui): sessions search tabs 2024-10-31 11:58:25 +01:00
Shekar Siri
b6fa43a2be fix(ui): hide once the password updated 2024-10-31 11:09:52 +01:00
nick-delirium
8e1ac0f95c
ui: fix team badge in saved, fix calendar weekend highlight 2024-10-31 10:43:56 +01:00
rjshrjndrn
b74650fcce chore(helm): Adding clickhouse check
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-10-30 19:36:32 +01:00
rjshrjndrn
fec728d450 feat(helm): Mandating postgres version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-10-30 19:36:32 +01:00
rjshrjndrn
c90236e598 chore(helm): Update db images.
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-10-30 19:36:32 +01:00
nick-delirium
d22795b14e
ui: rm cross validation for meta (only exists on backend) 2024-10-30 18:07:05 +01:00
Kraiem Taha Yassine
677971f415 fix(chalice): fixed SSO (#2715)
(cherry picked from commit 9ce67efb26)
2024-10-30 17:46:42 +01:00
Shekar Siri
a7c884cd45 fix(ui): check platform related filters mobile/web 2024-10-30 17:05:54 +01:00
Kraiem Taha Yassine
bffcec11fd
Dev (#2714)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): cleaned metrics
2024-10-30 16:30:33 +01:00
Alexander
73a95503c0 feat(backend): removed a placeholder for app crash events in PG 2024-10-30 16:00:44 +01:00
Alexander
9bf79f78f6 feat(backend): added latest fixes for CH connector 2024-10-30 15:54:53 +01:00
nick-delirium
20397488a1
ui: rm alert metrics 2024-10-30 15:33:35 +01:00
Delirium
fdefe31cf3
global string dictionary support (#2652)
* making new msg type, support on frontend and tracker

* finish adding support for new dictionary for ui

* update branch
2024-10-30 15:31:26 +01:00
nick-delirium
6b9bbf570a
ui: tests for url parser 2024-10-30 15:10:54 +01:00
nick-delirium
b928ddb53c
ui: rewrite css parser -> urlResolve.ts 2024-10-30 15:04:40 +01:00
nick-delirium
c36946ee9e
ui: fix version comparison 2024-10-30 14:30:41 +01:00
nick-delirium
2167d0c172
ui: fix version comparison 2024-10-30 14:28:02 +01:00
nick-delirium
9f8bf12768
ui: fix default tz 2024-10-30 14:24:42 +01:00
Alexander
a17796e811 feat(backend): removed insert operations for session's resources 2024-10-30 13:46:13 +01:00
rjshrjndrn
6834eb8d8d build(release): change version 2024-10-30 13:25:45 +01:00
nick-delirium
3dfa806348
ui: clean up sessionsort 2024-10-30 13:19:13 +01:00
nick-delirium
5312d27693
ui: fix bookmark refresh, fix userState used param for update 2024-10-30 13:16:34 +01:00
Shekar Siri
63d1b8ab49 fix(ui): checking for tenants state 2024-10-30 13:06:58 +01:00
nick-delirium
6479292158
ui: remove web_vitals, performance_monitoring cards 2024-10-30 13:03:24 +01:00
nick-delirium
60f29eea6a
ui: fix live session pagination 2024-10-30 11:43:50 +01:00
nick-delirium
131f5663fa
ui: fix integration fetch, side menu align 2024-10-30 11:39:34 +01:00
Shekar Siri
4762f37414 fix(ui): missing userDeviceMemorySize in plyer performance tab 2024-10-30 11:29:38 +01:00
nick-delirium
b6bebf3b78
ui: fix api key input widths 2024-10-30 11:27:11 +01:00
Kraiem Taha Yassine
d8642808d7
Dev (#2712)
* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(DB): v1.21.0 DB changes
2024-10-30 11:13:59 +01:00
nick-delirium
5cbb89d949
ui: remove log 2024-10-30 10:08:34 +01:00
nick-delirium
c0077b7fa7
ui: fix metadata in filters 2024-10-30 10:08:18 +01:00
Kraiem Taha Yassine
38bae5d2c9 fix(chalice): fixed heatmap empty value (#2710)
(cherry picked from commit 8a99bcf7c8)
2024-10-29 17:33:00 +01:00
nick-delirium
82bc6e62fc
ui: improve integration fetching behavior 2024-10-29 17:25:04 +01:00
nick-delirium
2c7cb25357
ui: change row bg color 2024-10-29 17:18:33 +01:00
nick-delirium
086ade9595
ui: hide log jump if no ts 2024-10-29 17:16:38 +01:00
nick-delirium
fc63e4d83d
ui: add jump and sync for backend logs 2024-10-29 17:15:01 +01:00
Kraiem Taha Yassine
36edfd8413 Patch/api v1.20.0 (#2708)
* fix(chalice): heatmap support operators

* fix(chalice): heatmap click-rage

(cherry picked from commit 16656d5618)
2024-10-29 17:09:46 +01:00
Kraiem Taha Yassine
079a5fda6d fix(chalice): heatmap support operators (#2706)
(cherry picked from commit ca4c568883)
2024-10-29 16:06:05 +01:00
Taha Yassine Kraiem
411dfa0965 fix(chalice): heatmap support operators 2024-10-29 15:21:24 +01:00
Delirium
c144add4bd
Backend logs UI (#2635)
* backend integrations ui start

* some more ui things

* moving around some integration code

* add dynatrace

* add datadog, useform hook and other things to update backend logging integration forms

* change api queries

* backend logging modals

* tracker: fix some types

* remove deprecated integrations, update types

* some ui fixes and improvements

* update notifications on success/error

* ui: debugging log output, autoclose fix

* ui: some stuff for logs base64str

* ui: improve log formatting,  change datadog data format

* some improvs for logging irm

* ui: fixup for sentry
2024-10-29 15:15:28 +01:00
Kraiem Taha Yassine
1d96ec02fc fix(chalice): heatmap support operators (#2702)
(cherry picked from commit 5f144636e6)
2024-10-29 14:42:00 +01:00
nick-delirium
1abd925c56
ui: add operator to clickmap card 2024-10-29 11:31:05 +01:00
Kraiem Taha Yassine
8d26f77590 fix(chalice): heatmap handles null replay (#2695)
refactor(chalice): heatmap use path only

(cherry picked from commit 9eeaeaf4eb)
2024-10-28 16:52:21 +01:00
rjshrjndrn
7c6409ee74 fix(cli): cleanup
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-10-28 14:25:44 +01:00
nick-delirium
9a5716fdcb
ui: fix projectid passed to assist 2024-10-28 14:16:26 +01:00
rjshrjndrn
f597750cf7 fix(cli): cleanup resolve anchors
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-10-28 14:09:43 +01:00
Kraiem Taha Yassine
fa634b84e9 fix(chalice): heatmap handles empty/null url (#2691)
(cherry picked from commit e2556ea76e)
2024-10-28 12:18:59 +01:00
Kraiem Taha Yassine
796018eb57 fix(chalice): fixed permissions for EE SA (#2685)
(cherry picked from commit 6802ddcd93)
2024-10-25 16:46:24 +02:00
nick-delirium
c2fc5016e6
tracker: better restart logging 2024-10-25 15:54:10 +02:00
nick-delirium
a19c3ad0c3
spot: fixing audio source select 2024-10-25 15:35:30 +02:00
nick-delirium
7416005370
spot: fixing audio capture 2024-10-25 15:20:18 +02:00
nick-delirium
d733ab9b4f
ui: fix heatmap insights size check 2024-10-25 14:17:13 +02:00
nick-delirium
ffc63f0eb0
ui: wrap event fetching with try catch 2024-10-25 11:42:07 +02:00
nick-delirium
6628c204b5
ui: autodetect us datetime format for search 2024-10-25 11:05:29 +02:00
nick-delirium
7a6e11e936
fix heatmap url param 2024-10-25 10:14:31 +02:00
Taha Yassine Kraiem
83f694b580 refactor(chalice): changed heatmpas 2024-10-24 19:06:54 +02:00
Taha Yassine Kraiem
68248ce20d refactor(chalice): changed heatmpas 2024-10-24 18:53:05 +02:00
Kraiem Taha Yassine
b947fafebf fix(chalice): fixed tenant_key for SSO (#2673)
(cherry picked from commit ccc407137c)
2024-10-24 18:52:58 +02:00
nick-delirium
7f1686acdf
ui: support url in payload for heatmaps 2024-10-24 15:24:13 +02:00
nick-delirium
d7f4406fd5
ui: reformat player code style 2024-10-24 12:11:48 +02:00
nick-delirium
23c5eaebb7
ui: remove resources cards from dashboard 2024-10-24 12:10:27 +02:00
nick-delirium
c53604e216
ui fix file preload, fix create metadata method 2024-10-23 18:03:45 +02:00
nick-delirium
6240a8636b
tracker rm random log 2024-10-23 17:29:54 +02:00
nick-delirium
24072a867a
ui: prevent mouse events over heatmap card (when no clicks data returned...) 2024-10-23 15:30:43 +02:00
nick-delirium
1dbdafe64f
ui: update workflows 2024-10-22 12:00:44 +02:00
nick-delirium
24c82a30f7
ui: update node v to 20.18.0 2024-10-22 11:47:44 +02:00
dependabot[bot]
914154404a
chore(deps): bump the npm_and_yarn group across 4 directories with 3 updates (#2662)
Bumps the npm_and_yarn group with 3 updates in the /assist directory: [cookie](https://github.com/jshttp/cookie), [express](https://github.com/expressjs/express) and [socket.io](https://github.com/socketio/socket.io).
Bumps the npm_and_yarn group with 3 updates in the /ee/assist directory: [cookie](https://github.com/jshttp/cookie), [express](https://github.com/expressjs/express) and [socket.io](https://github.com/socketio/socket.io).
Bumps the npm_and_yarn group with 2 updates in the /peers directory: [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express).
Bumps the npm_and_yarn group with 2 updates in the /sourcemapreader directory: [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express).


Updates `cookie` from 0.4.2 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

Updates `socket.io` from 4.7.5 to 4.8.0
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io@4.7.5...socket.io@4.8.0)

Updates `cookie` from 0.4.2 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

Updates `socket.io` from 4.7.5 to 4.8.0
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io@4.7.5...socket.io@4.8.0)

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: socket.io
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: socket.io
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-22 10:23:43 +02:00
nick-delirium
45d6aeb6c3
tracker: testing tracker constructor options mapper 2024-10-21 17:41:39 +02:00
nick-delirium
41dce26281
ui: check for chromium browsers in spot cta 2024-10-21 16:58:37 +02:00
nick-delirium
f789d77806
ui: fix cursor position 2024-10-21 16:24:50 +02:00
nick-delirium
e7afd66820
tracker: fix maintainer doc node stability and build process 2024-10-21 16:03:04 +02:00
Shekar Siri
70deccdcfc change(ui): collpase sidemnu based on screensize 2024-10-21 12:52:06 +02:00
nick-delirium
c847147f87
tracker: rm unused files 2024-10-18 13:24:53 +02:00
nick-delirium
0002950e3c
tracker: port 14.0.10 changes to 15.0.0 timeline
tracker 14.0.10, fixes memory leaks, iframe tracking stability, etc

change map/set to weakmap/set where possible, check canvas observers on time intervals and destroy peers; run node list maintainer every 30 sec (50ms ticks)

tracker: better crossdomain check; angularMode -> forceNgOff toggle

potential performance fixes for 14.x.x iframe tracking
2024-10-18 13:17:01 +02:00
nick-delirium
62600fdf6a
ui: fix tooltip position for xray elements... 2024-10-16 13:03:29 +02:00
Delirium
525fc39cbf
ui: show tracker version incompat warning
* tracker version warn

* ui: show tracker version incompat warning
2024-10-16 12:40:06 +02:00
nick-delirium
1efe57797c
tracker: better documentation for sanitizer properties 2024-10-16 11:30:17 +02:00
Delirium
4a97094c0e
ui: group xray events together (#2654) 2024-10-16 10:18:16 +02:00
Shekar Siri
d0df66b539 fix(ui): show error from the api on failing to save integration 2024-10-14 15:08:24 +02:00
Shekar Siri
89afab8a22 change(ui): funnel issues table show context column 2024-10-14 13:18:32 +02:00
nick-delirium
8024083c64
ui fix outdated libraries, remove storybook (unused), fix player re-renders on mount 2024-10-14 12:48:08 +02:00
nick-delirium
59d6ef6bd0
ui fix loader for css files 2024-10-14 10:28:56 +02:00
nick-delirium
c8690afbba
tracker install state 2024-10-14 09:54:09 +02:00
nick-delirium
4ea1321d17
issue with eventlistener fixed 2024-10-14 09:53:50 +02:00
Shekar Siri
6b84ba2500 fix(ui): show last played session 2024-10-11 16:42:16 +02:00
Shekar Siri
2e4e428f57 change(ui): tap rage icon in session tags 2024-10-11 16:34:00 +02:00
Shekar Siri
beb3eeac0c fix(ui): sessions list sidemenu fix, reload properly, sessions tags filter issue 2024-10-11 16:06:21 +02:00
nick-delirium
44d0bb1369
spot: remove debug logs, 1.0.10 2024-10-11 11:23:49 +02:00
Shekar Siri
15da91385d fix(ui): graph period 2024-10-11 10:35:51 +02:00
nick-delirium
87d45714b1
port tracker-14 fixes to latest 2024-10-10 13:47:46 +02:00
Shekar Siri
d26e6ec098 change(ui): funnel widget options, and funnel drop message 2024-10-10 11:49:44 +02:00
Shekar Siri
790a436e70 fix(ui): project dropdown text alignment and proper click handler 2024-10-09 11:31:01 +02:00
Shekar Siri
b10fdfc9c9 change(ui): paginate the data in table of cards show more modal 2024-10-08 18:24:02 +02:00
Shekar Siri
0fc0371758 change(ui): updated antd and tailwindcss 2024-10-08 18:24:02 +02:00
nick-delirium
fca752526d
spot: fixing inconsistent recording 2024-10-08 17:48:50 +02:00
Shekar Siri
4cfc5d2517 change(ui): paginate the data in table of cards show more modal 2024-10-08 17:19:08 +02:00
Kraiem Taha Yassine
18bb6e0263 fix(chalice): use existing user attributes for SSO if they are missing in the list of claims (#2641)
(cherry picked from commit f8d8cc5150)
2024-10-08 15:32:09 +02:00
nick-delirium
5c39f96f34
tracker: post v14 changes 2024-10-08 14:37:44 +02:00
nick-delirium
56c6ec66f1
don't start worker in iframe ctx 2024-10-08 14:30:09 +02:00
nick-delirium
719a102996
tracker fix crossdomain tracking issues (timestamps, duping, restarts); 14.0.10 beta 2024-10-08 14:30:04 +02:00
nick-delirium
b12c71f277
fixes for bad start, iframes; 14.0.9 2024-10-08 14:29:34 +02:00
nick-delirium
97d669ebf1
fixing iframe issues... 2024-10-08 14:29:04 +02:00
nick-delirium
597cbfa03a
ui: remove debug code 2024-10-08 11:36:17 +02:00
Shekar Siri
dc8e64bcb1 fix(ui): filter format while checking for latest sessions 2024-10-08 11:35:59 +02:00
nick-delirium
d1e4a80819
ui: prevent event duplications for player; prevent click on play marker 2024-10-08 11:10:13 +02:00
Shekar Siri
ca4abdcadc fix(ui): sessions by cards truncate the text 2024-10-07 18:16:09 +02:00
nick-delirium
d94e2f0250
ui: rm accidental console log 2024-10-07 18:03:28 +02:00
Shekar Siri
6689b89d0c fix(ui): propery update the events, and add new filters 2024-10-07 17:08:11 +02:00
nick-delirium
4d0730f394
ui: fix audioplayer time comp 2024-10-07 16:41:23 +02:00
nick-delirium
e189ff8b09
fix logout method 2024-10-07 15:31:19 +02:00
nick-delirium
6c71d8adf8
fix auto testing workflow 2024-10-07 12:17:02 +02:00
nick-delirium
9203951ec8
fix assist list update btn 2024-10-04 17:54:03 +02:00
nick-delirium
506a944403
UI fix some crashes in replay 2024-10-04 11:44:42 +02:00
nick-delirium
17057fb6a1
ui resource type fix 2024-10-04 09:37:08 +02:00
Chris Weaver
a70bb24a42 fix #2360 Check ping or Wget to confirm Github is up in job.yaml (#2631) 2024-10-03 16:42:31 +02:00
Delirium
a71381da40
getting rid of redux for good (#2556)
* start moving ui to redux tlk

* remove unused reducer

* changes for gdpr and site types

* ui: migrating duck/roles to mobx

* ui: drop unreferenced types

* ui: drop unreferenced types

* ui: move player slice reducer to mobx family

* ui: move assignments to issueReportingStore.ts

* remove issues store

* some fixes after issues store

* remove errors reducer, drop old components

* finish removing errors reducer

* start moving integrations state to mobx

* change(ui): funnel duck cleanup

* change(ui): custom fields

* change(ui): customMetrics cleanup

* change(ui): customMetrics cleanup

* change(ui): duck/filters minor cleanup

* change(ui): duck/filters cleanup

* change(ui): duck/customMetrics cleanup and upgrades

* fix integrations service, fix babel config to >.25 + not ie

* refactoring integrations reducers etc WIP

* finish removing integrations state

* some fixes for integrated check

* start of projects refactoring

* move api and "few" files to new project store

* new batch for site -> projects

* fix setid context

* move all critical components, drop site duck

* remove all duck/site refs, remove old components

* fixup for SessionTags.tsx, remove duck/sources (?)

* move session store

* init sessionstore outside of context

* fix userfilter

* replace simple actions for session store

* sessions sotre

* Rtm temp (#2597)

* change(ui): duck/search wip

* change(ui): duck/search wip

* change(ui): duck/search wip

* change(ui): duck/searchLive wip

* change(ui): duck/searchLive wip

* change(ui): duck/searchLive wip

* change(ui): duck/searchLive wip

* change(ui): search states

* change(ui): search states

* change(ui): search states

* change(ui): fix savedSearch store

* change(ui): fix savedSearch store

* some fixes for session connector

* change(ui): fix savedSearch store

* change(ui): fix searchLive

* change(ui): fix searchLive

* fixes for session replay

* change(ui): bookmark fetch

* last components for sessions

* add fetchautoplaylist

* finish session reducer, remove deleted reducers

* change(ui): fix the search fetch

* change(ui): fix the search fetch

* fix integrations call ctx

* ensure ctx for sessionstore

* fix(ui): checking for latest sessions path

* start removing user reducer

* removing user reducer pt2...

* finish user store

* remove rand log

* fix crashes

* tinkering workflow file for tracker test

* making sure prefetched sessions work properly

* fix conflict

* fix router redirects during loading

---------

Co-authored-by: Shekar Siri <sshekarsiri@gmail.com>
2024-10-03 11:38:36 +02:00
nick-delirium
70a337f766
fixes for bad start, iframes; 14.0.9 2024-10-02 15:51:59 +02:00
nick-delirium
1cf1137c7d
fixing iframe issues... 2024-10-02 15:51:28 +02:00
Delirium
97a08853e8
Webvitals for replays (#2627)
* adding new web vitals track

* adding new web vitals track

* update vitals message

* feat(heuristics): added web vitals support to the page event builder

* update mtype

* feat(heuristics): applied a new value type

* feat(heuristics): fixed if err case

* feat(heuristics): fixed the sql issue

* new event display

* tracker v 15.0.0 start

---------

Co-authored-by: Alexander <zavorotynskiy@pm.me>
2024-09-30 16:08:42 +02:00
Kraiem Taha Yassine
702bad06b9
Dev (#2626)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
2024-09-30 14:11:02 +02:00
nick-delirium
cac0f3edc0
network proxy: add vitest coverage 2024-09-30 12:52:11 +02:00
nick-delirium
4996210959
network proxy: move tests from tracker 2024-09-30 12:50:28 +02:00
nick-delirium
ba1fba3a85
tracker: safety checks for message listeners, release 14.0.8 2024-09-30 12:31:23 +02:00
nick-delirium
bc92568138
spot permissions 2024-09-30 10:58:10 +02:00
Delirium
e66423dcf4
Spot network refactoring (#2617)
* start refactoring network

* separate network module, refactor spot network capture

Signed-off-by: nick-delirium <nikita@openreplay.com>

* some console refactoring, display network results in ui

* detect gql error param

* fix proxy ignore file, fix network tracking, fix tab tracking

* some code quality improvements...

* handle graphql in network lib (.2 ver), update tracker to use last version of lib

* remove debug logs, change request type to gql (if its gql!) in lib, display gql in ui

---------

Signed-off-by: nick-delirium <nikita@openreplay.com>
2024-09-30 09:47:27 +02:00
Kraiem Taha Yassine
264abc986f Patch/api v1.20.0 (#2618)
* chore(actions): show patch diff

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(chalice): fixed session's search ignore injected durations

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
Co-authored-by: rjshrjndrn <rjshrjndrn@gmail.com>
(cherry picked from commit e9a9d2ff2a)
2024-09-27 15:13:07 +02:00
thomasmison
b06d56cfa7
Fix (spot): tailwind behavior conflict with flex class (#2616)
* Scope CSS styles for notification elements.

* Remove unnecessary spaces in HTML tags
2024-09-27 13:54:33 +02:00
nick-delirium
bd7ecf18f4
tracker: add restart on token expiration for canvas tracker 2024-09-26 14:29:31 +02:00
rjshrjndrn
62d3636136 chore(actions): git clone should be from the specific tag for submodule
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-26 10:23:33 +02:00
Kraiem Taha Yassine
b91762cb09 Patch/api v1.20.0 (#2610)
* fix(chalice): remove null referrer from table of referrers

* fix(chalice): fixed add MSTeams integration with wrong URL

* fix(chalice): session's search ignore injected durations

(cherry picked from commit 62ef3ca2dd)
2024-09-25 17:31:12 +02:00
nick-delirium
246d186816
ui: assist console size and init fixes 2024-09-25 16:07:15 +02:00
nick-delirium
e5fd1b235e
ui: redesigned ws panel 2024-09-25 15:06:11 +02:00
nick-delirium
71caeb8ac0
ui: support payload for events search 2024-09-25 13:23:47 +02:00
rjshrjndrn
3393c045f6 chore(build): Support for multi arch
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-24 16:47:18 +02:00
nick-delirium
5d05a9d102
ui: fix audioplayer file length calculation and checks 2024-09-24 12:11:15 +02:00
nick-delirium
9e0b292ddb
ui: remove select-none from console rows 2024-09-24 11:33:32 +02:00
nick-delirium
56ca2842f7
ui: debugging audio pt2 2024-09-23 17:17:35 +02:00
nick-delirium
9ab89d81f2
ui: debugging audio 2024-09-23 16:57:36 +02:00
nick-delirium
d3f3b613ab
spot: add acc key 2024-09-20 17:51:52 +02:00
estradino
cff1e4801b Updated sanitizer dictionary 2024-09-20 11:49:28 -04:00
nick-delirium
9a9f850697
spot: sanitize url query params 2024-09-20 17:42:27 +02:00
rjshrjndrn
0f65ff856a chore(helm): check github availability before clone
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-20 14:18:29 +02:00
nick-delirium
a2a1459e8f
spot refactor network parsing? 2024-09-20 11:27:13 +02:00
nick-delirium
521b04bf14
fix ui: prevent audioplayer from looping after playing once unless scrolled backwards 2024-09-20 10:58:34 +02:00
nick-delirium
32001b1c8b
spot body sanitizer 2024-09-20 10:44:18 +02:00
estradino
37701af9d4 Update options text 2024-09-18 15:25:52 -04:00
nick-delirium
61b664bf52
spot fix: login check on reopen, give small timeout to tab opening 2024-09-18 17:45:52 +02:00
nick-delirium
715edd2b9c
fix spot network export 2024-09-18 09:31:48 +02:00
Kraiem Taha Yassine
aa0f62af85 fix(chalice): fixed spot refresh logic for EE (#2595)
(cherry picked from commit 018bf9c0be)
2024-09-17 19:04:29 +01:00
nick-delirium
2e536a2232
some spot refactoring 2024-09-17 18:09:15 +02:00
Kraiem Taha Yassine
4b3563cacd fix(chalice): fixed issues-tracking error handler (#2593)
(cherry picked from commit 5d786bde56)
2024-09-17 11:45:59 +01:00
nick-delirium
67eb4a6bca
spot changes 2024-09-17 09:39:59 +02:00
estradino
0029558c1f Changed onboarding message 2024-09-16 19:19:56 -04:00
estradino
932d9fb0d3 Changed text 2024-09-16 19:16:37 -04:00
Kraiem Taha Yassine
c7f91767f9 fix(alerts): fixed missing dependency for EE (#2590)
fix(crons): fixed missing dependency for EE

(cherry picked from commit ad0ef00842)
2024-09-16 15:24:57 +01:00
Kraiem Taha Yassine
5333862b94 fix(chalice): fixed wrong default logging level (#2589)
(cherry picked from commit 2ffec26d02)
2024-09-16 15:13:14 +01:00
nick-delirium
7f17b0f328
fix ui: revert spots check 2024-09-16 15:46:06 +02:00
Kraiem Taha Yassine
3591dc4de4 Patch/api v1.20.0 (#2585)
* fix(chalice): fixed top fetchUrl values for EE-exp
* fix(alerts): fixed missing logger
* fix(chalice): JIRA integration support expired credentials

(cherry picked from commit 7906384fe7)
2024-09-16 12:46:50 +01:00
nick-delirium
8c32beae83
ui: spot signup fixes 2024-09-13 18:11:07 +02:00
nick-delirium
f1f4c92ca5
ui: bump spot v 2024-09-13 18:11:06 +02:00
nick-delirium
69b3f7cdf4
ui: fix spot list header behavior, change spot login flow? 2024-09-13 18:11:06 +02:00
nick-delirium
bc46a6910f
ui: force worker for hls 2024-09-13 18:11:06 +02:00
nick-delirium
62c0d07fe0
ui: use enum state for spot ready checker 2024-09-13 18:10:19 +02:00
Shekar Siri
ea61f09f09
change(ui): network request show full url (#2575) 2024-09-13 21:00:08 +05:30
Alexander
6541965dd1
feat(spot): fixed search filters issue (#2574) 2024-09-13 17:29:25 +02:00
Mehdi Osman
9db323a6bb
Increment frontend chart version (#2573)
Co-authored-by: GitHub Action <action@github.com>
2024-09-13 14:40:45 +02:00
Delirium
e196643c8f
UI patch 4 (#2572)
* ui: spot related fixes

* ui: remove random logs

* ui: fix insights mapping

* ui: hide doc link for spot stuff

* ui: force worker for hls
2024-09-13 14:37:20 +02:00
Mehdi Osman
5e1d895ce6
Increment alerts chart version (#2571)
Co-authored-by: GitHub Action <action@github.com>
2024-09-12 23:00:41 +05:30
rjshrjndrn
347da4fb33 fix(action): custom build script names
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-12 22:52:00 +05:30
rjshrjndrn
0652462dc7 fix(action): alerts
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-12 22:43:25 +05:30
Alexander
e95b18d00c feat(node): upgraded npm packages in ee 2024-09-12 22:18:07 +05:30
Alexander
dbba413833 feat(node): upgraded npm packages 2024-09-12 22:18:07 +05:30
Alexander
2b4990da5a feat(backend): use go 1.23 in Docker image 2024-09-12 22:18:07 +05:30
Alexander
4a9a42bb8c feat(backend): use go 1.23.1 2024-09-12 22:18:07 +05:30
Mehdi Osman
b7698be2ae
Increment frontend chart version (#2570)
Co-authored-by: GitHub Action <action@github.com>
2024-09-12 18:11:15 +02:00
Delirium
a85d519669
UI patch 3 (#2569)
* ui: use enum state for spot ready checker

* ui: fix jump for gql
2024-09-12 18:08:02 +02:00
rjshrjndrn
453892588f chore(helm): Configure spots bucket name
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-12 21:03:56 +05:30
Mehdi Osman
38c2757d4a
Increment frontend chart version (#2568)
Co-authored-by: GitHub Action <action@github.com>
2024-09-12 15:59:13 +02:00
Delirium
9030806146
ui: drop deprecated TimeTable.tsx, point gql to correct one (#2567) 2024-09-12 15:54:49 +02:00
Shekar Siri
8e81bdea7e
fix(alerts): added mising requierements (#2566) 2024-09-12 18:59:00 +05:30
Mehdi Osman
d1dd18d1aa
Increment frontend chart version (#2565)
Co-authored-by: GitHub Action <action@github.com>
2024-09-12 14:12:16 +02:00
Delirium
34a5ab4c0c
UI patch 1 (#2564)
* ui: move around login handler; exlcude all /login subpaths from destinationPath handler; remove unused redirect

* spot v bump

* spot + ui: some postrelease fixes
2024-09-12 14:05:22 +02:00
rjshrjndrn
0fa46bdb3c chore(helm): Urge users to upgrade to latest pg, even if 15 is supported
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-12 04:14:47 +02:00
estradino
98323e2634 Text changes 2024-09-11 17:24:50 -04:00
estradino
a0daa3ae36 Text fixes 2024-09-11 17:04:59 -04:00
nick-delirium
d8b9872504
spot: spot jwt on signup 2024-09-11 18:45:59 +02:00
nick-delirium
d8b3ea3902
spot: login state check 2024-09-11 18:43:07 +02:00
Kraiem Taha Yassine
2253ac394d
Dev (#2562)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed table of fetch-users for EE

* fix(chalice): foss vs saas response discrepancy for table of referrers

* fix(DB): fixed scope_state delta
2024-09-11 18:12:41 +02:00
nick-delirium
7829a2e2f2
spot: docs 2024-09-11 17:13:21 +02:00
nick-delirium
b0a1ca1d75
spot: fix autoplay check 2024-09-11 17:10:26 +02:00
Mehdi Osman
5f899a5ee4
Added spot 2024-09-11 09:56:21 -04:00
nick-delirium
bfe29fa606
spot: fix signup link 2024-09-11 15:03:01 +02:00
rjshrjndrn
20c1578a76 chore(helm): proper error message
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-11 14:09:01 +02:00
nick-delirium
1bc840cb89
ui: fix stream playback on safari 2024-09-11 12:23:30 +02:00
nick-delirium
e71606b990
ui: move spot cta up 2024-09-11 11:35:55 +02:00
nick-delirium
617dbe4e5e
ui: spot improvs 2024-09-11 11:28:23 +02:00
nick-delirium
acb679cf18
ui: spot improvs 2024-09-11 11:12:47 +02:00
nick-delirium
420071c436
ui: spot improvs 2024-09-11 10:49:12 +02:00
Sudheer Salavadi
42b6ae0dfe
Spot List & CTA Improvements (#2561)
* Spot List & CTA Improvements

* rm yarnlock

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>
2024-09-11 10:18:31 +02:00
Alexander
99af6ce45f feat(spot): added tenant select for public key check in ee version 2024-09-11 09:57:31 +02:00
Alexander
8757178617 feat(spot): skip all middleware handlers for health check 2024-09-11 09:43:27 +02:00
Alexander
47c33655de feat(spot): added spot jwt support to authorizer in ee version 2024-09-11 09:26:50 +02:00
Alexander
de691e0f8d feat(spot): added correct methods filter for api tracer 2024-09-11 09:18:58 +02:00
Alexander
1a44c0c9c3 fix(spot): don't miss 'processed' status after trimming without transcoding 2024-09-11 09:10:31 +02:00
nick-delirium
8e0f0d389d
spot: some comments 2024-09-10 17:00:29 +02:00
nick-delirium
fc01e47e28
spot: change rounding in trim 2024-09-10 16:50:26 +02:00
nick-delirium
d3b6511e55
spot: update version, unload offscreen when background is reloaded 2024-09-10 16:21:07 +02:00
Shekar Siri
a89eeca148 change(ui): casing for fetch, url and referrer cards 2024-09-10 18:18:13 +05:30
Shekar Siri
1fd0de1159 change(ui): card filter series defualt behaviour 2024-09-10 18:01:43 +05:30
Shekar Siri
3f6c1dad6f change(ui): icon changes for table of caeds (url, fetch, referrer) 2024-09-10 15:51:04 +05:30
nick-delirium
4a019e9821
ui: migrate luxon from 1.28.0 -> 3.5.0 2024-09-10 11:25:16 +02:00
Shekar Siri
8c82e98d48 change(ui): user vs session dropdown borderless 2024-09-10 14:48:18 +05:30
nick-delirium
74b8f1d731
ui: fix default timezone conversion via luxon global settings 2024-09-10 11:12:12 +02:00
nick-delirium
d65ecacb18
ui: remove spot=true param 2024-09-10 09:53:20 +02:00
Kraiem Taha Yassine
ba7558c72c
Dev (#2558)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed user invitation for EE
2024-09-09 19:26:59 +02:00
Kraiem Taha Yassine
042eecefb9
Dev (#2557)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed user invitation for EE
2024-09-09 19:05:55 +02:00
nick-delirium
be470452a5
ui: fix css for datepicker 2024-09-09 17:54:18 +02:00
nick-delirium
7f46f3cec2
ui: fix curr tz on negative offsets 2024-09-09 17:15:51 +02:00
nick-delirium
8e936d1657
ui: remove testing key flag for ai cards 2024-09-09 17:02:08 +02:00
Shekar Siri
2994a8425e change(ui): linechart changes for total 2024-09-09 19:54:46 +05:30
Shekar Siri
619702e91b change(ui): moved insights to diff section 2024-09-09 19:33:14 +05:30
nick-delirium
4c6e9fd8aa
keep spot v up to date 2024-09-09 14:29:26 +02:00
Shekar Siri
8b75d97093 fix(ui): jwt token set 2024-09-09 14:56:43 +05:30
nick-delirium
2ed3472768
fix ui: widget selected daterange 2024-09-09 11:20:58 +02:00
nick-delirium
8bd23b40ca
spot readme update 2024-09-09 10:17:57 +02:00
nick-delirium
11bd75df08
change spot v 2024-09-09 10:12:49 +02:00
nick-delirium
50b6a8ac42
fix ui ignore tp 9999 placeholder; fix tabclose event ts on single tab sessions 2024-09-09 10:06:28 +02:00
nick-delirium
98e18990d9
ui remove spot login query 2024-09-09 09:48:30 +02:00
Mehdi Osman
d45a06c136
Update README.md 2024-09-06 16:08:57 -04:00
Kraiem Taha Yassine
2ffb52f5d1
Dev (#2550)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed signup for EE
2024-09-06 18:20:43 +02:00
Kraiem Taha Yassine
ef5c51e383
Dev (#2549)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed signup for EE
2024-09-06 18:10:48 +02:00
nick-delirium
eb02f26e1b
ui: return missing icon 2024-09-06 18:03:46 +02:00
nick-delirium
83883929d6
ui: remove debug 2024-09-06 18:03:29 +02:00
Kraiem Taha Yassine
e628d1ac2f
Dev (#2548)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored logout

* fix(chalice): fixed signup scope & tokens
2024-09-06 18:02:02 +02:00
nick-delirium
e96416d1e6
ui: some debug for signup 2024-09-06 18:01:32 +02:00
Kraiem Taha Yassine
d274e08f43
Dev (#2547)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored logout
2024-09-06 17:40:57 +02:00
Kraiem Taha Yassine
687d12470a
Dev (#2546)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed change password for EE
2024-09-06 17:24:59 +02:00
Kraiem Taha Yassine
527cf46130
Dev (#2545)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed change password to include spto-jwt & refresh tokens
2024-09-06 16:42:31 +02:00
nick-delirium
3dd31dc0a7
ui: pick api_middleware.ts from saas 2024-09-06 16:13:13 +02:00
Kraiem Taha Yassine
25e6862ce6
Dev (#2544)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): always generate spot-jwt
refactor(chalice): generate spot-jwt on password change
refactor(chalice): generate spot-jwt on accept invitation
2024-09-06 16:02:07 +02:00
nick-delirium
2d8ff056c4
ui: spot related api fixes 2024-09-06 15:42:33 +02:00
Mehdi Osman
f449a561cd
Update .env.sample 2024-09-06 08:39:11 -04:00
Sudheer Salavadi
126c9acc9b
ui: Date Picker Styles (#2542)
* Date Picker Styles

* style popup changes

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>
2024-09-06 14:37:38 +02:00
Kraiem Taha Yassine
2d5ca69705
Dev (#2541)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgaded dependencies
refactor(alerts): upgaded dependencies
refactor(crons): upgaded dependencies
2024-09-06 12:18:55 +02:00
nick-delirium
4d1350a770
tracker check restarting status 2024-09-06 12:05:54 +02:00
nick-delirium
dbd065aec7
tracker add more canvas checks, release 14.0.6 2024-09-06 11:57:25 +02:00
nick-delirium
e7fe260c81
spot add semver to header 2024-09-06 11:14:30 +02:00
Alexander
082bc5d489 feat(spot): fixed sql call in spots status 2024-09-05 17:08:46 +02:00
Alexander
b46bcee817 feat(spot): last spot fixes 2024-09-05 17:02:48 +02:00
Kraiem Taha Yassine
c8c458764e
Dev (#2540)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(sourcemaps-reader): changed version
2024-09-05 16:59:32 +02:00
Shekar Siri
5a48bdfa83 fix(ui): xray popover 2024-09-05 20:06:42 +05:30
Shekar Siri
6ca9bda5d8 change(ui): bar color change 2024-09-05 19:47:38 +05:30
Alexander
e4a25401e6 feat(spot): applied a new spots schema to tasks sql requests 2024-09-05 16:16:17 +02:00
Kraiem Taha Yassine
90ea84c557
Dev (#2539)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed usability test logger
2024-09-05 16:10:31 +02:00
Shekar Siri
8b19c8f831 fix(ui): top values format 2024-09-05 19:39:43 +05:30
Shekar Siri
d73c481ab7 change(ui): table widgets drilldown tag 2024-09-05 19:39:43 +05:30
Alexander
840f133f73
SQL for Spot feature (#2513)
* feat(spot): added sql for spot feature

* feat(spot): added sql code to all related files

* feat(spot): added default value for created_at

* feat(spot): added spots schema

* feat(spot): applied a new spots schema to all sql requests
2024-09-05 15:57:39 +02:00
Mehdi Osman
9725bba276
Update .env.sample 2024-09-05 09:08:49 -04:00
nick-delirium
45eb21e73f
spot remove count on zero 2024-09-05 14:58:31 +02:00
Kraiem Taha Yassine
b5e8e86f23
Dev (#2537)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed EE heatmaps
2024-09-05 11:50:57 +02:00
Shekar Siri
bff9b7fb93 fix(ui): widget options observe state changes 2024-09-05 15:11:07 +05:30
rjshrjndrn
dd6b1a6c97 chore(helm): Removing deprecated variable
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-05 11:35:05 +02:00
Shekar Siri
2dcf447d5b fix(ui): omnisearch autocomplete 2024-09-05 14:59:52 +05:30
nick-delirium
4563f90eee
spot: refactor types, update wxt core, use global browser 2024-09-05 10:58:27 +02:00
Kraiem Taha Yassine
a2b0366267
Dev (#2536)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored SSO dependency

* refactor(chalice): handle SSO configuration not available
2024-09-04 18:17:01 +02:00
nick-delirium
d4ce72787b
spot rename some vars 2024-09-04 17:48:09 +02:00
nick-delirium
8de1e0e543
spot: ask for ingest url directly inside relevant method instead of passing 2024-09-04 16:59:15 +02:00
Alexander
1c2d781498 feat(spot): public key insert bug fix 2024-09-04 16:33:56 +02:00
nick-delirium
e72ee5766a
spot use player comp for tabs 2024-09-04 16:33:02 +02:00
Kraiem Taha Yassine
4733db7c64
Dev (#2535)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed missing SSO dependency
2024-09-04 16:06:31 +02:00
Alexander
b471d7f260 feat(spot): small sql improvements 2024-09-04 16:05:59 +02:00
nick-delirium
1d47d77dda
spot prevent empty titles 2024-09-04 15:37:37 +02:00
nick-delirium
3c8b9c13b9
spot fix error markers boundary 2024-09-04 15:22:52 +02:00
nick-delirium
bd95aa7267
remove contain from rec box 2024-09-04 14:38:37 +02:00
Kraiem Taha Yassine
bb94a926d4
Dev (#2534)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(sourcemap-uploader): upgraded dependencies
refactor(sourcemap-uploader): added dev script
2024-09-04 14:31:10 +02:00
nick-delirium
af28a291df
permissions for spot 2024-09-04 13:02:53 +02:00
nick-delirium
ccca40011b
change spot refresh url getter 2024-09-04 12:26:04 +02:00
Alexander
1bc96062fd feat(http): added features field to ee version 2024-09-04 10:46:38 +02:00
rjshrjndrn
a79a280f96 chore(helm): Upgrade postgres image to 16.3.0
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-04 08:50:51 +02:00
rjshrjndrn
49a7390d38 chore(helm): failure logs
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-04 08:18:15 +02:00
rjshrjndrn
efe25337e9 chore(actions): different gh secrets
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 18:08:06 +02:00
Alexander
b732c94f0f feat(spot): use the same tokens as in chalice by default 2024-09-03 17:43:17 +02:00
nick-delirium
e6687a31e1
return card-list.svg 2024-09-03 17:38:52 +02:00
rjshrjndrn
44e87c995b chore(helm): Use same image for all pg operations.
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 17:38:39 +02:00
Kraiem Taha Yassine
92df1c671a
Dev (#2532)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed update scope for EE
2024-09-03 17:33:16 +02:00
Alexander
1c1e6beb41 feat(spot): check different jwt iat for different tokens 2024-09-03 17:32:34 +02:00
rjshrjndrn
e7a0ca843f chore(cli): template newly create variables
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 17:24:56 +02:00
rjshrjndrn
c179b4f9b9 chore(cli): template newly create variables
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 17:08:44 +02:00
rjshrjndrn
1767918a8c fix(helm): pg version check
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 17:04:36 +02:00
nick-delirium
4b62a2fd0c
reset onboarding state on scope upgrade 2024-09-03 16:56:06 +02:00
nick-delirium
8596b46614
ui change enum for spot? 2024-09-03 16:05:04 +02:00
rjshrjndrn
bb08e4fa84 Adding new secret
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 15:36:13 +02:00
Kraiem Taha Yassine
966f08e95d
Dev (#2531)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): rollback script
feat(DB): changed users.settings default value
2024-09-03 15:18:27 +02:00
rjshrjndrn
0dbce91c82 chore: Adding new jwt key 2024-09-03 15:13:44 +02:00
Kraiem Taha Yassine
e59f14458f
Dev (#2530)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): changed JWT env-vars
refactor(deployment): changed JWT env-vars for chalice&http
2024-09-03 14:53:44 +02:00
Shekar Siri
1636d9cc06 change(ui): usability module settings 2024-09-03 18:01:02 +05:30
nick-delirium
2f1e9de6a0
fix move scopesetup redirect 2024-09-03 13:54:06 +02:00
nick-delirium
eb7f60c721
fix scopestate var name 2024-09-03 13:39:06 +02:00
nick-delirium
7ed1413e6b
fix scopestate var name 2024-09-03 13:28:05 +02:00
nick-delirium
1dec5ee262
feat tracker support feature off toggle 2024-09-03 12:03:45 +02:00
Alexander
bbf1dbcc23 feat(http): ff and uxt are disabled by default 2024-09-03 11:41:24 +02:00
nick-delirium
7634db34db
fix scope ui to enum, fix pubkey check 2024-09-03 11:32:37 +02:00
Alexander
8ba496277f feat(spot): fixed jwt token expiration date 2024-09-03 11:25:51 +02:00
Alexander
e4555cf7af feat(spot): added getStatus request to public key whitelist 2024-09-03 11:10:25 +02:00
rjshrjndrn
81238bb0a1 chore(init): enabling verbose logging
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-03 10:46:02 +02:00
Kraiem Taha Yassine
9e239bb5f1
Dev (#2529)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed scope state
2024-09-03 10:42:12 +02:00
Kraiem Taha Yassine
80e913d0d1
Dev (#2528)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed scope state
2024-09-03 10:26:03 +02:00
nick-delirium
fee823f69f
fix ui change scope to enum 2024-09-03 09:50:22 +02:00
Shekar Siri
30dc00a3e7 fix(ui): initial password reset jwt setup 2024-09-03 13:14:29 +05:30
Shekar Siri
7d3c91ff67 fix(ui): account data 2024-09-03 12:33:04 +05:30
Shekar Siri
644ef29d1f change(ui): typo 2024-09-03 11:27:48 +05:30
Kraiem Taha Yassine
cbf389f6f9
Dev (#2526)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): changed scope to scopeState with 0|1|2 values
2024-09-02 18:05:22 +02:00
rjshrjndrn
70e2d62de9 chore(helm): proper directory structure
fixes #2295

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 17:09:07 +02:00
rjshrjndrn
180ac3e466 chore(helm): Adding default log level for python svcs
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 16:54:06 +02:00
rjshrjndrn
0d9d7ef800 fix(install): proper OR sub directory
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 16:46:14 +02:00
rjshrjndrn
27d40dbcc9 chore(init): show latest git commit
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 15:04:50 +02:00
rjshrjndrn
308f070b1d chore(helm): Adding spots bucket
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 14:50:54 +02:00
nick-delirium
506a886ba4
spot change permissions 2024-09-02 14:44:13 +02:00
Kraiem Taha Yassine
90d37f74d2
Dev (#2524)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(DB): fixed init schema
dev(DB): script to run init schema against dev servers
2024-09-02 14:26:17 +02:00
Kraiem Taha Yassine
1f1bc273d0
Dev (#2523)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(alerts): fixed loggers
refactor(chalice): refactored health-check logging
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
2024-09-02 13:38:16 +02:00
rjshrjndrn
3131f58afd fix(helm): db migrate
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 12:40:14 +02:00
rjshrjndrn
b66711219d fix(helm): db migrate check postgres
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-09-02 12:16:57 +02:00
rjshrjndrn
86b6f5de0a Updating version 2024-09-02 10:45:43 +02:00
Sudheer Salavadi
651e899c53
Various minor improvments (#2516)
* Various improvements

Icon updates in side menu and Spot List page

* Drag Controls

* Title changes

* Title updates and removed comments from code.

* Update SpotVideoContainer.tsx
2024-09-02 10:03:16 +02:00
Shekar Siri
b6bbc12698 fix(ui): check for recordings 2024-09-02 10:31:36 +05:30
Mehdi Osman
4d35e996fa
Change to AGPL v3 2024-08-30 17:08:55 -04:00
nick-delirium
67c65b845c
spot fix: hard overwrite shadow host visibility 2024-08-30 17:14:15 +02:00
Kraiem Taha Yassine
db5bf061e0
Dev (#2521)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fix spot refresh
2024-08-30 16:37:40 +02:00
nick-delirium
7ab35cd7c8
spot: optimize CSS containment for improved performance 2024-08-30 16:18:28 +02:00
Kraiem Taha Yassine
924547f551
Dev (#2520)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* debug(chalice): debugging spot login/refresh
2024-08-30 15:58:51 +02:00
nick-delirium
3dbd7f5575
fix icon warnings 2024-08-30 15:48:34 +02:00
Kraiem Taha Yassine
10430e21a6
Dev (#2518)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* debug(chalice): debugging spot login/refresh
2024-08-30 15:43:05 +02:00
Kraiem Taha Yassine
49b067c266
Dev (#2517)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* debug(chalice): debugging spot login/refresh
2024-08-30 15:20:50 +02:00
Alexander
f007cb56fd feat(spot): addComment fix (null -> 0 for array_lenght method) 2024-08-30 14:34:31 +02:00
Shekar Siri
3828159a86 fix(ui): missing table of errors 2024-08-30 17:45:47 +05:30
Shekar Siri
29360c719e feat(ui): widget options 2024-08-30 17:45:46 +05:30
nick-delirium
2704691852
fix ui: fix random scroller on mobile body 2024-08-30 14:05:52 +02:00
Kraiem Taha Yassine
ed390daef8
Dev (#2515)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* debug(chalice): debugging spot login/refresh
2024-08-30 13:44:22 +02:00
Kraiem Taha Yassine
a7c68b751b
Dev (#2514)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* debug(chalice): log authorizer's config for debugging purposes
2024-08-30 13:23:03 +02:00
nick-delirium
837dfe2f92
feat ui: add dashboard editing modal to dashboard list 2024-08-30 12:05:05 +02:00
nick-delirium
128746fa15
fix: Redirect to SPOTS_LIST_PATH when spotOnly is true in PrivateRoutes 2024-08-30 11:32:19 +02:00
nick-delirium
3a14e0f7ce
spot: fix url builder for refresh req 2024-08-30 11:11:12 +02:00
nick-delirium
332ffa3ca0
ui: remove bundle analyzer, add thread loader 2024-08-30 10:47:10 +02:00
nick-delirium
efd6678a4d
spot update messages.json 2024-08-30 10:25:52 +02:00
nick-delirium
63a43a1ca9
ui: remove debug buttons 2024-08-30 10:20:25 +02:00
nick-delirium
f76014cc6b
spot: update wxt to last v 2024-08-30 10:16:41 +02:00
nick-delirium
f0d3b361a0
rm junk logs 2024-08-30 10:09:54 +02:00
nick-delirium
2c9d801501
change perms, change name and descr for spot 2024-08-30 10:08:30 +02:00
nick-delirium
251de2bf9c
fix spot name 2024-08-29 17:49:42 +02:00
Alexander
a0b13b2195 feat(spot): fixed spots task table name 2024-08-29 17:08:10 +02:00
Alexander
345f316b27
Spots (#2305)
* feat(spot): first version to test http endpoints

* fix(helm): changed nginx path prefix

* fix(spots): added missing BUCKET_NAME env var

* fix(spots): added services init check

* feat(spots): removed geo module

* feat(spots): removed uaparser

* feat(spots): added more detailed authorization error log

* feat(spots): changed the authorization middleware

* feat(spots): extended http body size limit to 128kb

* feat(spots): added s3 error log

* feat(spots): added new handler for uploaded event

* feat(backend): small api changes in spot service

* feat(backend): rewrote request parameters grabber for getSpot handler

* feat(backend): added tenantID to auth struct

* feat(backend): added pre-signed download urls for preview, mob et video files

* feat(backend): added user's email to spots table, and getSpot responses

* feat(backend): returning spotID as a string

* feat(spot): added transcoder pipeline

* fix(spot): return spotID as a string

* feat(spot): added volume mount to spot service

* feat(spot): fixed volume mounting

* feat(spot): helm fix

* feat(spot): helm another fix

* fix(spot): correct video.webm path

* fix(spot): correct pre-signed url for download original video

* feat(spot): added PATCH and DELETE methods to CORS

* feat(spot): use string format for spotIDs in delete method

* feat(spot): added public key implemented

* fix(spot): correct public-key parser

* fix(spot): fixed query params issue + user's tenantID

* fix(spot): use 1 as a default tenant

* feat(spot): added correct total spots calculation

* fix(spot): fixed offset calculation

* feat(spot): added extra check in auth method

* fix(spot): removed / from video file name

* fix(spot): devided codec flag into 2 parts

* feat(spot): use fixed tenantID = 1 for oss users

* feat(spot): return 404 for public key not found issue

* feat(spots): added spots folder to minio path rule

* feat(spot): added spot video streaming support

* fix(spot): fixed an sql request for spot streams

* feat(spot): return playlist file in getSpot responce

* feat(spot): try to use aac audio codec

* feat(spot): added permissions support (oss/ee)

* feat(spot): added authorizer method

* feat(spot): added license check

* feat(spot): added spot preview for get response

* fix(spot): fixed a problem with permissions

* feat(spot): added crop feature

* feat(spot): upload cropped video back to s3

* feat(spot): manage expired modified playlist file

* feat(backend): hack with video formats

* feat(backend): removed space

* feat(spot): req tracing

* feat(spot): manual method's name mapping

* feat(spot): added a second method to public key auth support

* feat(spot): metrics

* feat(spot): added rate limiter per user

* feat(spot): added ping endpoint for spot jwt token check

* feat(spot): getStatus endpoint

* feat(spot): added missing import

* feat(spot): transcoding issue fix

* feat(spot): temp remove tasks

* feat(spot): better error log message

* feat(spot): set default jwt_secret value

* feat(spot): debug auth

* feat(spot): 2 diff jwt tokens support

* feat(spot): pg tasks with process status

* feat(spot): more logs

* feat(spot): improved defer for GetTask method

* feat(spot): keep only failed tasks

* feat(spot): removing temp dir with spot files

* feat(spot): added several workers for transcoding module

* feat(spot): fixed spot path for temp video files

* feat(spot): use custom statusWriter to track response code in middleware

* feat(spot): added body and parameter parser for auditrail feature

* feat(spot): fixed IsAuth method signature

* feat(spot): fixed ee service builder

* feat(spot): added import

* feat(spot): fix data type for payload and parameters jsonb fields

* feat(spot): typo fix

* feat(spot): moved out consts

* feat(spot): new table's name

* feat(spot): added missing imports in go.mod

* feat(spot): added a check for the number of comments (20 by default)
2024-08-29 16:08:33 +02:00
nick-delirium
7c52b83a63
spot/refresh -> api/spot/refresh 2024-08-29 16:00:52 +02:00
nick-delirium
0bf63ee7bb
fix mad redirecting 2024-08-29 15:59:08 +02:00
nick-delirium
ff2b449c58
fix heatmap operators 2024-08-29 15:48:49 +02:00
nick-delirium
addd8f23a3
fix heatmap filter selection, fix sso button? 2024-08-29 15:42:36 +02:00
nick-delirium
4ed6523ee8
fix tests; add testing for spotPlayerStore 2024-08-29 14:12:16 +02:00
Delirium
1326bb2eae
feat spot: init commit for extension (#2452)
* feat spot: init commit for extension

* nvmrc

* fix login flow

* Spots Gridview Updates (#2422)

* feat ui: login flow for spot extension

* spot list, store and service created

* some fixing for header

* start work on single spot

* spot player start

* header for player, comments, icons, etc

* split stuff into compoennts, create player state manager

* player controls, activity panel etc etc

* comments, empty page, rename and stuff

* interval buttons etc

* access modal

* pubkey support

* fix tooltip

* limit 10 -> 9

* hls lib instead of videojs

* some warnings

* fix date display for exp

* change public links

* display more client data

* fix cleaning, init comment

* map network to replay player network ev

* stream support, console panel, close panels on X

* fixing streaming, destroy on leave

* fix autoplay

* show notification on spot login

* fix spot login

* backup player added, fix audio issue

* show thumbnail when no video, add spot roles

* add poster thumbnail

* some fixes to video check

* fix events jump

* fix play btn

* try catch over pubkey

* feat ui: login flow for spot extension

* spot list, store and service created

* some fixing for header

* start work on single spot

* spot player start

* header for player, comments, icons, etc

* split stuff into compoennts, create player state manager

* player controls, activity panel etc etc

* comments, empty page, rename and stuff

* interval buttons etc

* access modal

* pubkey support

* fix tooltip

* limit 10 -> 9

* hls lib instead of videojs

* some warnings

* fix date display for exp

* change public links

* display more client data

* fix cleaning, init comment

* map network to replay player network ev

* stream support, console panel, close panels on X

* fixing streaming, destroy on leave

* fix autoplay

* show notification on spot login

* fix spot login

* backup player added, fix audio issue

* show thumbnail when no video, add spot roles

* add poster thumbnail

* some fixes to video check

* fix events jump

* fix play btn

* try catch over pubkey

* icons

* Various updates

* Update SVG.tsx

* Update SideMenu.tsx

* SpotList & Menu updates

* feat ui: login flow for spot extension

* spot list, store and service created

* some fixing for header

* start work on single spot

* spot player start

* header for player, comments, icons, etc

* split stuff into compoennts, create player state manager

* player controls, activity panel etc etc

* comments, empty page, rename and stuff

* interval buttons etc

* access modal

* pubkey support

* fix tooltip

* limit 10 -> 9

* hls lib instead of videojs

* some warnings

* fix date display for exp

* change public links

* display more client data

* fix cleaning, init comment

* map network to replay player network ev

* stream support, console panel, close panels on X

* fixing streaming, destroy on leave

* fix autoplay

* show notification on spot login

* fix spot login

* backup player added, fix audio issue

* show thumbnail when no video, add spot roles

* add poster thumbnail

* some fixes to video check

* fix events jump

* fix play btn

* try catch over pubkey

* icons

* spot login pinging

* Spot List & Player Updates

* move spot login flow to login comp, use separate spot login path for unique jwt

* invalidate spot jwt on logout

* add visual data on page load event

* typo fix

* Spot Listing improvements post review.

* Update SpotListItem.tsx

* Improved Spot List and Item Details

* Minor improvements

* More improvements

* Public player header improvements

* Moved formatExpirationTime to utils

* fixes after merge

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* set sso link to <a>?

* some small perf fixes

* login duck reformat...

* Update frontend.yaml

* add observer to spot list header

* split list header

* update spotjwt param in router

* fix toast in router

* fix async fetch, move ctx

* capture space btn ev

* fix header link

* public sharing error msg

* fix err msg for unsuccessful rec start

* fix list alignment

* Caching assets. Finally!!!

* fix typing in comment field

* add pubkey to comments, fix console jump btn

* no content comp

* change refresh token logic

* move thumbnail ts

* move thumbnail ts

* fix tab change

* switch up toggler

* early exit if no jwt present

* regenerate icons

* fix location str

* fix ctx

* change thumnail res, return autoplay for video player

* parse links in console rows, fix injected method parse?

* remove ts from js

* fix console parsing order?

* fixes for autoplay

* xray for spot player

* move to spot list after login;
esc to cancel;
fix signup link;
move ux commit

* kb sc for skipping; xray for spot ext

* track aborted requests

* tooltip for readability

* fixing empty state

* New blank state + various minor improvements (#2471)

* New blank state + various minor improvements

* apres merge

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* rm temp v

* init or card

* empty state debug

* empty state debug

* empty state debug

* fix initor img

* spotonly scope support

* Improved Spot dead-end pages (#2475)

* Improved Spot dead-end pages

* Initiate OpenReplay Setup and some more

* get scope changes

* fix crash

* scope upgrade/downgrade

* scope setup flow

* ping for backend

* upgrade wxt deps

* cancel ping int on expiration

* check rec status

* fix ping

* check video processing state

* check video processing state

* fix xray close, network highlight, fcp rounding

* update wxt, move open spot stuff to settings

* fix some history issues

* fix spot login flow

* fix spot login again

* fix spot login again

* don't send two requests

* limit messages for logged users

* limit messages for logged users

* fix public ignore

* microphone stuff

* microphone stuff

* Various improvements (#2509)

* Various improvements

- Updated icons in mic settings
- Included prefix in Spot title
- Save recording notification has been updated
- Other minor UI improvements

* Inline declaration of spot name field, and settings UI

* str f

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* UI changes in player header, spot list (#2510)

* Added UI elements in player page

- Badge with counts for comments
- Download and Delete dropdown in player
- Spot selection -- UI improvement

* Minor copy updates

* completing changes

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>

* rm cmt

* fix cellmeasurer

* thumbnail dur

* fix download

* Minor fixes (#2512)

- Spot delete confirmation
- Spot comments UI update
- Minor copy updates

* limit number of notif messages

* add spot title to doc title, add cache groups for webpack

* drop mic controls from recording popup view

* fix for webpack compress

* fix for auto mic pickup

* change status banners

* move svgs around, remove undefined check

* refactor svgs

* fix timetable scaling

* fix error popup

* self contain css

* pre-select spot on spot onboarding

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
Co-authored-by: Rajesh Rajendran <rjshrjndrn@users.noreply.github.com>
2024-08-29 13:35:58 +02:00
nick-delirium
a788fadb1c
fixes 2511: remove canvas snapshot interval if its gone for any reason 2024-08-29 09:59:03 +02:00
nick-delirium
6e175f48c5
fix default tz on dateRange 2024-08-28 11:40:08 +02:00
Delirium
203791f0f6
Remove unused code, refactor frontend and revisit libraries (#2458)
* start frontend thinning

* continue thinning

* removing moment and moment-range

* remove highlightjs

* remove semantic-ui

* ghaida commits to openreplay finally

* unused icons

* unused icons

* unused icons

* fix missing icons

---------

Co-authored-by: Ghaida Bouchaala <ghaida.bouchaala@gmail.com>
2024-08-27 16:15:14 +02:00
Kraiem Taha Yassine
0de1c361ba
Dev (#2496)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): Update user on SSO
refactor(chalice): refactored SSO
2024-08-16 18:35:05 +02:00
Kraiem Taha Yassine
1b83e77fd3
Dev (#2493)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed table of errors-per-domain with 0 results
2024-08-16 11:57:31 +02:00
Kraiem Taha Yassine
3641083bba
Dev (#2492)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): support pagination for table of errors-per-domain
2024-08-14 18:21:06 +02:00
rjshrjndrn
6ef053e328 chore(cacher): Increase css cache to 60MB
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-08-14 16:59:03 +02:00
Kraiem Taha Yassine
c245e9d977
Dev (#2491)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): changed funnels&webVitals users count

* feat(chalice): table of referrers&requests by users count

* dev(chalice): changed JWT expiration for test
2024-08-14 16:14:31 +02:00
Kraiem Taha Yassine
339640ffce
Dev (#2489)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed cards-schema validators for the new Pydantic
2024-08-13 17:04:55 +02:00
Kraiem Taha Yassine
30d1678fe1
Dev (#2488)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored schema
fix(chalice): fixed schemas validators for the new Pydantic
2024-08-13 16:25:20 +02:00
Kraiem Taha Yassine
3e3bf30633
Dev (#2487)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed schemas field validator
2024-08-13 12:11:06 +02:00
Kraiem Taha Yassine
4b8af90b18
Dev (#2486)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed schemas field validator
2024-08-13 11:48:27 +02:00
Kraiem Taha Yassine
b9fc397e72
Dev (#2485)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): get top 10 values for autocomplete CH

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed predefined metrics
refactor(chalice): refactored schemas
refactor(chalice): refactored routers
refactor(chalice): refactored unprocessed sessions
2024-08-13 11:37:58 +02:00
Shekar Siri
6cfecb53a3 feat(ui): card by fetch requets 2024-08-13 14:02:46 +05:30
Shekar Siri
bcb7881100
feat(ui) - table of referrer card (#2484)
* feat(ui): table of referrer

* change(ui): click filter with selector options

* change(ui): total property
2024-08-13 09:31:25 +05:30
Kraiem Taha Yassine
97f9f59132
Dev (#2483)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* refactor(chalice): upgraded dependencies

* feat(chalice): table of requests

* feat(chalice): table of requests CH
2024-08-12 19:07:20 +02:00
Kraiem Taha Yassine
b6e28b9e66
Dev (#2482)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): table of referrers CH
2024-08-12 08:23:20 +02:00
Kraiem Taha Yassine
ce75b72226
Dev (#2479)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): table of referrers
2024-08-09 18:28:00 +02:00
Kraiem Taha Yassine
45b8a23bb8
Dev (#2478)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed Spot token generation
2024-08-09 15:37:49 +02:00
Kraiem Taha Yassine
29bb1638a0
Dev (#2477)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): ignore admin privilege and role for Spot-scope
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
2024-08-09 13:06:30 +02:00
Kraiem Taha Yassine
3e6a1e5468
Dev (#2476)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored heath-check package
refactor(chalice): enhanced scope caching
dev(chalice): reduced Spot JWT TTL for testing purposes
2024-08-09 11:50:50 +02:00
Kraiem Taha Yassine
ae7ad43afe
Dev (#2474)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): enhanced top-events caching

* feat(DB): support OR scope
feat(chalice): support OR scope
2024-08-08 17:41:11 +02:00
Kraiem Taha Yassine
8c54a74f04
Dev (#2473)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(DB): enhanced top-events caching

* feat(DB): support OR scope
feat(chalice): support OR scope
2024-08-08 17:15:51 +02:00
Kraiem Taha Yassine
b618d47b38
Dev (#2472)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed Spot new refresh token
refactor(chalice): customizable-Spot-auth
2024-08-08 10:43:36 +02:00
rjshrjndrn
859915107b chore(helm): Test postgres version is < 15, then exit
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-08-07 22:08:45 +02:00
rjshrjndrn
845ce44ddd chore(helm): Adding workload type label
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-08-07 22:08:45 +02:00
Kraiem Taha Yassine
6f0794b196
Dev (#2469)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): cache autocomplete-top-10 responses
feat(DB): support Spot login

* fix(chalice): fixed Spot new refresh token
2024-08-07 13:42:15 +02:00
Shekar Siri
8bf640d753 fix(ui): top values 2024-08-06 14:15:40 +02:00
rjshrjndrn
ec67590472 helm: common labels 2024-08-06 13:30:11 +02:00
Kraiem Taha Yassine
e19477b9f6
Dev (#2468)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed autocomplet-top-values
2024-08-05 18:04:08 +02:00
Shekar Siri
61a5fe188e change(ui): select date range highlight selected option and use antd 2024-08-05 16:52:43 +02:00
Shekar Siri
aaabf92afb change(ui): table of errors limit to 5 2024-08-05 16:06:43 +02:00
Shekar Siri
343dc44189 feat(ui): som of multiseries 2024-08-05 15:40:00 +02:00
Shekar Siri
e4ec766323 fix(ui): filters dropdown zindex 2024-08-05 15:22:25 +02:00
Shekar Siri
6d5052a0ff
UI sum multiseries (#2467)
* change(ui): click filter with selector options

* feat(ui): som of multiseries
2024-08-05 14:31:18 +02:00
Shekar Siri
1dcb8e112c
feat(ui): show filters top values (#2466)
* change(ui): click filter with selector options

* feat(ui): show top filter values
2024-08-05 13:08:51 +02:00
Kraiem Taha Yassine
a119e442db
Dev (#2460)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored and cleaned Spot code
refactor(chalice): refactored and cleaned login code
2024-08-02 17:12:21 +02:00
Kraiem Taha Yassine
db5f4b76a3
Dev (#2459)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): log 422 errors
refactor(chalice): cleaned session-replay deprecated code
fix(chalice): fixed sessionId to str wrapper
2024-08-02 15:50:09 +02:00
nick-delirium
7de1672599
move ai input under create button in card modal 2024-08-02 15:12:09 +02:00
Delirium
31d82f9d1d
Ai cards (#2450)
* ai query comp start

* ai cards...

* fix prop assign
2024-08-02 14:38:56 +02:00
Kraiem Taha Yassine
512230f224
Dev (#2457)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed JWT authorizer
2024-08-02 11:13:31 +02:00
Kraiem Taha Yassine
3411fa37b2
Dev (#2456)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed multi-cookies set
regression(chalice): removed sessionId to str wrapper
2024-08-01 18:20:47 +02:00
Kraiem Taha Yassine
66c6051890
Dev (#2455)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): refactored SSO ACS logic
2024-08-01 16:33:31 +02:00
Kraiem Taha Yassine
b24da71456
Dev (#2454)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): debugging
2024-08-01 15:33:22 +02:00
Kraiem Taha Yassine
908a21df79
Dev (#2453)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): spot-login logic for SSO
2024-08-01 15:06:46 +02:00
nick-delirium
70ceb220f0
change login request url to include spot param 2024-08-01 10:43:47 +02:00
Shekar Siri
d46d7e8b36 change(react-native): version jump 2024-08-01 10:27:18 +02:00
Shekar Siri
298526a7dd change(android): suppport jetpack compose 2024-08-01 10:27:18 +02:00
Kraiem Taha Yassine
8136d83025
Dev (#2449)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* refactor(chalice): upgraded dependencies
refactor(chalice): merged spot-login logic with regular-login
2024-07-31 18:37:30 +02:00
Kraiem Taha Yassine
01af0ccfda
Dev (#2448)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): include spot routers
2024-07-31 15:55:39 +02:00
Kraiem Taha Yassine
a3a4547e1e
Dev (#2447)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): support spot for EE

* fix(chalice): fixed routers generator
2024-07-31 15:09:07 +02:00
Kraiem Taha Yassine
f01a98c619
Dev (#2446)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): support spot for EE
2024-07-31 14:34:06 +02:00
Kraiem Taha Yassine
271e6e1f26
Dev (#2444)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): spot login/logout/refresh

* feat(chalice): spot only allow authorized endpoints
feat(chalice): spot get Slack channels

* refactor(chalice): refactored JWT authorizer
refactor(chalice): enhanced Spot endpoint access control
2024-07-31 11:31:28 +02:00
Delirium
b17c3ab8d7
Spots UI (#2385)
* feat ui: login flow for spot extension

* spot list, store and service created

* some fixing for header

* start work on single spot

* spot player start

* header for player, comments, icons, etc

* split stuff into compoennts, create player state manager

* player controls, activity panel etc etc

* comments, empty page, rename and stuff

* interval buttons etc

* access modal

* pubkey support

* fix tooltip

* limit 10 -> 9

* hls lib instead of videojs

* some warnings

* fix date display for exp

* change public links

* display more client data

* fix cleaning, init comment

* map network to replay player network ev

* stream support, console panel, close panels on X

* fixing streaming, destroy on leave

* fix autoplay

* show notification on spot login

* fix spot login

* backup player added, fix audio issue

* show thumbnail when no video, add spot roles

* add poster thumbnail

* some fixes to video check

* fix events jump

* fix play btn

* try catch over pubkey

* icons

* spot login pinging

* move spot login flow to login comp, use separate spot login path for unique jwt

* invalidate spot jwt on logout

* add visual data on page load event

* typo fix

* issue to copy change

* share spot url f
2024-07-31 09:56:41 +02:00
nick-delirium
42eb4b5040
tracker doc fix 2024-07-31 09:42:12 +02:00
Kraiem Taha Yassine
4246634a7d
Dev (#2443)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): spot login/logout/refresh

* feat(chalice): spot only allow authorized endpoints
feat(chalice): spot get Slack channels

* fix(chalice): fixed sport refresh
2024-07-30 18:11:55 +02:00
Kraiem Taha Yassine
7a23a3f45c
Dev (#2442)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): spot login/logout/refresh

* feat(chalice): spot only allow authorized endpoints
feat(chalice): spot get Slack channels

* fix(chalice): fixed sport refresh path
2024-07-30 17:47:24 +02:00
Kraiem Taha Yassine
fbea89485b
Dev (#2441)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): spot login/logout/refresh

* feat(chalice): spot only allow authorized endpoints
feat(chalice): spot get Slack channels

* fix(chalice): fixed sport refresh code
2024-07-30 16:25:43 +02:00
Kraiem Taha Yassine
a9a89a479d
Dev (#2440)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): spot login/logout/refresh

* feat(chalice): spot only allow authorized endpoints
feat(chalice): spot get Slack channels
2024-07-30 14:39:15 +02:00
nick-delirium
af3e1e077f
fix rn: bump ios pod to .11 2024-07-30 12:11:05 +02:00
nick-delirium
fd18bfba95
rn lib podfile setup 2024-07-26 14:50:37 +02:00
Kraiem Taha Yassine
45180a8cd6
Dev (#2434)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): spot login/logout/refresh
feat(DB): support spot login/refresh
2024-07-26 12:13:23 +02:00
Mehdi Osman
d60cda3f0b Inject mobile bucket (#2432) 2024-07-26 00:32:34 +02:00
Kraiem Taha Yassine
ca8f70d92d
Dev (#2431)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* feat(chalice): autocomplete top 10 for error events
2024-07-25 17:41:11 +02:00
Kraiem Taha Yassine
97df9b2b7c
Dev (#2430)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies

* feat(chalice): autocomplete return top 10 with stats

* refactor(chalice): refactored logger

* fix(chalice): fixed autocomplete top 10 meta-filters
2024-07-25 17:04:24 +02:00
Kraiem Taha Yassine
c8ad140298 Patch/api v1.19.0 (#2428)
* fix(chalice): changed mobile autocomplete

* fix(chalice): fixed mobile errors search
fix(chalice): fixed mobile errors autocomplete
fix(chalice): fixed mobile swipe autocomplete

(cherry picked from commit 64a746873b)
2024-07-25 11:53:23 +02:00
Mehdi Osman
fb802fde8a Added mobile and canvas related topics (#2424) 2024-07-25 10:33:07 +02:00
Taha Yassine Kraiem
9f36ac1632 fix(chalice): changed mobile autocomplete (#2426)
(cherry picked from commit 9db416dcde)
2024-07-25 10:32:01 +02:00
Alexander
1637e5b5ec feat(backend): changed mobile autocomplete naming 2024-07-25 10:19:36 +02:00
Shekar Siri
10e5021cc1 change(ui): summary ai toggle 2024-07-24 16:50:00 +02:00
Shekar Siri
1d150cdfa2 change(ui): remove browser card for mobile 2024-07-24 14:54:42 +02:00
Shekar Siri
5d8ca07c2a change(ui): mobile specific filters 2024-07-24 14:54:42 +02:00
Shekar Siri
1898ea88bd change(ui): removed empty tag that showign as green icon 2024-07-24 14:54:42 +02:00
Shekar Siri
ffae7169e4 change(ui): mobile resolution 2024-07-24 14:54:42 +02:00
Kraiem Taha Yassine
d05ddebeb9
Dev (#2420)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): refactored search sessions hooks

* refactor(chalice): refactored schemas

* refactor(chalice): refactored schemas
refactor(chalice): cleaned scripts
feat(chalice): search sessions by CSS selector (PG)

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): search by selectors

* feat(chalice): get top 10 values for autocomplete CH

* refactor(chalice): cleaned code
refactor(chalice): upgraded dependencies
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
2024-07-24 12:46:18 +02:00
Shekar Siri
420d8c43b1 change(ui): performance panel trunc deciamals 2024-07-23 16:15:59 +02:00
Kraiem Taha Yassine
8dc09ca691
Dev (#2419)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): refactored search sessions hooks

* refactor(chalice): refactored schemas

* refactor(chalice): refactored schemas
refactor(chalice): cleaned scripts
feat(chalice): search sessions by CSS selector (PG)

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): search by selectors

* feat(chalice): support Spot permissions
feat(DB): support Spot permissions
2024-07-23 16:00:26 +02:00
nick-delirium
b5387d8aa3
fix ui: summary output parser 2024-07-22 17:35:25 +02:00
PiR
a47ff4fcf0
Tracker GrahpQL: update doc and tracker initialization + add option to pass sanitizer function (#2402)
* fix(graphQL): update doc and tracker initialization + add option to pass sanitizer function

* improvement(graphQL): improve sanitizer type & apollo operation name
2024-07-22 16:08:41 +02:00
Kraiem Taha Yassine
fed6d3e120
Dev (#2413)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): refactored search sessions hooks

* refactor(chalice): refactored schemas

* refactor(chalice): refactored schemas
refactor(chalice): cleaned scripts
feat(chalice): search sessions by CSS selector (PG)

* refactor(chalice): upgraded dependencies
refactor(crons): upgraded dependencies
refactor(alerts): upgraded dependencies

* feat(chalice): search by selectors
2024-07-19 17:57:35 +02:00
Taha Yassine Kraiem
e5f6215d03 fix(chalice): stop SA from logout 2024-07-19 12:19:43 +02:00
Kraiem Taha Yassine
dd5ff6bad8
Dev (#2409)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): refactored search sessions hooks

* refactor(DB): DB delta

* refactor(DB): DB delta

* refactor(DB): DB delta

* refactor(chalice): refactored schemas

* refactor(chalice): refactored schemas
refactor(chalice): cleaned scripts
feat(chalice): search sessions by CSS selector (PG)
2024-07-18 17:57:37 +02:00
Taha Yassine Kraiem
5cc6915ed6 fix(chalice): fixed search mobile sessions
fix(chalice): fixed autocomplete mobile sessions
2024-07-18 13:07:23 +02:00
Alexander
b3d04d76d4
Heatmaps fix (float coordinates) (#2403)
* feat(spot): use float click coordinates instead of ints in PG

* feat(db): added support for float clicks in CH

* feat(db): fix float instead of uint8

* feat(mobile): new naming for mobile autocomplete types
2024-07-18 12:32:44 +02:00
nick-delirium
bac0360735
fix ui: fix first event calculation 2024-07-17 18:01:08 +02:00
nick-delirium
f7fcde48ed
fix ui: move clickmap overlay inside replay vdom, refactor renderer scaling 2024-07-17 17:30:58 +02:00
nick-delirium
524069a318
fix dependency for assist 2024-07-17 09:17:20 +02:00
Delirium
5887d61207
Heatmap fix (#2396)
* fix norm coordinates

* changelogs

* changelogs
2024-07-16 18:15:22 +02:00
nick-delirium
80c9dd2bb9
fix tracker: fix logger ref 2024-07-16 18:03:18 +02:00
nick-delirium
0150821878
fix manager event reads for mobile 2024-07-16 17:32:54 +02:00
Kraiem Taha Yassine
3652f76c75 Patch/api v1.19.0 (#2392)
* fix(chalice): reversed count&total for card-tables to confuse devs

* fix(DB): changed normalized_x&y col-type

(cherry picked from commit c845415e1e)
2024-07-16 17:16:27 +02:00
Shekar Siri
c16d8811d0 chore: release 0.5.0 2024-07-16 15:43:28 +02:00
Shekar Siri
5a24222678 change(react-native): version jump 2024-07-16 15:42:36 +02:00
Shekar Siri
a5a09e3416 fix(ui): base url kotlin version 2024-07-16 15:40:40 +02:00
Kraiem Taha Yassine
8c199e6f41 fix(chalice): fixed missing totalSessions in card-tables in EE (#2390)
* fix(chalice): fixed missing totalSessions in card-tables in EE

* fix(chalice): fixed missing totalSessions in card-tables in EE

(cherry picked from commit 72afae226b)
2024-07-16 14:17:32 +02:00
Mehdi Osman
02454e722e
Typo 2024-07-15 10:54:30 -04:00
Shekar Siri
789517af74 fix(ui): use count instead of totalSessions 2024-07-12 17:39:00 +02:00
Shekar Siri
fb99e8e035
UI timeseries usercount (#2386)
* Patch/api v1.19.0 (#2383)

* fix(chalice): fixed create heatmap card EE

* fix(chalice): fixed click_rage-heatmap card EE

* fix(chalice): fixed click_rage-heatmap ambiguous alias EE

* Increment chalice chart version (#2384)

Co-authored-by: GitHub Action <action@github.com>

* feat(ui): new timeseries card for user count (users trend)

---------

Co-authored-by: Kraiem Taha Yassine <tahayk2@gmail.com>
Co-authored-by: Mehdi Osman <estradino@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-07-12 16:16:27 +02:00
Taha Yassine Kraiem
9215631b54 fix(chalice): fixed click_rage-heatmap ambiguous alias EE 2024-07-11 11:27:18 +02:00
Taha Yassine Kraiem
ca1d821488 fix(chalice): fixed click_rage-heatmap card EE 2024-07-11 10:55:54 +02:00
Taha Yassine Kraiem
3ff68052f8 fix(chalice): fixed create heatmap card EE 2024-07-11 10:47:46 +02:00
Shekar Siri
74bacafe21 fix(ui): conditional filter format metadata lebl 2024-07-10 12:56:09 +02:00
Shekar Siri
b3d55ae4d5 fix(ui): cards library disbale inside card clicks 2024-07-09 19:50:57 +02:00
Sudheer Salavadi
3d8d2bc467 Merge branch 'dev' of https://github.com/openreplay/openreplay into dev 2024-07-09 22:48:24 +05:30
Sudheer Salavadi
906d64e514 Fixed issues and uI details in charts. 2024-07-09 22:48:22 +05:30
Mehdi Osman
587f0303e2
Update .env.sample 2024-07-09 11:51:06 -04:00
nick-delirium
1bac14ca96
rm husky stuff 2024-07-09 17:47:56 +02:00
Kraiem Taha Yassine
bf8126639f
Dev (#2377)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Elasticsearch-integration
2024-07-09 17:40:21 +02:00
Sudheer Salavadi
f05055f9b7 Fixed Interaction issues a card and note in player 2024-07-09 20:32:15 +05:30
nick-delirium
68bc244259
fix ui: fix feature flag icon crash 2024-07-09 16:49:06 +02:00
Shekar Siri
c9da2c6137 change(ui): removed jsx-runtime 2024-07-09 14:41:53 +02:00
nick-delirium
9af48c666b
update lockfiles for tracker 2024-07-09 13:42:08 +02:00
Kraiem Taha Yassine
5c46b8e3df
Dev (#2375)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed heatmaps get location events from CH
refactor(chalice): optimized heatmaps get location events from CH
2024-07-09 13:32:14 +02:00
rjshrjndrn
6a7b55452a chore(crons): Adding generator for new cron jobs 2024-07-09 13:11:53 +02:00
Sudheer Salavadi
124b4ab506 Merge branch 'dev' of https://github.com/openreplay/openreplay into dev 2024-07-09 16:27:24 +05:30
Sudheer Salavadi
b1b95496d8 More UI improvements 2024-07-09 16:26:53 +05:30
Shekar Siri
9f87d1a614 fix(ui): autocomplete params 2024-07-09 12:52:27 +02:00
Sudheer Salavadi
84af2c5250 Merge branch 'dev' of https://github.com/openreplay/openreplay into dev 2024-07-09 15:23:26 +05:30
Sudheer Salavadi
0d22eb80f5 Minor updates in dashboard and cards list views. 2024-07-09 15:23:23 +05:30
Shekar Siri
a914ca5de0 change(ui): heatmap card on dashbaord show no data message if the thumbnail is null 2024-07-09 11:34:57 +02:00
Shekar Siri
b4c2dabd7a change(ui): dashboards empty screen on changing visibility filter 2024-07-09 11:15:33 +02:00
Sudheer Salavadi
a0fa716f10 Search bar UI improvements in sessions page 2024-07-09 14:15:35 +05:30
Sudheer Salavadi
2ba8d08acc UI Fixes in console logs 2024-07-09 13:26:25 +05:30
Sudheer Salavadi
20c3c8e2ed More improvements 2024-07-09 00:05:53 +05:30
Sudheer Salavadi
7c771dd971 Various improvements 2024-07-08 21:44:24 +05:30
Shekar Siri
c94edf655f change(ui): roles to support for service accounts 2024-07-08 17:58:24 +02:00
Kraiem Taha Yassine
b7a5dbf04c
Dev (#2372)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed get chart with missing attributes in the payload

* fix(chalice): fixed heatmaps exclude multiple sessions
2024-07-08 17:44:35 +02:00
Shekar Siri
38004489b6 fix(ui): unknown country repeated 2024-07-08 17:38:41 +02:00
Kraiem Taha Yassine
4991df04e7
Dev (#2371)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed get chart with missing attributes in the payload
2024-07-08 17:28:11 +02:00
Kraiem Taha Yassine
54a10260eb
Dev (#2370)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed path-analytics issues filter
fix(chalice): fixed path-analytics MV usage
2024-07-08 17:06:36 +02:00
Kraiem Taha Yassine
11c6412733
Dev (#2369)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed get heatmap with incomplete payload
2024-07-08 16:17:29 +02:00
nick-delirium
b037c801db
fix ui: fix notes pagination 2024-07-08 15:39:17 +02:00
Kraiem Taha Yassine
8fe44d72f9
Dev (#2367)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): return notes-count

* fix(chalice): fixed create heatmap with no replay
2024-07-08 15:16:33 +02:00
Mehdi Osman
11068f9394
Update .env.sample 2024-07-08 06:41:06 -04:00
Kraiem Taha Yassine
51c12c3d0c
Dev (#2366)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fix wrong received filter payload
2024-07-08 12:31:06 +02:00
rjshrjndrn
a9251a8c8a chore(hlem): hpa change to v2 2024-07-08 12:17:09 +02:00
Sudheer Salavadi
2a39b4e0e3 Button label updates 2024-07-08 15:00:46 +05:30
Sudheer Salavadi
fa0276c1b2 Blank state of cards, and colors 2024-07-08 14:54:03 +05:30
Shekar Siri
bde612f430 fix(ui): assist reports module check 2024-07-05 17:51:02 +02:00
Shekar Siri
4ad2657cd9 change(ui): additional filters for path analysis and insights 2024-07-05 17:12:27 +02:00
Kraiem Taha Yassine
45cc36d9b8
Dev (#2362)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): refactored code

* fix(chalice): fixed funnel-issues drill-down redundant sessions
2024-07-05 16:49:19 +02:00
Shekar Siri
f32645203e change(ui): allow to create blank dashboard 2024-07-05 16:35:33 +02:00
Alexander
dfe527b412 feat(backend): added missing imports 2024-07-05 16:27:27 +02:00
Alexander
75eb6924c1 feat(connector): added s3 batches support for CH connector 2024-07-05 16:16:02 +02:00
Shekar Siri
74ba3e1c1a fix(ui): card data to use chart api inside dashbaord and cards library 2024-07-05 15:36:53 +02:00
nick-delirium
22a1be80ad
fix ui: copy invitation link on generation 2024-07-05 15:32:49 +02:00
Shekar Siri
733a6f8c6e change(ui): dashboard header toggle based on data 2024-07-05 15:03:37 +02:00
Shekar Siri
f2b310d205 fix(ui): autocomplete type is missing 2024-07-05 14:11:38 +02:00
Sudheer Salavadi
779983b487 UI Improvements 2024-07-05 16:30:01 +05:30
Shekar Siri
e1a788568e fix(ui): cards rename 2024-07-05 12:01:17 +02:00
Alexander
769982aea2 feat(backend): added missing imports 2024-07-05 11:32:24 +02:00
nick-delirium
a11f0b7339
fix ui: metric list warning fix 2024-07-05 11:08:49 +02:00
Alexander
6779dcb2e3 feat(backend): upgraded kafka library to 2.4 2024-07-05 11:05:12 +02:00
nick-delirium
a9d00c943f
fix ui: small fixes 2024-07-05 10:56:30 +02:00
Shekar Siri
c3993e284d fix(ui): cards pagination 2024-07-05 10:38:22 +02:00
Alexander
212b412838 fix(backend): added SetPage transform handler to support old message type 2024-07-05 10:27:43 +02:00
Sudheer Salavadi
2100cc0412 List view time stamp improvements
Following functions needs to reviewed
- Rename & Delete functionality
- Drag & Drop in gird view
- Table Sorting
2024-07-05 11:05:28 +05:30
Sudheer Salavadi
03fe6c499c Metrics list with ant table
- Rename and Delete function in the list view needs to be revisited.
2024-07-05 09:33:29 +05:30
Sudheer Salavadi
5d183b3cb0 Cards list view table updated using ant component. 2024-07-05 01:25:06 +05:30
Kraiem Taha Yassine
ba6d51bb91
Dev (#2359)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps
2024-07-04 18:25:57 +02:00
Kraiem Taha Yassine
d9ee0c9758
Dev (#2358)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed heatmap update with no selected session
fix(chalice): fixed heatmap payload schemas
fix(chalice): changed clickmaps permissions
2024-07-04 17:09:21 +02:00
Kraiem Taha Yassine
5619629bb7
Dev (#2357)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed heatmap update with no selected session
2024-07-04 16:58:07 +02:00
Shekar Siri
11e600ee61 change(ui): permission check for service accountts condition with or 2024-07-04 16:25:29 +02:00
Taha Yassine Kraiem
3dfacb47bf fix(DB): permissions changes
fix(chalice): permissions changes
2024-07-04 16:09:17 +02:00
Shekar Siri
7c7a93d64e change(ui): permission check for service accountts 2024-07-04 15:38:49 +02:00
Shekar Siri
04e8b199f5 change(ui): dashboard inputs - charts 2024-07-04 15:06:05 +02:00
Shekar Siri
9822e0e77c change(ui): dashboard inputs - border 2024-07-04 15:06:04 +02:00
Shekar Siri
cca49f0361 change(ui): dashboard inputs - remove last border from table cards 2024-07-04 15:06:02 +02:00
Shekar Siri
3be7a63850 change(ui): dashboard inputs 2024-07-04 15:06:01 +02:00
Taha Yassine Kraiem
55bb721a64 refactor(DB): changes 2024-07-04 14:52:34 +02:00
Taha Yassine Kraiem
b99e97cd5b fix(chalice): changed s-permissions
fix(DB): changed s-permissions
2024-07-04 14:27:32 +02:00
Taha Yassine Kraiem
2ff0d164fb fix(chalice): changed s-permissions
fix(DB): changed s-permissions

(cherry picked from commit 389ec4a8fc)
2024-07-04 14:26:59 +02:00
nick-delirium
456a44f9b4
fix ui: heatmap session refresh changes 2024-07-04 12:16:32 +02:00
nick-delirium
9adb31c4c9
fix ui: rm log 2024-07-04 11:12:00 +02:00
Alexander
cac458f5fa fix(backend): added old mouseClick event to message filter 2024-07-04 10:30:10 +02:00
Sudheer Salavadi
e22ba900da ui improvements 2024-07-03 21:59:10 +05:30
Kraiem Taha Yassine
7bab39d891
Dev (#2349)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): check timestamp is not null before selecting EXP_MV
2024-07-03 18:11:10 +02:00
Kraiem Taha Yassine
98a456ce55
Dev (#2348)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): path-analysis card, return issues identical to the chart
2024-07-03 17:59:19 +02:00
Shekar Siri
c66acd6b21 change(ui): path analysis issues card 2024-07-03 17:05:29 +02:00
Alexander
c6c46c6486 fix(backend): fixed naming issue in CH connector 2024-07-03 16:48:13 +02:00
Shekar Siri
61edf5fea7 fix(ui): widget view card gap 2024-07-03 16:46:28 +02:00
Alexander
b9dc87884c fix(backend): fixed an empty url_path for request events in CH 2024-07-03 16:40:44 +02:00
Alexander
939d661cdc fix(backend): changed normalized_x/y from uint32 to uint8 2024-07-03 16:34:39 +02:00
Shekar Siri
041e3c6180 fix(ui): dashboard null check 2024-07-03 16:29:27 +02:00
Shekar Siri
725095f205 change(ui): clickMapUrl to heatMapUrl 2024-07-03 15:52:13 +02:00
Shekar Siri
9903f097dc change(ui): card results limit increased to 20 from 5 2024-07-03 15:52:11 +02:00
Shekar Siri
95c6de95a0 change(ui): fitler series expand on click header part 2024-07-03 15:52:09 +02:00
nick-delirium
218dbb6c86
fix ui: fix tab name mapping 2024-07-03 15:51:45 +02:00
nick-delirium
98bafd9afa
fix ui: fix text position in events and player controls 2024-07-03 15:29:37 +02:00
Shekar Siri
aae01de0f7 fix(ui): complete project button click 2024-07-03 14:17:41 +02:00
Shekar Siri
5226f60834 change(ui): expand the first series on adding a fitler 2024-07-03 13:39:23 +02:00
Shekar Siri
420cd95858 fix(ui): username null check 2024-07-03 13:39:21 +02:00
Kraiem Taha Yassine
a2e9f2b165
Dev (#2347)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(DB): fixed exp-sessions_mv
2024-07-03 13:01:22 +02:00
Alexander
519b04433d feat(assist): updated assist/peers npm packages 2024-07-03 11:45:31 +02:00
nick-delirium
3cb4833699
fix ui: fix warnings 2024-07-03 11:11:09 +02:00
nick-delirium
2ffc9459d3
fix ui: fix warnings 2024-07-03 11:08:12 +02:00
nick-delirium
4dacaf1674
fix ui: heatmap session refresher 2024-07-03 11:05:36 +02:00
nick-delirium
9e1bce8207
fix ui: rename clickmap -> heatmap 2024-07-03 10:44:49 +02:00
nick-delirium
b2147a9fb7
fix ui: remove selector from session click map 2024-07-03 10:39:00 +02:00
Shekar Siri
a35311f4dc
Various UI improvements (#2337)
* Various UI improvements

* Title updates

* No results icon update

* UI Improvements in DevTools

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
2024-07-03 10:19:13 +02:00
Kraiem Taha Yassine
a21e123ea0
Dev (#2346)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed heatmaps extra endpoint
2024-07-03 09:26:26 +02:00
Shekar Siri
e8d0aa8176 change(ui): truncate the player url based on screen width 2024-07-02 18:11:10 +02:00
Kraiem Taha Yassine
d6ed68b528
Dev (#2342)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): completely remove clickMap cards
refactor(DB): completely transform clickMap to HeatMap

* fix(chalice): fixed heatmaps typo
2024-07-02 18:01:14 +02:00
Kraiem Taha Yassine
8aaec08cb1
Dev (#2341)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): completely remove clickMap cards
refactor(DB): completely transform clickMap to HeatMap
2024-07-02 17:49:50 +02:00
nick-delirium
5d7d711796
fix ui: fix canvas manager rendering q 2024-07-02 17:31:59 +02:00
Kraiem Taha Yassine
111dc0db0b
Dev (#2338)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed card-tableOf pagination
2024-07-02 16:45:36 +02:00
Shekar Siri
ecec4d8fd7 change(ui): cards menu 2024-07-02 16:11:01 +02:00
Kraiem Taha Yassine
0e42041aa8
Dev (#2336)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(DB): replaced click's x&y with normalized_x&normalized_y
fix(chalice): fixed heatmaps-clicks-path
refactor(DB): DB upgrade & downgrade scripts
2024-07-02 14:49:12 +02:00
Shekar Siri
9cbb1bf283 Merge branch 'dashboards-redesign' into dev 2024-07-02 13:43:40 +02:00
Shekar Siri
2931f9b6c5 change(ui): check for enterprise cards 2024-07-02 13:34:20 +02:00
Shekar Siri
efdaa42ab1 fix(ui): header alignment 2024-07-02 13:34:18 +02:00
Sudheer Salavadi
d4916f7172 Funnel UI improvements 2024-07-02 16:16:35 +05:30
Alexander
16fe6674f3 feat(assets): use UA header every get call 2024-07-02 12:20:07 +02:00
Kraiem Taha Yassine
9516dcd238
Dev (#2333)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): removed timeseries-card progress
refactor(chalice): removed tables-card pieChart
refactor(DB): migrated timeseries-card progress
refactor(DB): migrated tables-card pieChart
2024-07-02 11:53:47 +02:00
nick-delirium
cff1d3a996
fix ui: fix tab close manager counter 2024-07-02 11:47:22 +02:00
Shekar Siri
c88f6e68b2 fix(ui): issues drilldown payload 2024-07-02 11:34:49 +02:00
Sudheer Salavadi
b75e008471 various ui improvements 2024-07-02 15:04:05 +05:30
Shekar Siri
b38eda8821 fix(ui): issues drilldown payload 2024-07-02 11:29:14 +02:00
Kraiem Taha Yassine
88a6fb7383
Dev (#2332)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* refactor(chalice): return owner name for cards and dashboards
2024-07-02 11:21:19 +02:00
Shekar Siri
a62a19a38d change(ui): dashboard back button 2024-07-02 10:45:10 +02:00
Shekar Siri
11453b80a2 change(ui): dashboard interactive 2024-07-02 10:22:21 +02:00
Sudheer Salavadi
d2dfc2430c Merge branch 'dashboards-redesign' of https://github.com/openreplay/openreplay into dashboards-redesign 2024-07-01 22:03:33 +05:30
Shekar Siri
1f06bb9401 change(ui): errors by domain examples and card type chagne 2024-07-01 17:50:03 +02:00
Kraiem Taha Yassine
11c4d9e114
Dev (#2331)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* refactor(DB): update webVital UI configuration

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps
2024-07-01 17:46:45 +02:00
Shekar Siri
31efd79d5a change(ui): dashboard list show created by 2024-07-01 17:28:03 +02:00
Shekar Siri
04754504ce change(ui): dashboard list show created by 2024-07-01 17:24:25 +02:00
Shekar Siri
b6c26bcf03 change(ui): dashboard list show created by 2024-07-01 17:24:02 +02:00
Shekar Siri
caa55de1b6 change(ui): funnel bar style changes 2024-07-01 17:19:58 +02:00
Sudheer Salavadi
394222ed60 Minor improvements 2024-07-01 20:46:51 +05:30
nick-delirium
1434e937ab
fix ui: remove dead code 2024-07-01 17:07:39 +02:00
rjshrjndrn
18e694d6e4 chore(helm): Use df -h for faster disk calculation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-07-01 17:03:44 +02:00
Shekar Siri
b3ee59c6e3 change(ui): speed index example, slowest domains example and card type change 2024-07-01 16:59:54 +02:00
nick-delirium
a349b17153
fix ui: remove dead code 2024-07-01 16:56:14 +02:00
nick-delirium
041b45f2c0
fix ui: remove few warnings, update redux libraries 2024-07-01 16:48:31 +02:00
rjshrjndrn
7242b25b32 chore(helm): Adding node affinity support to all k8s apps 2024-07-01 16:43:00 +02:00
rjshrjndrn
bb29b05fb8 Updating version 2024-07-01 16:43:00 +02:00
Sudheer Salavadi
f35456b3f8 UI Improvements 2024-07-01 20:03:49 +05:30
Kraiem Taha Yassine
adb9fac80e
Dev (#2330)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed empty list of cards
2024-07-01 16:28:06 +02:00
Kraiem Taha Yassine
f7e72c0f83
Dev (#2329)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* refactor(chalice): return dashboard's owner email
2024-07-01 16:11:06 +02:00
Sudheer Salavadi
23e7b87002 UI Improvements 2024-07-01 19:30:04 +05:30
nick-delirium
a2a721673d
fix ui: fix ws modal height, add new shortcut to copy, fix new site type ios -> mobile 2024-07-01 15:55:32 +02:00
Shekar Siri
20ccee48d1 change(ui): slowest domains card change 2024-07-01 15:41:13 +02:00
Kraiem Taha Yassine
2f75bc49ef
Dev (#2328)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed update clickmap card

* refactor(chalice): changed heatmap behaviour for get-saved-card
2024-07-01 15:16:43 +02:00
Shekar Siri
6fcef5dff5 change(ui): sessions per browser example 2024-07-01 14:56:38 +02:00
nick-delirium
1b827071ec
feat ui: add timestamps to devtools rows 2024-07-01 14:30:31 +02:00
nick-delirium
2d154200a0
fix ui: fix console.debug output in player 2024-07-01 14:04:19 +02:00
Shekar Siri
281a2f5a1d change(ui): webvitals rename 2024-07-01 13:49:47 +02:00
Shekar Siri
5e1effc151 change(ui): card create modal height 2024-07-01 13:35:48 +02:00
rjshrjndrn
e7578a1bad fix(docker): Always pull the latest image from registry
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-07-01 13:33:38 +02:00
rjshrjndrn
59f16f343c fix(build): wrong shell
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-07-01 13:33:22 +02:00
Shekar Siri
d84ff1f7e0 change(ui): card create modal height 2024-07-01 13:32:19 +02:00
Shekar Siri
69fb477ae1 change(ui): webvitals size to 2 col 2024-07-01 13:20:12 +02:00
Shekar Siri
bfe165692e change(ui): webvitals size to 2 col 2024-07-01 12:58:48 +02:00
Shekar Siri
aaf65c532d change(ui): removed extra spaces 2024-07-01 12:33:51 +02:00
nick-delirium
afc6b495c5
fix ui: fix tab close calculation, fix widget preview request type 2024-07-01 12:30:20 +02:00
Shekar Siri
93a60de04b change(ui): hideTools in url param to hide session tools like notes, report, etc., 2024-07-01 11:50:34 +02:00
Sudheer Salavadi
82e36c05f6 UI Improvements 2024-06-28 20:58:36 +05:30
Sudheer Salavadi
21229f3ba6 Various style improvements in dashboards 2024-06-28 18:22:05 +05:30
Sudheer Salavadi
b7b9a897a7 Dashboards UI Improvements. 2024-06-28 01:12:24 +05:30
Sudheer Salavadi
13631765e4 Merge branch 'dashboards-redesign' of https://github.com/openreplay/openreplay into dashboards-redesign 2024-06-27 23:46:51 +05:30
Delirium
d604f9920b
feat ui: dashboards redesign (#2230)
* feat ui: dashboards redesign start

* more cards

* fix ui: more different cards...

* feat ui: finish cards, all trigger, all icons

* change(ui): added missin const

* feature(ui): new dashboard modal

* feature(ui): new dashboard modal

* change(ui): new cards

* change(ui): dashboard redesign

* change(ui): dashboard redesign

* change(ui): dashboard redesign

* change(ui): modal context and alert form

* change(ui): table card show more with modal

* change(ui): examples

* change(ui): example categorize and other improvements

* change(ui): example categorize and other improvements

* change(ui): performance cards

* change(ui): insights card

* Various style updates in dashboards and other pages. (#2308)

* Various minor style updates

* Various style improvements

* Update ExampleCards.tsx

* change(ui): fixed an issue with card create

* change(ui): fixed an issue with card create

* change(ui): default filters and events order

* change(ui): random data

* Dashboards redesign - improvments (#2313)

* Various minor style updates

* Various style improvements

* Update ExampleCards.tsx

* various minor improvements in dashbaords.

* revised dashboard widget header

* change(ui): sessions by user

* change(ui): funnel example

* change(ui): modal height and scroll

* change(ui): example cards with data

* change(ui): example cards with data

* change(ui): funnel bar text color

* change(ui): example cards overlay click

* change(ui): path analysis filter card

---------

Co-authored-by: Shekar Siri <sshekarsiri@gmail.com>
Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
2024-06-27 19:47:34 +02:00
Sudheer Salavadi
38ccea4e81 UI Improvements. 2024-06-27 23:07:06 +05:30
Shekar Siri
d958549d64 fix(ui): remove starting underscore from the metada which were added to avoid coflicting with existing filter keys 2024-06-27 19:35:41 +02:00
Kraiem Taha Yassine
094b3a7c06
Dev (#2319)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* feat(chalice): heatmaps select random session from shortest 20

* feat(chalice): save&update specific replay for heatmap-card
2024-06-27 19:14:36 +02:00
Shekar Siri
4b61e31ed4 fix(ui): card delete message showing twice 2024-06-27 18:36:54 +02:00
Shekar Siri
7aeb6e2ef0 fix(ui): enable weekly reports 2024-06-27 18:32:22 +02:00
Shekar Siri
8f643b18e4 change(ui): network request show full url 2024-06-27 18:26:47 +02:00
Shekar Siri
71aea9b0db change(ui): path analysis filter card 2024-06-27 18:15:06 +02:00
Shekar Siri
6f793582f6 change(ui): example cards overlay click 2024-06-27 18:05:50 +02:00
nick-delirium
e2593fe93b
feat ui: map of clicks for session 2024-06-27 18:02:51 +02:00
Shekar Siri
90c6b3b536 change(ui): funnel bar text color 2024-06-27 17:57:41 +02:00
Shekar Siri
0d8dcc1eca change(ui): example cards with data 2024-06-27 17:50:43 +02:00
Shekar Siri
29287c7e4d change(ui): example cards with data 2024-06-27 17:49:02 +02:00
Kraiem Taha Yassine
fa51d8caa1
Dev (#2318)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* feat(chalice): clickmaps&heatmaps
2024-06-27 17:21:57 +02:00
Kraiem Taha Yassine
5fc087abd9
Dev (#2316)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed saved card's sessions-drilldown
2024-06-27 16:28:34 +02:00
nick-delirium
2b9d38f858
fix ui: return clickmap to player 2024-06-27 16:07:36 +02:00
Shekar Siri
808526251e change(ui): modal height and scroll 2024-06-27 14:30:36 +02:00
Shekar Siri
0880ce0e20 change(ui): funnel example 2024-06-27 13:52:28 +02:00
nick-delirium
07ad63c88b
fix ui: fix max ws msg len 2024-06-27 13:31:05 +02:00
Alexander
d746e701b5 fix(backend): fixed an issue related to missing mobile sessions in CH 2024-06-27 13:05:02 +02:00
Alexander
2cd210fbaa fix(backend): fixed an issue in url_path builder 2024-06-27 13:00:23 +02:00
Shekar Siri
67cb461020 change(ui): sessions by user 2024-06-27 12:56:12 +02:00
Sudheer Salavadi
8b49be81b0
Dashboards redesign - improvments (#2313)
* Various minor style updates

* Various style improvements

* Update ExampleCards.tsx

* various minor improvements in dashbaords.

* revised dashboard widget header
2024-06-27 12:55:30 +02:00
Sudheer Salavadi
aad75771b3 Merge branch 'dashboards-redesign' of https://github.com/openreplay/openreplay into dashboards-redesign 2024-06-27 16:21:38 +05:30
Shekar Siri
9be31d80db change(ui): random data 2024-06-27 12:30:44 +02:00
Kraiem Taha Yassine
b6ba3aceb9
Dev (#2311)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* feat(chalice): get heatmap by sessionId
refactor(chalice): updated dependencies
refactor(alerts): updated dependencies
refactor(crons): updated dependencies
2024-06-27 12:17:07 +02:00
Shekar Siri
3fb41b63d3 change(ui): default filters and events order 2024-06-27 11:37:26 +02:00
Shekar Siri
03486d2f4f change(ui): fixed an issue with card create 2024-06-27 10:37:42 +02:00
Shekar Siri
a9dcdb6d16 change(ui): fixed an issue with card create 2024-06-27 10:25:03 +02:00
Sudheer Salavadi
01dac68214 revised dashboard widget header 2024-06-27 13:43:33 +05:30
Sudheer Salavadi
9ad4f31d08 various minor improvements in dashbaords. 2024-06-27 13:42:39 +05:30
nick-delirium
a8d5857e0f
fix ui: fix max ws msg len 2024-06-27 09:17:17 +02:00
Sudheer Salavadi
cf147ff47d
Various style updates in dashboards and other pages. (#2308)
* Various minor style updates

* Various style improvements

* Update ExampleCards.tsx
2024-06-26 19:16:29 +02:00
Sudheer Salavadi
06072caecb Update ExampleCards.tsx 2024-06-26 22:43:05 +05:30
Sudheer Salavadi
9629304e7b Merge branch 'dashboards-redesign' of https://github.com/openreplay/openreplay into dashboards-redesign 2024-06-26 22:42:14 +05:30
Shekar Siri
716e83d819 change(ui): insights card 2024-06-26 19:00:41 +02:00
Shekar Siri
7d2d4db21e change(ui): performance cards 2024-06-26 18:55:51 +02:00
Sudheer Salavadi
5b51755328 Various style improvements 2024-06-26 21:45:14 +05:30
Shekar Siri
f27680a89c change(ui): example categorize and other improvements 2024-06-26 18:09:27 +02:00
Shekar Siri
bd9aa50605 change(ui): example categorize and other improvements 2024-06-26 18:06:14 +02:00
Sudheer Salavadi
a7c3c68bcd Merge branch 'dashboards-redesign' of https://github.com/openreplay/openreplay into dashboards-redesign 2024-06-26 17:47:57 +05:30
Sudheer Salavadi
0064d6f111 Various minor style updates 2024-06-26 17:47:42 +05:30
Shekar Siri
4abed73219 change(ui): examples 2024-06-26 14:15:09 +02:00
Shekar Siri
1fa9698ecd change(ui): table card show more with modal 2024-06-26 13:49:04 +02:00
Shekar Siri
56a46b1ea5 change(ui): modal context and alert form 2024-06-26 11:50:31 +02:00
Shekar Siri
2ea07b045a change(ui): dashboard redesign 2024-06-26 10:13:06 +02:00
Shekar Siri
3b2c988e42 change(ui): dashboard redesign 2024-06-25 17:36:02 +02:00
Shekar Siri
3bfdc0e574 change(ui): dashboard redesign 2024-06-25 16:50:49 +02:00
nick-delirium
577734672d
fix ui: fix filter width to 280 2024-06-25 13:00:07 +02:00
nick-delirium
a71bafc17a
feat ui: filter by method in network panel 2024-06-25 12:59:10 +02:00
Delirium
6a42d96e21
Graphql plugin update (#1835) -- v1.19.0
* feat(tracker): relay + apollo plugins

* fix(tracker): type fixes

* fix(tracker): update mobs messages

* fix msg conflict
2024-06-25 10:13:13 +02:00
Kraiem Taha Yassine
3654dccec1
Dev (#2300)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* refactor(chalice): refactored insights

* feat(chalice): support funnels showing user-count
2024-06-24 15:53:00 +02:00
Delirium
960da9f037
Tracker 14.x.x changes (#2240)
* feat tracker: add document titles to tabs

* feat: titles for tabs

* feat tracker: send initial title, parse titles better

* feat ui: tab name styles

* feat tracker: update changelogs

* fix tracker: fix tests

* fix tracker: fix failing tests, add some coverage

* fix tracker: fix failing tests, add some coverage

* Heatmaps  (#2264)

* feat ui: start heatmaps ui and tracker update

* fix ui: drop clickmap from session

* fix ui: refactor heatmap painter

* fix ui: store click coords as int percent

* feat(backend): insert normalized x and y to PG

* feat(backend): insert normalized x and y to CH

* feat(connector): added missing import

* feat(backend): fixed different uint type issue

* fix tracker: use max scrollable size for doc

* fix gen files

* fix ui: fix random crash, remove demo data generator

* fix ui: rm some dead code

---------

Co-authored-by: Alexander <zavorotynskiy@pm.me>

* fix tracker: add heatmap changelog to tracker CHANGELOG.md

* fix tracker: fix peerjs version to 1.5.4 (was 1.5.1)

* fix document height calculation

* Crossdomain tracking (#2277)

* feat tracker: crossdomain tracking (start commit)

* catch crossdomain messages, add nodeid placeholder

* click scroll

* frame placeholder number -> dynamic

* click rewriter, fix scroll prop

* some docs

* some docs

* fix options merging

* CHANGELOG.md update

* checking that crossdomain will not fire automatically

* simplify func declaration

* update test data

* change clickmap document height calculation to scrollheight (which should be true height)

---------

Co-authored-by: Alexander <zavorotynskiy@pm.me>
2024-06-24 13:49:26 +02:00
Kraiem Taha Yassine
82d2023019
Dev (#2292)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-issues showing user-count

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count
2024-06-21 17:09:59 +02:00
Shekar Siri
05f7c33a85
change(ui): show ingest point (#2291) 2024-06-21 16:42:57 +02:00
Shekar Siri
e9c96521ab change(react-native): removed debug 2024-06-21 15:53:21 +02:00
Shekar Siri
df8322afe3 change(react-native-android): git details 2024-06-21 15:52:44 +02:00
Shekar Siri
09d6d987a5 change(react-native-android): lib version 2024-06-21 15:30:50 +02:00
Shekar Siri
403b28f2d9 change(ui): new cards 2024-06-21 15:21:19 +02:00
nick-delirium
f0f4ba0aa1
update rnt v 2024-06-21 15:01:22 +02:00
Delirium
50c63a23e8
Tn tracker android (#2289)
* change(android): added android support

* change(git): Remove .yarn from version control

* change(git): Remove .yarn from version control

* change(rn-tracker): android view fixes

* change(tracker): yarn

* fix rn: fix ios config for react native

* ios source changes

* change(lib): tracker manager

* change(lib): layout fixes

* change(lib): layout fixes

* fix default api endp

---------

Co-authored-by: Shekar Siri <sshekarsiri@gmail.com>
2024-06-21 14:57:49 +02:00
Kraiem Taha Yassine
7b6c02a955
Dev (#2288)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support predefined metric users-count

* feat(chalice): support timeseries of users-count

* refactor(sourcemap-uploader): refactored code
2024-06-21 14:26:18 +02:00
Kraiem Taha Yassine
fca98c8c85
Dev (#2286)
* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps
2024-06-19 18:49:07 +02:00
Shekar Siri
cb24dd4bb9 feature(ui): new dashboard modal 2024-06-17 14:29:43 +02:00
Shekar Siri
b0785d1435 feature(ui): new dashboard modal 2024-06-17 14:28:58 +02:00
Kraiem Taha Yassine
60af1214f6 fix(chalice): fixed multi-metadata support (#2275)
(cherry picked from commit 6190a6b495)
2024-06-13 14:43:00 +02:00
rjshrjndrn
22d1177eef chore(helm): Waiting for postgres to be up
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-13 13:15:04 +02:00
nick-delirium
7a95e071b3
fix ui: fix "open next session" shortcut 2024-06-13 10:09:40 +02:00
Taha Yassine Kraiem
415919a8fc fix(chalice): fixed create clickmap card & generate clickmap's chart 2024-06-12 15:52:47 +02:00
Kraiem Taha Yassine
c8be96dbdc fix(chalice): changed delete-metadata (#2268)
(cherry picked from commit 904d861bc2)
2024-06-12 12:11:21 +02:00
rjshrjndrn
60c27c7354 chore(dbops): Consider version with and without v
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-11 18:11:46 +02:00
rjshrjndrn
fb73dbc308 fix(helm): allow ingress class to be overriden
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-10 18:22:30 +02:00
Delirium
7a2f95d766
feat ui: new audio player for multiple tracks etc (#2261)
* feat ui: new audio player for multiple tracks etc

* fix ui: cleanup, fix speed control
2024-06-10 17:56:25 +02:00
Kraiem Taha Yassine
5574519775
V1.19.0 (#2260)
* refactor(DB): support of normalizedX&Y for click events

* refactor(chalice): upgraded dependencies
refactor(chalice): support heatmaps
2024-06-10 15:54:29 +02:00
Alexander
da1d9fb3ee feat(api): removed current audio implementation 2024-06-10 10:46:45 +02:00
nick-delirium
564d1eaa14
feat tracker: introduce more settings for canvas files 2024-06-07 17:16:01 +02:00
nick-delirium
87e7849f87
fix tracker: tracker v 13.0.1 2024-06-07 14:25:27 +02:00
rjshrjndrn
3ada8df028 chore(actions): force push the tag
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-07 14:11:26 +02:00
Shekar Siri
0f5b80fe97 change(ui): added missin const 2024-06-07 13:48:30 +02:00
nick-delirium
51e66271f6
feat ui: optimize canvas recording 2024-06-07 13:35:01 +02:00
nick-delirium
5db94fc172
feat ui: optimize canvas recording 2024-06-07 13:33:17 +02:00
rjshrjndrn
94510816d7 fix(actions): correct upstream name
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-06 23:57:09 +02:00
nick-delirium
9c97db75ab
fix ui: add wait cycle for canvas url 2024-06-06 17:45:54 +02:00
nick-delirium
d3f2c3e8b4
fix ui: fix mobile installation docs modal 2024-06-05 13:46:05 +02:00
nick-delirium
453053179d
fix ui: make login error more consistent 2024-06-05 11:53:00 +02:00
rjshrjndrn
9753456e72 respect platform arch 2024-06-04 19:36:45 +02:00
rjshrjndrn
ddeea33e70 fix(docker): remove hardcoded arch
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-04 19:36:39 +02:00
rjshrjndrn
663c7eb3a1 chore(build): Respect platform config 2024-06-04 19:36:30 +02:00
rjshrjndrn
b802b94081 fix(migrate): Race condition on version check
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-04 18:59:20 +02:00
nick-delirium
e3589a01f5
fix ui: apply local zone method for IST tz 2024-06-04 14:44:01 +02:00
Delirium
02cd4997de
fix ui: move confirm modal inside ant and store ctx providers (#2241) 2024-06-04 14:20:34 +02:00
rjshrjndrn
3aeea9a3b0 chore(tmux): dont close the pane
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-03 17:20:38 +02:00
rjshrjndrn
6c483ce01a fix(build): Parallel build
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-06-03 16:34:40 +02:00
nick-delirium
c1329d7014
fix ui: fix note creation sync 2024-06-03 14:19:09 +02:00
nick-delirium
dd4e8723bf
feat ui: finish cards, all trigger, all icons 2024-05-31 15:11:13 +02:00
nick-delirium
ac661524aa
fix ui: more different cards... 2024-05-31 15:11:13 +02:00
nick-delirium
b01a38ecc9
more cards 2024-05-31 15:11:11 +02:00
nick-delirium
e05f143812
feat ui: dashboards redesign start 2024-05-31 15:08:30 +02:00
Shekar Siri
c90b82e06f fix(ui): page reloads on wrong jwt in url 2024-05-31 14:42:43 +02:00
Kraiem Taha Yassine
d8a7ce70bf
refactor(DB): CH downgrade script (#2229) 2024-05-31 11:23:54 +02:00
Alexander
8c2bc773bb
Audio file support (#2228)
* feat(chalice): added basic audio file support

* feat(chalice): fixed audio.mp3 path
2024-05-31 09:31:30 +02:00
Alexander
3c3da5b584 feat(connector): added missing import 2024-05-30 16:38:13 +02:00
nick-delirium
ab3a82db4b
feat tracker: release tracker v13 2024-05-30 14:10:15 +02:00
nick-delirium
ae4357c71a
fix ui: console log 2024-05-30 14:01:52 +02:00
Kraiem Taha Yassine
721178413f
fix(chalice): sourcemaps upload (#2225) 2024-05-30 12:23:34 +02:00
rjshrjndrn
1ae48fa722 chore(build): Update build parallel script
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-30 11:09:51 +02:00
Shekar Siri
c4558fd619 change(ui): added android config in onboarding 2024-05-30 11:06:58 +02:00
nick-delirium
044e23f10a
fix ui: prefetching sessions from widgets fix 2024-05-29 18:24:48 +02:00
Alexander
92a636960a feat(backend): fixed an issue in feature flags conditions parser 2024-05-29 17:22:29 +02:00
nick-delirium
ff51e7b430
fix ui: fix mobile subheader, loader issues 2024-05-29 16:30:13 +02:00
nick-delirium
33e88ebf09
fix ui: fix sharing options slack/msteams selector 2024-05-29 15:22:39 +02:00
Alexander
400b3d2e61 feat(backend): added url_path inserts into CH 2024-05-29 13:25:33 +02:00
Kraiem Taha Yassine
e70c4bde04
fix(chalice): fixed clickmaps duplicate filters (#2221) 2024-05-29 12:55:06 +02:00
Kraiem Taha Yassine
2209d29c6b
fix(chalice): fixed clickmaps duplicate filters (#2219) 2024-05-29 12:35:39 +02:00
nick-delirium
52ca86a706
fix ui: event icons fix 2024-05-29 09:57:20 +02:00
Shekar Siri
ea6c957cc9 change(api): tags creation allow escaped cahracters for name 2024-05-28 18:28:59 +02:00
Shekar Siri
85325334e6 fix(ui): next button disabled 2024-05-28 17:23:58 +02:00
nick-delirium
1d31900c9f
fix ui: fixes for permissions in assist and devtools 2024-05-28 17:22:29 +02:00
rjshrjndrn
aff49b5390 fix(cli): version patch
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 17:04:20 +02:00
Shekar Siri
861de2d59d change(ui): version tag from api 2024-05-28 16:42:44 +02:00
nick-delirium
962ceedfe7
fix ui: random logs 2024-05-28 16:41:21 +02:00
Shekar Siri
decb7dd9fe change(ui): version tag from api 2024-05-28 16:33:13 +02:00
Kraiem Taha Yassine
6126d0dc6e
fix(chalice): fixed SSO missing query string (#2217) 2024-05-28 16:01:20 +02:00
rjshrjndrn
a6dab15a0d chore(cli): Unified version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 15:56:47 +02:00
rjshrjndrn
b1fa7f1fd5 chore(helm): Proper commenting
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 15:46:57 +02:00
nick-delirium
7166daee05
fix ui: safeguard around prefetched mob keys 2024-05-28 15:46:08 +02:00
rjshrjndrn
95b8e9656f chore(helm): Proper commenting
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 15:43:39 +02:00
rjshrjndrn
775fa9944d chore(cli): After upgrade, patch the version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 15:37:33 +02:00
nick-delirium
1e0349310c
fix ui: remove bugreport pdf module, add module setting to records 2024-05-28 15:03:18 +02:00
nick-delirium
947fd07d51
fix ui: fix recording display 2024-05-28 14:52:26 +02:00
Alexander
6c2cf59f40 feat(peers): fixed logger import issues 2024-05-28 12:13:08 +02:00
rjshrjndrn
15bcb90417 chore(install): Improved array splitting for kafka
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 12:03:39 +02:00
rjshrjndrn
490c12cc5d feat(install): Passing same tag for db upgrade
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 11:50:22 +02:00
rjshrjndrn
c4dc704c9e chore(docker): docker build unpinning docker version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-28 11:27:32 +02:00
Delirium
9b143eb98f
feat tracker: socket only mode (EE) (#2216)
* feat tracker: socket only mode

* fix ui: hide timeline for live sessions if socket only

* feat tracker: socket mode sync with backend, add flag onstart

* feat tracker: keep socket mode
2024-05-28 10:51:39 +02:00
Alexander
1bde463877 feat(assist): fixed logger import issues 2024-05-28 10:21:05 +02:00
Alexander
b92177a151
Assist-only feature (#2214)
* feat(http): small prep for task implementation

* feat(http): added assist-only check to ee

* feat(backend): using a new license check url

* feat(backend): packages upgrade
2024-05-28 09:41:16 +02:00
rjshrjndrn
07a93ba63a actions: fix templting 2024-05-27 15:30:02 +02:00
Shekar Siri
1f9019a103
change(ui): path analysis clear filter (#2207) 2024-05-27 15:03:30 +02:00
Alexander
45655a9608 feat(assist): count a search filters for full match results only 2024-05-27 15:02:53 +02:00
Kraiem Taha Yassine
7eae4d660d
refactor(chalice): upgraded dependencies (#2208)
refactor(alerts): upgraded dependencies
refactor(crons): upgraded dependencies
2024-05-27 14:54:52 +02:00
rjshrjndrn
c94c846f8b chore(helm): Adding connector chart
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-27 12:51:17 +02:00
Delirium
5b48d391d5
feat tracker: open peer connection dynamically on call (#2197)
* feat tracker: open peer connection dynamically on call

* feat ui: move agent name trigger above peer init

* fix ui: adjust max amount of reconnections to wait for peer init
2024-05-24 17:43:22 +02:00
Delirium
297be2bc9c
feat ui/tracker: add compression to assist plugin (#2186)
* feat ui/tracker: add compression to assist plugin

* fix: changelog, package.json changes etc

* feat tracker: split big batches in addition to compression
2024-05-24 16:49:48 +02:00
Kraiem Taha Yassine
62a3078c22
refactor(DB): change url_path to column instead of materialized column (#2202) 2024-05-24 16:02:16 +02:00
nick-delirium
587cde2804
fix ui: fix e2e snapshots (updated to new player ui) 2024-05-24 10:30:46 +02:00
nick-delirium
2522ff29ec
fix ui: fix tracker testing package 2024-05-24 10:07:51 +02:00
Alexander
55b6cd7dcd feat(db): insert full url to pages table 2024-05-24 09:42:27 +02:00
Alexander
17d7f127bb Revert "feat(db): insert url path to CH pages table"
This reverts commit dee1ef1618.
2024-05-24 09:40:04 +02:00
Alexander
dee1ef1618 feat(db): insert url path to CH pages table 2024-05-24 09:27:42 +02:00
Alexander
993b6b58ab
feat(backend): added utm data to PG (#2152)
* feat(backend): added utm data to PG

* feat(backend): added utm data to CH

* feat(db): removed nullableString() calls
2024-05-24 08:33:28 +02:00
nick-delirium
60561da3c9
fix ui: add fileread finally to EFS loader 2024-05-23 18:03:45 +02:00
Alexander
4c96cbcef3 feat(connector): added new events + projectID filter 2024-05-23 12:09:59 +02:00
rjshrjndrn
a4577300a2 fix(actions): Always sort tags using name
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-23 11:25:39 +02:00
rjshrjndrn
a9f1743c0b chore(cli): Exposing OR backups systemwide
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-23 11:10:15 +02:00
Alexander
de9ffeb6a9 feat(connector): added s3 connector + small improvements 2024-05-22 15:23:45 +02:00
nick-delirium
bdcde733a9
feat ui: fix tabclosemanager state reset 2024-05-22 13:29:14 +02:00
nick-delirium
92353e4c49
fix ui: fix saved search modal scrolling 2024-05-21 16:03:45 +02:00
nick-delirium
58b0c53569
fix ui: integration tooltip fix 2024-05-21 15:48:40 +02:00
Delirium
ccaa67ae7a
fix ui: remove bugreport modal code (#2198) 2024-05-21 14:22:14 +02:00
nick-delirium
dacbb8aa54
fix ui: update bookmark icon for session subh 2024-05-21 14:05:51 +02:00
nick-delirium
fcfd55f35d
fix ui: hide some debug to window array 2024-05-21 11:28:16 +02:00
nick-delirium
bc4947b486
fix ui: fix iframe node onload crash 2024-05-21 11:14:01 +02:00
Shekar Siri
122ecfe72a change(ui): pagination input width 2024-05-10 18:27:56 +02:00
nick-delirium
f73e04e557
fix ui: fix usability test description check 2024-05-10 16:38:27 +02:00
rjshrjndrn
6781235838 chore(assist): Increasing websocket timeout
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-05-08 23:18:45 +02:00
Shekar Siri
b49dded9ca fix(ui): session clickmaps added sessionId in paylaod 2024-05-07 16:35:40 +02:00
nick-delirium
81fdca2d33
feat ui: fixing OR-465 cleanup crash 2024-05-07 16:14:43 +02:00
Shekar Siri
318edb3b16 fix(ui): module toggle status 2024-05-07 15:36:09 +02:00
Shekar Siri
9624356210 change(ui): icons for utm filters 2024-05-07 14:44:19 +02:00
Shekar Siri
6f32e2c582 change(ui): lucide icons global stroke width 2024-05-07 13:57:25 +02:00
Shekar Siri
e50c0c7562 change(ui): added utm filters 2024-05-07 13:52:45 +02:00
Kraiem Taha Yassine
43854675bd
refactor(DB): added more indexes (#2173) 2024-05-06 18:06:55 +02:00
Taha Yassine Kraiem
4b2ec5f4e8 fix(chalice): fixed insights with platform filter 2024-05-06 14:41:54 +02:00
Taha Yassine Kraiem
82bd4f9dad fix(chalice): fixed table of error with platform filter for EE-PG 2024-05-03 17:53:33 +02:00
Kraiem Taha Yassine
19747c97f1 fix(chalice): fixed table of error with platform filter (#2161)
(cherry picked from commit 0295fb26cb)
2024-05-03 17:45:29 +02:00
nick-delirium
0f872e3b9e
fix ui: change searchbar margin to 1280 trigger 2024-05-02 16:43:12 +02:00
nick-delirium
05b7154865
fix ui: fix player context menu icon size 2024-05-02 16:39:56 +02:00
nick-delirium
89d76c3b98
fix ui: fix notes loading 2024-05-02 16:39:09 +02:00
nick-delirium
f574746b37
fix ui: fixes for search bar buttons, filter spacing 2024-05-02 16:37:03 +02:00
Kraiem Taha Yassine
9dcd8a4d15 fix(chalice): changed SSO and added logs (#2155)
(cherry picked from commit 046e850a65)
2024-05-02 14:04:05 +02:00
nick-delirium
1725152676
fix ui: remove options menu for bookmarked sessions 2024-05-02 10:34:42 +02:00
nick-delirium
eaa4613f4b
fix ui: fix onboarding ai popup 2024-05-02 10:18:50 +02:00
nick-delirium
df490099f4
fix ui: fix country mapping 2024-04-30 17:15:36 +02:00
nick-delirium
a32155efc3
fix ui: reformat old files (saas consistency) 2024-04-30 16:44:20 +02:00
nick-delirium
2e65173e9a
fix ui: fix note tags rendering, fix player note opening 2024-04-30 15:50:44 +02:00
Delirium
8578180d5f
Fix integrations icons (#2149)
* fix ui: fix icons for integrations

* fix ui: fix note integrations count fetcher
2024-04-29 16:10:18 +02:00
Alexander
24d15db93b
Assist counter for search filters (#2148)
* feat(assist): added filter's counter

* feat(assist): fixed panic
2024-04-29 15:37:24 +02:00
nick-delirium
5c0974fbba
fix tracker: 12.0.12 with some fixes for network proxy 2024-04-29 13:11:05 +02:00
nick-delirium
3e0ced0237
feat ui: omnisearch testing 2024-04-26 17:37:17 +02:00
nick-delirium
336084a9f3
fix ui: fix cmd click on sess play icon (new tab) 2024-04-26 14:54:28 +02:00
Kraiem Taha Yassine
b789496a3a
fix(DB): added missing user_device_type (#2143) 2024-04-26 13:43:22 +02:00
Kraiem Taha Yassine
761d7a6748
Dev (#2142)
* fix(chalice): fixed sourcemaps URL

* refactor(chalice): added 'noindex' header to prevent API indexing
2024-04-26 11:04:11 +02:00
Kraiem Taha Yassine
c06620248c
fix(chalice): fixed sourcemaps URL (#2140) 2024-04-25 19:24:04 +02:00
nick-delirium
10affab557
fix ui: change tags icons 2024-04-25 17:50:38 +02:00
Kraiem Taha Yassine
19e7a3aef5
refactore(sourcemaps-reader): changed logger (#2139) 2024-04-25 17:31:48 +02:00
nick-delirium
ef28bfc8f9
fix ui: speed up mob processing, potentially fix worker restart on unauth 2024-04-25 16:54:21 +02:00
Kraiem Taha Yassine
2ca84c397f
refactore(sourcemaps-reader): changed logger (#2138)
refactore(sourcemaps-reader): upgraded dependency
refactore(sourcemaps-reader): changed dev script
2024-04-25 16:33:10 +02:00
nick-delirium
44ffbd5412
fix ui: fix mockup api route 2024-04-25 15:42:48 +02:00
Delirium
f033cbd12f
fix ui: fixes for segment comp + ui mockup (#2137)
* fix ui: fixes for segment comp

* feat ui: some ai testing mockup
2024-04-25 15:28:12 +02:00
Alexander
d1c4ba496d feat(backend): changed licence verification url 2024-04-25 13:56:29 +02:00
Kraiem Taha Yassine
91fbaeeef6
refactor(chalice): optimised error details query (#2136) 2024-04-25 13:09:51 +02:00
Kraiem Taha Yassine
33ef2c06b3
refactor(chalice): refactored errors (#2135) 2024-04-25 12:46:26 +02:00
Delirium
8251aecede
fix tracler: improved logs for node binding errors, full nodelist clear before start, state check, getSessionInfo method
* fix tracker: some extra debug logs and safety around node mapping

* fix tracker: some extra debug logs and safety around node mapping

* white spaces

* cleanup

* new fifo scheduler

* node clearing and start check

* new sess info method, better session start logging

* snippet beta
2024-04-25 10:09:30 +02:00
Delirium
b33261914d
fix ui: some fixes for filters ui, playicn hover, etc
* fix ui: some fixes for filters ui, playicn hover, etc

* remove focus styles for inputs in search
2024-04-25 10:04:30 +02:00
Kraiem Taha Yassine
8e17eb6514
Dev (#2131)
* fix(sourcemap-reader): added missing dependency

* fix(dependencies): added missing dependency

(cherry picked from commit 40ecb33327)

* fix(dependencies): added missing dependency
2024-04-24 16:52:37 +02:00
MauricioGarciaS
7ffcf79bf6
chore(recommendations): python modules updated and added airflow dag to save sessions features (#1979)
* fix(trainer): Updated requirements

* fix(recommendations): Downgraded pydantic to 1.10.12 and mlflow to 2.5

* Updated dag for updating database with feedbacks, changed feedback file from ml_service/core into common core

* fix(recommendations): fixed database update and added more features into DB

* Updated modules in recommendations trainer and server

* chore(recommendations): Updated python modules for trainer. Added script to save features from feedback sessions into ml database.

* updated requirements

* updated requirements
2024-04-24 15:10:18 +02:00
Kraiem Taha Yassine
76c3ed9966
refactor(chalice): use format instead of % for sourcemaps-url (#2128) 2024-04-24 15:05:57 +02:00
Kraiem Taha Yassine
29ee1cbb1f
refactore(sourcemaps-reader): upgraded dependencies (#2127)
refactore(sourcemaps-reader): support AWS access role
2024-04-24 14:45:54 +02:00
nick-delirium
04240ce9b3
fix ui: fix chrome crash code11 2024-04-24 14:17:38 +02:00
nick-delirium
49e35cb329
feat(ui): hotfix for chrome crashes 2024-04-24 11:19:22 +02:00
Delirium
4444ecf6e0
Sess header fixes (#2124)
* feat ui: cross dead tabs, some ui fixes

* ? lost changes?
2024-04-24 09:39:50 +02:00
Delirium
690ec9bf34
Sess header fixes (#2122)
* fix ui: fixes for session list header

* same for notes

* console
2024-04-23 16:15:00 +02:00
Delirium
398041de16
fix ui: make date selection smaller in assist stats (#2121) 2024-04-23 12:00:38 +02:00
Kraiem Taha Yassine
7a7ecf8e56
refactor(chalice): check refreshToken cookie's existence (#2110)
* refactor(chalice): check refreshToken cookie's existence

* refactor(chalice): debug authorizer
refactor(chalice): configurable JWT_LEEWAY
2024-04-22 17:06:24 +02:00
Delirium
475b343df4
fix ui: no audio sync closing on reset; improve delta calc (#2119)
* fix ui: no audio sync closing on reset; improve delta calc

* fix ui: move zoom button to xray
2024-04-22 15:25:34 +02:00
Delirium
555e6836f6
feat ui: improve audio addon look and style (#2118) 2024-04-22 14:38:18 +02:00
Shekar Siri
394b5ea404 fix(ui): include credentials for fetch request to address the refresh token issue 2024-04-19 18:13:27 +02:00
Delirium
52d5127d8d
feat ui: support additional audio files (#2112) 2024-04-19 17:30:17 +02:00
Delirium
07f64ebcae
feat ui: android player shell and autoscaler (#2111)
* feat ui: android player shell and autoscaler

* code style
2024-04-19 16:51:12 +02:00
Kraiem Taha Yassine
ed6b24b26b
fix(chalice): replaced ’ with ' (#2109) 2024-04-19 15:09:19 +02:00
Delirium
0228e6cadb
fix ui: fix mobile prefetching (#2107) 2024-04-19 09:07:20 +02:00
Kraiem Taha Yassine
ac5f4654a8 fix(chalice): deduplicate viewed-sessions (#2105)
(cherry picked from commit 0c5f8b4d20)
2024-04-18 15:41:55 +02:00
Alexander
035d116fb2 feat(backend): insert click's selector into CH 2024-04-18 13:08:33 +02:00
Delirium
4c6bfb5288
fix ui: change hover prefetch to sess item from play link (#2104) 2024-04-17 17:21:17 +02:00
Kraiem Taha Yassine
02c0ed6a12
refactor(chalice): refactored sessions_replay code (#2103)
fix(chalice): support mobile changes in EE
fix(chalice): support first-mob in EE
2024-04-17 16:52:40 +02:00
Delirium
c33a10ded0
fix ui: fix pagination and timeline duration (#2102) 2024-04-17 16:07:36 +02:00
Delirium
25bd7ce297
feat ui: add options to metric list (#2101) 2024-04-17 13:40:28 +02:00
Alexander
872d50671b
feat(chalice): added a new endpoint for pre-replay (pre-signed url for a first mob file) (#2100) 2024-04-17 12:38:14 +02:00
Delirium
ceb714617e
feat ui: prefetch mobfiles on hover, use prefetched if exist (#2098) 2024-04-17 09:03:50 +02:00
Kraiem Taha Yassine
156e1f94d6 fix(chalice): fixed update JIRA integration (#2096)
fix(chalice): fixed JIRA URL validation
fix(chalice): fixed add/update JIRA token

(cherry picked from commit 256971304d)
2024-04-16 15:17:12 +02:00
Alexander
cff78745a0 feat(chalice/ee): fixed wrong import name 2024-04-16 14:47:30 +02:00
Delirium
a32177dd0f
fix ui: update zustand doc (#2095) 2024-04-16 14:33:02 +02:00
Delirium
3703c62829
feat ui: change session sort header to ant ui design (#2094) 2024-04-16 14:25:39 +02:00
Delirium
e99dd48ca3
feat ui: some utx improvements (#2092) 2024-04-16 13:49:18 +02:00
Delirium
473aae1b4a
fix ui: remove always open menu (#2091) 2024-04-16 11:36:04 +02:00
Delirium
de929dc5ea
fix ui: fix projects dropdown styles (#2090) 2024-04-16 11:33:29 +02:00
Kraiem Taha Yassine
71c6bdeb64 fix(chalice): fixed clickmap events filter (#2088)
(cherry picked from commit e721ee6fc5)
2024-04-15 19:20:28 +02:00
Alexander
94f0277724
feat(chalice): ios->mobile renaming (#2084) 2024-04-15 16:18:21 +02:00
Delirium
911f86530e
fix ui: remove trash icon for non existent search (#2087) 2024-04-15 16:06:49 +02:00
Delirium
d008b65ac0
feat ui: remake cobrowse subtabs (#2086) 2024-04-15 15:37:15 +02:00
Kraiem Taha Yassine
217201eb5c
Dev (#2085)
* refactor(chalice): upgraded dependencies
refactor(chalice): refactored code

* feat(chalice): support android sessions
2024-04-15 15:03:02 +02:00
Kraiem Taha Yassine
c56c4595b8
refactor(chalice): upgraded dependencies (#2083)
refactor(chalice): removed python-multipart dependency
2024-04-15 11:23:40 +02:00
Kraiem Taha Yassine
00b1f56edb
fix(chalice): fixed missing env-var (#2082) 2024-04-15 11:04:37 +02:00
Alexander
2bf9298836
Mobile renaming (protocol + backend) (#2078)
* feat(backend): renamed ios to mobile

* feat(backend): added missing changes to iterator

* feat(backend): added missing changes to ender

* feat(backend): as usual auto deleted import in ch connector

* feat(backend): updated ee/conditions func calls
2024-04-12 09:30:24 +02:00
Delirium
a316c90472
fix ui: fix for sorting (#2077) 2024-04-11 17:29:43 +02:00
Delirium
64cde1fb7c
feat ui: highlight current event plus fix scroll (#2076)
* feat ui: highlight current event plus fix scroll

* change icon styles

* saas fix

* rm cons
2024-04-11 15:38:38 +02:00
Delirium
b8ed5c5d9e
fix ui: fix canvas replay manager, fix mob sorting (#2071)
* fix ui: fix canvas replay manager, fix mob sorting

* fix whitespaces
2024-04-10 16:28:16 +02:00
rjshrjndrn
67fc534414 chore(ci): Always rebase on main
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-10 12:49:10 +02:00
Kraiem Taha Yassine
3601147da1
fix(chalice): support issues step-filters and tab-filters at the same… (#2065)
* fix(chalice): support issues step-filters and tab-filters at the same time

* fix(chalice): support issues step-filters and tab-filters at the same time
2024-04-09 15:31:12 +02:00
Alexander
327c157be2 feat(build): updated go.sum 2024-04-09 14:59:15 +02:00
Alexander
bdb3f37c56 feat(backend): added es connector 2024-04-09 14:58:47 +02:00
Delirium
5421aedfe6
move redux plugin hashing to worker thread, update redux panel look and style
* feat tracker moving redux stuff to worker thread

* feat ui: sync redux messages to action time

* feat ui: starting new redux ui

* fix backend mob gen

* feat tracker moving redux stuff to worker thread

* feat ui: sync redux messages to action time

* feat ui: starting new redux ui

* fix backend mob gen

* styles, third party etc

* rm dead code

* design fixes

* wrapper around old redux stuff

* prettier

* icon sw

* some changes to default style

* some code style fixes
2024-04-09 14:47:31 +02:00
Kraiem Taha Yassine
d58a356f1f
refactor(chalice): delete global session notes (#2064) 2024-04-09 13:52:05 +02:00
Kraiem Taha Yassine
db72a079e4
refactor(chalice): changed JWT_REFRESH_EXPIRATION default value (#2062) 2024-04-09 10:13:55 +02:00
rjshrjndrn
c8e5319ff4 fix(ci): Build ee
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-08 17:57:31 +02:00
rjshrjndrn
5ecd18d9cf chore(ci): Adding debug logs
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-08 17:57:19 +02:00
Kraiem Taha Yassine
d300854725
fix(chalice): fixed funnels negative-filter's operators (#2061) 2024-04-08 17:48:56 +02:00
Kraiem Taha Yassine
c258d6f6a7
fix(chalice): fixed 1 stage results VS multi-stages result (#2060) 2024-04-08 16:59:45 +02:00
Delirium
3807ebbaea
fix ui: fix reader byte skipping, add pause on css loading screen (#2058) 2024-04-08 16:54:19 +02:00
Shekar Siri
de402d4695 change(ui): fullView param to restrict to player content 2024-04-08 16:50:28 +02:00
Kraiem Taha Yassine
80a9c416da
fix(chalice): fixed cards-table error (#2057) 2024-04-08 14:58:34 +02:00
Alexander
486a7115d7 feat(backend): added session's screen width/height to PG 2024-04-08 13:49:29 +02:00
Kraiem Taha Yassine
b5d0770052
fix(chalice): fixed table of URLs-values not filtered according to the specified sessions' filters CH (#2055) 2024-04-08 12:58:37 +02:00
Kraiem Taha Yassine
e4c120ba60
feat(DB): added screen_width & screen_height (#2054) 2024-04-08 11:41:17 +02:00
Delirium
bb09e59bf4
fix tracker move batch debug to query param (#2052) 2024-04-08 09:42:23 +02:00
rjshrjndrn
60483499ee fix(ci): build image tags
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-06 15:06:03 +02:00
rjshrjndrn
5fccdf4d02 fix(patch): proper commit id
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-06 14:56:55 +02:00
rjshrjndrn
ef891cb0b1 ci(patch): Adding follow up job trigger in description
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-06 13:10:08 +02:00
Rajesh Rajendran
f44deab77b
actions: build patch for main branch (#2047)
* ci(actions): For GH patching

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): Pushing the changed code to a new branch

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(ci): Skipping bulds for chalice and frontend arm builds

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): Build msaas

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): Removed unnecessary steps

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): Proper name

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(ci): Sevice names

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): Fixes

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* actions: limit actor

* chore(release): Updated version to v1.18.0

* Enable AWS ecr auth

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(ci): fixes

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(patch): Update tag with main

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* chore(ci): Remove debug job

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-06 12:56:21 +02:00
Kraiem Taha Yassine
e455bcb688
Dev (#2046)
* refactor(chalice): upgraded dependencies

* fix(chalice): fixed table of URLs-values not filtered according to the specified sessions' filters
2024-04-05 18:32:27 +02:00
Alexander
5bf4ee265f feat(chalice): fixed typo in get_events 2024-04-05 17:50:32 +02:00
Alexander
f7d9f18681 feat(chalice): added support for android events 2024-04-05 17:45:49 +02:00
Delirium
1efc757eb4
fix ui: fix beta tag (#2045) 2024-04-05 17:43:55 +02:00
Alexander
ab0f3659f6 feat(chalice): added support for android replays 2024-04-05 17:32:26 +02:00
Delirium
7719bb253e
fix ui: fix player platform check (#2044) 2024-04-05 17:23:07 +02:00
Alexander
daddedebcc feat(backend): fixed an issue with no mobile replays for android tracker 2024-04-05 17:00:45 +02:00
Alexander
54156fc81d feat(backend): moved batch info to query param 2024-04-05 16:46:02 +02:00
Delirium
8003de2627
feat ui: ai widgets (#2043) 2024-04-05 15:22:22 +02:00
Alexander
37276006fb feat(backend): added missing mobile log 2024-04-05 14:54:48 +02:00
Delirium
9ee4e4d0aa
fix ui: fix thermal condition value type (#2042) 2024-04-05 11:22:46 +02:00
Delirium
6df9458f6c
fix ui: fix conditional filters modal (#2041) 2024-04-05 11:20:09 +02:00
Delirium
c1b2e0afe0
fix ui - some small bug fixes (#2040) 2024-04-05 11:15:19 +02:00
Delirium
44d934e956
Ios conditions (#2039)
* feat(ui): condition set for mobile

* feat(ui): more filters for mobile, auto recognize mobile projects

* feat(ui): add memoryUsage filter for ios

* fix(ui): fix up filter name

* fix(ui): lost files

* fix(ui): cast filter value to string?

* feat(ui): condition set for mobile

* feat(ui): more filters for mobile, auto recognize mobile projects

* feat(ui): add memoryUsage filter for ios

* fix(ui): fix up filter name

* fix(ui): lost files

* fix(ui): cast filter value to string?
2024-04-05 11:05:08 +02:00
Delirium
eaadcf4604
test (#2038) 2024-04-05 09:48:16 +02:00
Alexander
75ccacf576 feat(backend): added missing sessionID to log in start request + batch info 2024-04-05 09:42:55 +02:00
Delirium
e5929e9818
feat ui: add funnel bar focusing for issues (#2037) 2024-04-04 17:53:49 +02:00
Kraiem Taha Yassine
7d82b4a04c
Dev (#2036)
* fix(chalice): fixed vault with exp_search

* refactor(chalice): enhanced CH exception handler
2024-04-04 17:40:17 +02:00
Delirium
897ea18f57
fix tracler: safer error logging on start (#2034) 2024-04-04 10:34:26 +02:00
Delirium
3733dac781
fix tracker: improve logging, add batch num to network ingest (#2033) 2024-04-04 10:20:16 +02:00
rjshrjndrn
c8f4d9d060 chore(helm): Disable minio lifecycle by default
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-03 19:56:55 +02:00
rjshrjndrn
d9f88e049c chore(helm): new header for tracker
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-03 17:28:00 +02:00
Alexander
f7744a0c2c
Mob split (#2015)
* feat(backend): try to split mob files by ts

* feat(backend): removed debug code and used worker pool
2024-04-03 17:10:44 +02:00
rjshrjndrn
a8e3f088bd chore(build): Frontend build.sh source lib
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-04-03 13:16:02 +02:00
Delirium
8c773ab529
fix ui make spacing between player controls smaller (#2032) 2024-04-03 13:02:53 +02:00
Delirium
ad5d9302db
fix mobs reader template fix (#2031) 2024-04-03 12:34:12 +02:00
Delirium
0bc01c45c6
fix ui remove random logs (#2029) 2024-04-03 12:17:59 +02:00
Delirium
f81fd1f6c0
fix ui reader remove second skip on unfinished mobfile (#2028) 2024-04-03 12:11:59 +02:00
Delirium
0912c4fb57
Xhr open catch (#2023)
* fix tracker fix xhr open event without url object

* fix fix up for url objects

* beta v up

* feat ui add dnd to event filters in search and dashboards (#2024)

* feat ui add dnd to event filters in search and dashboards

* rm console

* fix tracker fix xhr open event without url object

* fix fix up for url objects

* beta v up
2024-04-03 11:09:33 +02:00
Delirium
edc068ce09
fix tracker speed up redux plugin hashing (#2027)
* feat tracker update redux plugin to speed up state hashing

* feat tracker update redux plugin to speed up state hashing
2024-04-03 11:07:29 +02:00
PiR
c17dd3c227
Fix tracker do not throw AbortError (#2022)
* fix(tracker): patch network error handling

* fix(fetchProxy): remove remaining void operator
2024-04-03 10:25:16 +02:00
Alexander
5356d72417 feat(backend): tmp print screen size in logs 2024-04-02 17:43:13 +02:00
Alexander
eb3952666e feat(backend): moved mobile screen size to browser version 2024-04-02 17:35:37 +02:00
Delirium
44574016bc
feat ui add dnd to event filters in search and dashboards (#2024)
* feat ui add dnd to event filters in search and dashboards

* rm console
2024-04-02 16:53:27 +02:00
Delirium
e4a1037e3d
fix ui fix mob index check (#2021)
* fix ui fix mob index check

* rm console
2024-04-02 16:12:11 +02:00
Delirium
c69d1fe00e
feat tracker update zustand plugin for better ts support (#2020) 2024-04-02 15:56:29 +02:00
Delirium
c70c164d1d
fix ui remove debounce from ai search request (#2019) 2024-04-02 13:19:38 +02:00
Delirium
3ba797f6c6
fix ui no decimals for zoom requests (#2016) 2024-03-29 17:21:47 +01:00
Kraiem Taha Yassine
db059f2a1e
fix(chalice): fixed mouse_thrashing title (#2014) 2024-03-29 11:22:51 +01:00
Delirium
218ef93407
fix ui filter icon fill on hover (#2013) 2024-03-29 09:54:38 +01:00
Taha Yassine Kraiem
92517061ee fix(chalice): fixed funnels drill-down query 2024-03-28 17:04:23 +01:00
Delirium
35ae7474a7
fix ui rm duplicate console option from overlay (#2012) 2024-03-28 16:35:48 +01:00
Delirium
e747551246
fix ui update autoselect, allow to select inputted value (#2011)
also fix for inputs inside player
2024-03-28 16:33:42 +01:00
Delirium
9c3493cf87
feat ui update search filter icons (#2010) 2024-03-28 15:46:31 +01:00
Alexander
2ac3d38078 feat(backend): support s3 connection without creds 2024-03-28 12:30:00 +01:00
Delirium
19de9067e0
feat(tracker): allow network sanitizer to return null (skipping msg) (#2009) 2024-03-28 12:29:08 +01:00
Alexander
ed6e09ec6d feat(assist): new logs format 2024-03-28 12:28:04 +01:00
nick-delirium
01632575a2
fix: remove orphan submodule hash 2024-03-28 12:16:11 +01:00
Delirium
dfac6f32fb
fix ui fix onboarding sidemanu and sidemodules (#2006)
* fix(ui): fix onboarding side menu

* Removed submodule ee/intelligent_search/llama
2024-03-28 11:36:47 +01:00
Delirium
3d30010a4e
fix ui add border around search plus animation (#2005)
* fix ui add border around search plus animation

* code style
2024-03-27 17:08:26 +01:00
Shekar Siri
f2e9876802 fix(ui): account settings with modules 2024-03-27 17:07:53 +01:00
Delirium
886ec45b7e
fix ui reset filters on site id change (#2004) 2024-03-27 16:16:36 +01:00
Delirium
5556568fd3
fix ui timeline state reset on component destruction (#2003) 2024-03-27 15:55:44 +01:00
Delirium
7ea4523f20
fix ui - second batch of ui fixes (#2002) 2024-03-27 14:59:23 +01:00
rjshrjndrn
3d5c98c7a1 feat(helm): Ability to change the retention on hours
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-26 18:41:50 +01:00
Delirium
6de2168d92
fix ui batch of small fixes for notes, controls, shortcuts (#2001) 2024-03-26 15:54:10 +01:00
rjshrjndrn
e84aac012e chore(helm): reducing default retention to 1day
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-26 15:50:59 +01:00
rjshrjndrn
aca0213fcf feat(helm): Override the tmp directory path 2024-03-26 15:50:27 +01:00
Delirium
8b0054afb7
fix ui - change tag filter operator labels (#2000) 2024-03-26 15:31:03 +01:00
Delirium
eb18d2ee6f
fix ui change summary button style (#1999) 2024-03-26 15:00:09 +01:00
Delirium
836deeaeaa
fix ui change playback buttons height (#1998) 2024-03-26 14:54:05 +01:00
Delirium
b459802851
fix ui change time popup to button behavior (#1997) 2024-03-26 14:43:03 +01:00
Delirium
ebd77ea793
fix(ui): move shortcuts to modal (#1996) 2024-03-26 14:29:29 +01:00
Delirium
d0ec589ecb
fix ui - design issues fixes (#1995) 2024-03-26 12:59:49 +01:00
Delirium
d7b79475a4
fix(ui): fix player file waiting (#1994) 2024-03-25 17:43:20 +01:00
Delirium
8b52432a9a
fix(ui): onboarding design fixes (#1993)
* fix(ui): onboarding design fixes

* more stuff

* some assist details and options
2024-03-25 16:27:51 +01:00
Delirium
21c312f98b
fix(ui): fix multiview window size (#1991) 2024-03-25 13:53:58 +01:00
Delirium
dee3daa58a
fix(ui): fix note create modal from context menu (#1990) 2024-03-25 13:39:42 +01:00
Delirium
3ea8dd8d89
fix(ui): small bugs (#1989) 2024-03-25 13:30:34 +01:00
Delirium
7d38608b22
fix(ui): small fixes for player redesign (#1988) 2024-03-25 12:03:58 +01:00
Delirium
3e1415eded
fix(ui): don't prevent default keyboard behavior unless its player shortcut (#1987) 2024-03-25 09:50:19 +01:00
Alexander
8c84fd6550 feat(backend): added new fields to mobile start request 2024-03-25 09:14:00 +01:00
Delirium
80f0005362
feat(ui): timeline zoom (#1982)
* feat(ui): timeline zoom

* stable draggable markers

* integrate zoom into panels, ready up ai stuff for zoom

* tabs for ai, slider styles

* fixes for zoom tabs

* code style
2024-03-22 15:17:46 +01:00
Alexander
d2cabcdb54 feat(backend): moved file tagging feature to EE 2024-03-22 14:10:13 +01:00
Delirium
96453e96e5
feat ui: change in player controls, move ai summary button, refactor old code etc (#1978)
* feat(ui): rework for player look

* remove unused code

* move summary button and block inside xray

* move class

* fixup mobile controls panel

* change notes, change xray feat selection
2024-03-21 10:40:36 +01:00
rjshrjndrn
1f1e4703c2 chore(helm): run cleanup every day with 2 days retention
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-19 16:47:34 +01:00
Alexander
67a59545f4 feat(backend): fixed db methods in ee 2024-03-19 16:29:32 +01:00
Alexander
b6d71194d7 feat(backend): autodeleted include 2024-03-19 14:48:05 +01:00
Rajesh Rajendran
bed88026bd
Actions: composite actions for repetitive tasks (#1977)
* ci(actions): Update the secret update process

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* ci(actions): Composite actions

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(ci): keys injection

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(ci): missing env variable

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

* fix(ci): action name

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>

---------

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-19 14:44:11 +01:00
Alexander
6c12af6125 feat(backend): fixed an issue in CH connector 2024-03-19 12:20:46 +01:00
rjshrjndrn
9d416248e2 ci(actions): Update the secret update process
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-19 11:07:49 +01:00
Delirium
2a182cc6b8
fix(ui): map duration, graphql and metadata; add filter scan (#1976)
* fix(ui): map duration, graphql and metadata; add filter scan

* fix(ui): rm copypaste
2024-03-19 10:36:24 +01:00
Delirium
f6d3654a2b
tracker: 12.0.5 changelogs (#1975) 2024-03-19 10:00:41 +01:00
Duck
cbbe1329f9
tracker: 12.0.5 srcset join/split fix 2024-03-19 09:56:51 +01:00
Delirium
c8525a6fec
fix(ui): fix actions toggle shortcut (#1974) 2024-03-18 17:38:27 +01:00
Delirium
d2177a5267
fix(ui): wrap searchbar on small screens (#1973) 2024-03-18 16:39:03 +01:00
Delirium
893e7093d8
fix(ui): fix alert creation modal (#1972) 2024-03-18 16:10:13 +01:00
Delirium
94ce9fbc09
fix(ui): fix mapper from intelligent search (#1971)
* fix(ui): fix mapper from intelligent search

* fix typo
2024-03-18 13:17:34 +01:00
Delirium
325a10ea33
fix(ui): search clear and enter icon (#1970)
* fix(ui): fix search input clear

* fix merge

* fix shortcuts
2024-03-18 12:50:07 +01:00
Delirium
ba4e8a474f
fix(ui): fix search input clear (#1969) 2024-03-18 12:12:46 +01:00
Kraiem Taha Yassine
8c41e6cda8
Dev (#1968)
* fix(DB): allow null session_id for assist_records(session_id)

* fix(chalice): fixed missing-user access
2024-03-18 11:47:44 +01:00
Delirium
39f8602c76
feat(ui): intelligent search (#1881)
* feat(ui): start ai summary UI

* feat(ui): add api

* feat(ui): rm console log

* feat(ui): style fix

* feat(ui): some ui changes

* feat(ui): some ui changes

* feat(ui): some text formatting

* feat(ui): ai search stuff

* fix(ui): add int search ui

* feat(ui): map llm response to OR filters

* fix(ui): remove log

* fix
2024-03-18 11:12:01 +01:00
Delirium
c0f4a99545
feat(ui): add shortcuts to player page, clear unused files (#1963)
* feat(ui): remove dead code, add more shortcuts to player

* feat(ui): remove dead code, add more shortcuts to player

* feat(ui): add shortcuts

* feat(ui): additional menu shortcuts

* fix(ui): fix depds for effect
2024-03-18 11:09:49 +01:00
Kraiem Taha Yassine
902ec87d7a
fix(DB): allow null session_id for assist_records(session_id) (#1965) 2024-03-17 15:07:23 +01:00
Delirium
3eb9f5cc52
Patch/fix pagination total (#1960)
* fix(ui): fix total pages in pagination

* fix(ui): pages
2024-03-15 12:01:24 +01:00
Delirium
09d1820403
fix(ui): fix onboarding state (#1959) 2024-03-15 10:57:29 +01:00
Delirium
11a1cf709f
feat(ui): change share modal in player (#1958)
* feat(ui): change share modal in player

* fix(ui): rm console
2024-03-15 10:31:47 +01:00
rjshrjndrn
0f9eca733a fix(build): source script
Shouldn't have "" else the empty string will cause issue.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-14 18:03:26 +01:00
Alexander
36b6dfb5bd feat(backend): fixed no sessID in storage service 2024-03-14 17:17:50 +01:00
Alexander
51a6d87e68 feat(backend): fixed failover mock 2024-03-14 17:06:43 +01:00
Alexander
ee75b2795a feat(backend): fixed broken logs in failover module 2024-03-14 16:40:14 +01:00
Delirium
b1ca164449
feat(ui): change pagination component to ant (#1957) 2024-03-14 16:05:07 +01:00
Alexander
fa24030f0b feat(backend): added more details to http logs 2024-03-14 15:43:57 +01:00
rjshrjndrn
6ab9199a62 feat(init): Provision to override build scripts
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-14 15:22:50 +01:00
Delirium
da186650a9
fix(tracker): update fflate and changelogs (#1956) 2024-03-14 14:48:13 +01:00
Alexander
a453256f23 feat(backend): moved log to prevent error code loss 2024-03-14 14:30:46 +01:00
Alexander
45c956c489
Json logs format (#1952)
* feat(backend): try a new approach for logs formatting (http)

* feat(backend): added logger module

* feat(backend): added project/session info to /i endpoint

* feat(backend): found a solution for correct caller information

* feat(backend): finished logs for http handlers

* feat(backend): finished logs for mobile http handlers

* feat(backend): finished ender

* feat(backend): finished assets

* feat(backend): finished heuristics

* feat(backend): finished image-storage

* feat(backend): finished sink

* feat(backend): finished storage

* feat(backend): formatted logs in all services

* feat(backend): finished foss part

* feat(backend): added missed foss part

* feat(backend): fixed panic in memory manager and sink service

* feat(backend): connectors
2024-03-14 12:51:14 +01:00
rjshrjndrn
7e83cd0f2b fix(init): add domain name
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-14 12:24:24 +01:00
rjshrjndrn
494d215d66 fix(install): path for variable file
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-14 12:11:47 +01:00
rjshrjndrn
604317fc9e refactor(cli): installation script
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-14 11:16:11 +01:00
Delirium
30596e5d97
fix(ui): attempt to parse mob files with broken batches (#1954) 2024-03-13 18:22:05 +01:00
Kraiem Taha Yassine
26613db9cf fix(chalice): reduce AIO-PG pool size (#1953)
refactor(chalice): configurable AIO-PG pool size

(cherry picked from commit 3249329537)
2024-03-13 17:32:58 +01:00
rjshrjndrn
415971b022 chore(cli): removing deprecated checks
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-13 12:22:09 +01:00
rjshrjndrn
29d40839f8 fix(vars): nginx ingress controller default listener LB
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-13 11:13:14 +01:00
rjshrjndrn
8c53804f45 fix(vars.yaml): Same accesskey for minio and s3, if using minio
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-13 10:47:45 +01:00
rjshrjndrn
b34e7bb100 feat(install): Stream line secret generation
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-12 18:37:19 +01:00
Delirium
18fa90fe7c
fix(ui): fix method to copy debug token (#1951) 2024-03-12 17:46:20 +01:00
Delirium
f9d915d18a
fix(ui): easier token grabber for dev (#1950) 2024-03-12 17:38:55 +01:00
rjshrjndrn
e1e07dfb9f chore(build): Chalice support arm build
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-12 17:28:08 +01:00
rjshrjndrn
6864edaf59 fix(docker): Cache source build
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-12 17:28:00 +01:00
rjshrjndrn
068f29fc35 chore(build): Custom docker build env 2024-03-12 17:27:49 +01:00
rjshrjndrn
8c9ed6a941 build: Library function for custom docker build 2024-03-12 17:27:40 +01:00
rjshrjndrn
ea54ab181b chore(build): Updating build script to take custom docker runtimes
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-12 17:21:04 +01:00
Delirium
9e7f1971dd
fix(ui): fix placeholders for consistency (#1949) 2024-03-12 16:59:28 +01:00
Kraiem Taha Yassine
89d501edb5 fix(chalice): fixed cards data merge (#1948)
(cherry picked from commit ee87e89805)
2024-03-12 16:11:47 +01:00
Delirium
538af09cc8
fix(tracker): fix multi canvas streaming (#1945)
* fix(tracker): fix multi canvas streaming

* fix(tracker): fix canvas streaming

* fix(ui): fix canvas receiver interaction waiter

* fix(ui): remove console log
2024-03-12 15:32:40 +01:00
Kraiem Taha Yassine
71ce983bb2 fix(chalice): transform array-source to single value for sessions-filters (#1943)
(cherry picked from commit ee6b22b579)
2024-03-12 12:29:39 +01:00
Nico Prat
c4d8a2d2a7
fix(tracker): add "plus" to email detecting regexp 2024-03-12 10:32:04 +01:00
Alexander
b8eca2516b
feat(backend): added new mobile conditions to chalice filters (#1941) 2024-03-12 10:16:47 +01:00
Delirium
f2cd253bc3
fix(ui): fix assist console resize (#1942) 2024-03-12 10:13:10 +01:00
Alexander
89752b2acc
Canvas archives (#1938)
* feat(api): added second pre-signed urls for canvases

* feat(api): fixed old key format

* feat(backend): draft version for new approach for canvases

* feat(deploy): fixed some issues

* feat(backend): debug logs for bash command

* feat(backend): removed wrong parameter from bash pipeline

* feat(backend): removed canvas-maker service + small refactoring
2024-03-11 17:51:49 +01:00
Shekar Siri
7ab5043d16 change(ui): widget drilldown sessions to show metadata 2024-03-11 17:43:12 +01:00
Delirium
34a778527c
fix(ui): fix dead variables (#1939) 2024-03-11 14:50:49 +01:00
Delirium
2377cc79d0
feat(ui): switch canvas player to images (#1925)
* feat(ui): switch canvas player to images

* feat(ui): complete player

* fix(ui): expect undefined .tar for canvas

* fix(ui): improve error handling

* fix(ui): file format
2024-03-11 14:26:50 +01:00
Taha Yassine Kraiem
fcaf72faf2 fix(chalice): fixed reset password 2024-03-11 12:15:10 +01:00
Taha Yassine Kraiem
141d6f5a39 refactor(chalice): enhanced cron config 2024-03-05 11:52:00 +01:00
Taha Yassine Kraiem
0cef52705f refactor(chalice): enhanced cron config 2024-03-05 11:46:49 +01:00
rjshrjndrn
7b2e80d2a6 feat(cli): Get git version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-03-05 11:36:55 +01:00
Taha Yassine Kraiem
8e39a72ea0 fix(chalice): fixed nested data for try/issues-funnel 2024-03-01 19:35:06 +01:00
Alexander
8e1a156fb2 feat(backend): added missing dir in ee conditions path 2024-03-01 17:04:27 +01:00
Alexander
68d4090e15 feat(backend): added projectID to mobile session start responce 2024-03-01 16:42:49 +01:00
Delirium
7c2db1d67c
fix(tracker): fix asist canvas layer (#1923) 2024-03-01 12:08:50 +01:00
Delirium
deb9f37d8f
fix(ui): wrap some possible null values (#1922) 2024-03-01 10:51:18 +01:00
Taha Yassine Kraiem
2760e57d9a fix(chalice): fixed SSO 2024-02-29 17:19:23 +01:00
Delirium
29fa43d5a9
fix(tracker): fix react native source lib version (#1919) 2024-02-29 13:16:50 +01:00
rjshrjndrn
006a4a0cdb feat(cli): override busybox from env
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-29 10:11:29 +01:00
Alexander
7c58ece936 feat(backend): added separate config for canvas-handler 2024-02-28 13:21:19 +01:00
Alexander
21c4ebd6e3 feat(backend): upgraded user-agent for assist service 2024-02-27 13:54:45 +01:00
Alexander
36fb1a07f7
Worker pool for image processing services (#1912)
* feat(backend): added worker pool for screenshot handler

* feat(backend): added worker pool to canvas handler

* feat(backend): added worker pool to canvas maker

* feat(backend): added missing method to canvas-maker service
2024-02-27 13:48:27 +01:00
Taha Yassine Kraiem
20f9da5e84 refactor(chalice): optimised forget password 2024-02-27 13:29:57 +01:00
Taha Yassine Kraiem
4922adf5c9 refactor(chalice): optimised forget password 2024-02-27 13:25:55 +01:00
Taha Yassine Kraiem
7878f10a8b refactor(chalice): changed forget password 2024-02-27 13:21:26 +01:00
Taha Yassine Kraiem
524394393c refactor(chalice): changed email_handler.py 2024-02-27 11:47:37 +01:00
Taha Yassine Kraiem
72e2900fb9 refactor(chalice): changed email_handler.py 2024-02-27 11:43:52 +01:00
nick-delirium
a690bc779d
fix(ui): fix search query 2024-02-27 11:36:06 +01:00
rjshrjndrn
e07b7b10bb fix(helm): minio init
For new minio, the command changed for setting access.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-27 11:11:29 +01:00
Alexander
a73bf81902 feat(backend): added support for conditional recording feature (mobile sessions) 2024-02-26 15:13:51 +01:00
Shekar Siri
eac7bef223 fix(ui): skip with siteid 2024-02-26 14:53:12 +01:00
Alexander
a073ce498d
No ffmpeg solution (#1905)
* feat(video-storage): added zstd library to the machine

* feat(video-storage): added new method to pack screenshots into compressed tar arch

* feat(video-storage): try to split command into 2

* feat(video-storage): try a new approad to avoid no file error

* feat(api): added support to a new pre-signed url for screenshots archive

* feat(video-storage): fixed an issue in extension check

* feat(video-storage): correct file name

* feat(backend): removed video-storage and splitted logic

* feat(backend): removed video-storage from helm charts

* feat(backend): split canvas and screenshot handlers

* feat(canvas): clean up canvas-handler

* feat(api): changed mobile replay url (screenshots instead of video)

* feat(backend): removed msg.SessID() call

* feat(backend): clean up code in imagestorage main
2024-02-26 14:16:43 +01:00
Shekar Siri
6465f206be change(ui): use the provided jwt always 2024-02-26 14:01:41 +01:00
Taha Yassine Kraiem
91016cf92d refactor(chalice): changed email_handler.py 2024-02-26 12:31:36 +01:00
nick-delirium
c56bda106d
fix(ui): fix mauricio change 2024-02-23 18:07:11 +01:00
Taha Yassine Kraiem
cf3e982b8a fix(chalice): fixed SSO dependencies 2024-02-23 15:29:12 +01:00
rjshrjndrn
39a8a03b3f chore(helm): upgrade postgres version
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-22 18:45:35 +01:00
nick-delirium
4955b2f9f4
fix(ui): fix back compat 2024-02-22 13:03:19 +01:00
Delirium
e207d37e69
Ios player v2 (#1901)
* feat(ui): new ios player start

* fix(ui): image player

* fix(ui): fix autoplay

* fix(ui): fix copy paste code; error handler; default mode null

* fix(ui): fix loader animation

* fix(ui): memory cleanup

* fix(ui): memory cleanup
2024-02-22 12:50:19 +01:00
nick-delirium
3cea5d7d0b
fix(ui): skip 0 index for orphan sheets, skip -moz- checks for css rules 2024-02-21 15:57:04 +01:00
nick-delirium
7ce43ef412
fix(ui): cap video framerate for mobile to 100hz 2024-02-20 14:12:42 +01:00
Shekar Siri
75383e6d50 change(ui): iframe check and sso redirect 2024-02-20 12:01:53 +01:00
rjshrjndrn
17055eb2ae build(frontend): source init code to build for enabling additional features
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-20 11:23:20 +01:00
rjshrjndrn
fb924ec305 fix(minio): wrong data path for minio
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-19 17:00:46 +01:00
Delirium
d84371e17e
fix(tracker): change canvas scaling (#1894); fix canvas replay
* fix(tracker): change canvas scaling

* fix(tracker): 12.0.3

* fix(tracker): 12.0.3
2024-02-19 16:48:37 +01:00
nick-delirium
5ff0d61ffb
fix(ui): fix subheader origin check 2024-02-19 11:05:02 +01:00
Shekar Siri
aa07dfa5f4 change(ui): sso link 2024-02-15 18:37:41 +01:00
rjshrjndrn
a932f4ae0d chore(docker): support arch build
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-15 17:29:16 +01:00
Shekar Siri
216453ff2a change(ui): sso link 2024-02-15 17:20:58 +01:00
Shekar Siri
6ec98fbb63 change(ui): edition msaas check 2024-02-15 16:04:13 +01:00
rjshrjndrn
523928891a feat(cli): arm64 support
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-15 13:15:44 +01:00
Shekar Siri
8a9d6e47b6 change(ui): removed login.js 2024-02-15 11:43:16 +01:00
Shekar Siri
5ca1923ef4 change(ui): iframe check for sso redirect 2024-02-13 16:46:16 +01:00
nick-delirium
fc531ceb85
fix(ui): fix capture rate ui for saas and non ee 2024-02-13 14:04:42 +01:00
Alexander
f2b40f4622 fix(assist): fixed broken assist stats 2024-02-13 13:48:47 +01:00
Alexander
938914be99 fix(assist): fixed broken assist call/remote control functionality 2024-02-13 12:17:24 +01:00
rjshrjndrn
fd0ed08fe3 fix: kerberos build
Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
2024-02-13 07:17:53 +01:00
rjshrjndrn
7168ded388 fix: override
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-13 07:17:51 +01:00
nick-delirium
2423a0e2b3 fix(tracker): fix for assist peer reconnection strategy 2024-02-12 16:45:01 +01:00
Delirium
e0799f74e1
feat(ui): ai summary UI (#1868)
* feat(ui): start ai summary UI

* feat(ui): add api

* feat(ui): rm console log

* feat(ui): style fix

* feat(ui): some ui changes

* feat(ui): some ui changes

* feat(ui): some text formatting

* fix(ui): method fix

* fix(ui): fix icon gen

* fix(ui): fix global ts declaration for window env
2024-02-12 15:34:43 +01:00
nick-delirium
b9e2cafe4b fix(ui): fix metadata in saved search 2024-02-12 12:47:15 +01:00
nick-delirium
1035a1a219 fix(tracker): 12 0 2 fix for canvas check 2024-02-12 11:31:03 +01:00
nick-delirium
e0dfa21306 fix(tracker): 12 0 1, changelogs and canvas fix 2024-02-12 11:31:03 +01:00
nick-delirium
4165823e91 fix(tracker): 12 0 1, changelogs 2024-02-12 11:31:03 +01:00
Taha Yassine Kraiem
19470cd41f feature(chalice): support multi SSO redirect 2024-02-09 18:45:20 +01:00
Shekar Siri
4e190cc00d fix(ui): show error responses in ui 2024-02-09 15:12:24 +01:00
Shekar Siri
d9bf22b04c change(ui): check for edition msaas 2024-02-09 15:11:50 +01:00
Shekar Siri
00c98ea3f3 fix(ui): autoplay session ids are parsed to int 2024-02-09 11:17:11 +01:00
nick-delirium
84496b9438 fix(tracker): typo; changelog 2024-02-07 18:01:34 +01:00
nick-delirium
4bb19ecf99 feat(tracker): dynamic canvas start/stop observer 2024-02-07 11:56:33 +01:00
nick-delirium
3c12a0fcab fix(tracker): potential fix for assist warn? 2024-02-06 15:53:07 +01:00
Alexander
a26b603945
Boost performance for one node assist mode (#1869)
* feat(assist): removed cache for solo-node assist mode

* feat(assist): try to fetch from global io object

* feat(assist): small changes

* feat(assist): added cache per request instead of cache per room

* feat(assist): fixed await call in global scope

* feat(assist): try to fix circular structure issue

* feat(assist): use preprocessor for sockets list

* feat(assist): check the theory about fetchSockets data set

* feat(assist): try to keep everything inside handshake.query object
2024-02-06 14:10:48 +01:00
Shekar Siri
e14cbe41e5 change(ui): login to functional component 2024-02-06 12:09:27 +01:00
rjshrjndrn
b6c31be14f fix(install): override file
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-05 18:20:57 +01:00
rjshrjndrn
07f07a99d7 chore(cli): support override file while installing
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-02 20:24:15 +01:00
rjshrjndrn
21cd4de97d refactor(helm): update deprecated value
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-02 18:24:01 +01:00
rjshrjndrn
b11cf8a12c refactor(helm): remove duplicate code
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
2024-02-02 18:24:00 +01:00
Kraiem Taha Yassine
dc0331aac2
refactor(DB): refactored DB init script (#1873) 2024-02-02 12:29:47 +01:00
Kraiem Taha Yassine
45b58eeb4f
refactor(DB): refactored DB init script (#1872) 2024-02-02 11:05:33 +01:00
Kraiem Taha Yassine
9879bd65bb
feat(DB): DB changes for v1.18.0 (#1871) 2024-02-01 17:56:41 +01:00
nick-delirium
8263773bff fix(tracker): some refactoring 2024-01-30 14:50:00 +01:00
Alexander
88ea925263 feat(backend): added new flag USE_S3_TAGS to disable s3 tags 2024-01-29 16:50:08 +01:00
Eng Zer Jun
76f0f3ff3d
refactor(backend): move from io/ioutil to io and os packages (#1784)
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-01-29 16:37:59 +01:00
nick-delirium
3ada6aeb42 feat(tracker): v12 release 2024-01-29 09:42:08 +01:00
4786 changed files with 220635 additions and 154603 deletions

View file

@ -0,0 +1,74 @@
name: 'Update Keys'
description: 'Updates keys'
inputs:
domain_name:
required: true
description: 'Domain Name'
license_key:
required: true
description: 'License Key'
jwt_secret:
required: true
description: 'JWT Secret'
jwt_spot_secret:
required: true
description: 'JWT spot Secret'
minio_access_key:
required: true
description: 'MinIO Access Key'
minio_secret_key:
required: true
description: 'MinIO Secret Key'
pg_password:
required: true
description: 'PostgreSQL Password'
registry_url:
required: true
description: 'Registry URL'
runs:
using: "composite"
steps:
- name: Downloading yq
run: |
VERSION="v4.42.1"
sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
shell: bash
- name: "Updating OSS secrets"
run: |
cd scripts/helmcharts/
vars=(
"ASSIST_JWT_SECRET:.global.assistJWTSecret"
"ASSIST_KEY:.global.assistKey"
"DOMAIN_NAME:.global.domainName"
"JWT_REFRESH_SECRET:.chalice.env.JWT_REFRESH_SECRET"
"JWT_SECRET:.global.jwtSecret"
"JWT_SPOT_REFRESH_SECRET:.chalice.env.JWT_SPOT_REFRESH_SECRET"
"JWT_SPOT_SECRET:.global.jwtSpotSecret"
"LICENSE_KEY:.global.enterpriseEditionLicense"
"MINIO_ACCESS_KEY:.global.s3.accessKey"
"MINIO_SECRET_KEY:.global.s3.secretKey"
"PG_PASSWORD:.postgresql.postgresqlPassword"
"REGISTRY_URL:.global.openReplayContainerRegistry"
)
for var in "${vars[@]}"; do
IFS=":" read -r env_var yq_path <<<"$var"
yq e -i "${yq_path} = strenv(${env_var})" vars.yaml
done
shell: bash
env:
ASSIST_JWT_SECRET: ${{ inputs.assist_jwt_secret }}
ASSIST_KEY: ${{ inputs.assist_key }}
DOMAIN_NAME: ${{ inputs.domain_name }}
JWT_REFRESH_SECRET: ${{ inputs.jwt_refresh_secret }}
JWT_SECRET: ${{ inputs.jwt_secret }}
JWT_SPOT_REFRESH_SECRET: ${{inputs.jwt_spot_refresh_secret}}
JWT_SPOT_SECRET: ${{ inputs.jwt_spot_secret }}
LICENSE_KEY: ${{ inputs.license_key }}
MINIO_ACCESS_KEY: ${{ inputs.minio_access_key }}
MINIO_SECRET_KEY: ${{ inputs.minio_secret_key }}
PG_PASSWORD: ${{ inputs.pg_password }}
REGISTRY_URL: ${{ inputs.registry_url }}

View file

@ -3,9 +3,9 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
@ -26,7 +26,6 @@ on:
- "!ee/api/requirements.txt"
- "!ee/api/requirements-crons.txt"
name: Build and Deploy Alerts EE
jobs:
@ -42,9 +41,25 @@ jobs:
# to see which workers got changed.
fetch-depth: 2
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: azure/k8s-set-context@v1
with:
@ -57,7 +72,6 @@ jobs:
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing api image
id: build-image
env:
@ -69,10 +83,10 @@ jobs:
cd api
PUSH_IMAGE=0 bash -x ./build_alerts.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("alerts")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
@ -92,9 +106,9 @@ jobs:
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
@ -109,24 +123,16 @@ jobs:
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/alerts/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,alerts,quickwit} /tmp
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,alerts,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,alerts,quickwit} openreplay/charts/
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
@ -143,13 +149,14 @@ jobs:
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
# - name: Debug Job
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -3,9 +3,9 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
@ -34,9 +34,25 @@ jobs:
# to see which workers got changed.
fetch-depth: 2
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: azure/k8s-set-context@v1
with:
@ -49,7 +65,6 @@ jobs:
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing Alerts image
id: build-image
env:
@ -61,10 +76,10 @@ jobs:
cd api
PUSH_IMAGE=0 bash -x ./build_alerts.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("alerts")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
@ -84,9 +99,9 @@ jobs:
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
@ -100,7 +115,7 @@ jobs:
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
@ -108,15 +123,16 @@ jobs:
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
# Update changed image tag
sed -i "/alerts/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,alerts,quickwit} /tmp
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,alerts,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,alerts,quickwit} openreplay/charts/
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
@ -132,13 +148,13 @@ jobs:
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -3,15 +3,13 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
- v1.11.0-patch
- actions_test
paths:
- "ee/api/**"
- "api/**"
@ -25,7 +23,6 @@ on:
- "!ee/api/*-dev.sh"
- "!ee/api/requirements-*.txt"
name: Build and Deploy Chalice EE
jobs:
@ -34,121 +31,129 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing api image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd api
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- name: Building and Pushing api image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd api
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("chalice")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("chalice")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("chalice")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/chalice/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/chalice/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,chalice,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,chalice,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,chalice,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -3,14 +3,13 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
- v1.11.0-patch
paths:
- "api/**"
- "!api/.gitignore"
@ -26,118 +25,126 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing api image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd api
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- name: Building and Pushing api image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd api
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("chalice")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("chalice")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("chalice")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
# Update changed image tag
sed -i "/chalice/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/chalice/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,chalice,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,chalice,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,chalice,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -3,13 +3,12 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
paths:
- "ee/assist/**"
- "assist/**"
@ -24,103 +23,112 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- name: Building and Pushing Assist image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Building and Pushing Assist image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("assist")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/assist/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/assist/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,assist,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,assist,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,assist,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
#
# with:
# iimit-access-to-actor: true

122
.github/workflows/assist-server-ee.yaml vendored Normal file
View file

@ -0,0 +1,122 @@
# This action will push the assist changes to aws
on:
workflow_dispatch:
inputs:
skip_security_checks:
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: "false"
push:
branches:
- dev
paths:
- "ee/assist-server/**"
name: Build and Deploy Assist-Server EE
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Building and Pushing Assist-Server image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist-server
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("assist-server")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist-server")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
pwd
cd scripts/helmcharts/
# Update changed image tag
sed -i "/assist-server/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,assist-server,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging

View file

@ -3,9 +3,9 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
@ -15,7 +15,7 @@ on:
- "!assist-stats/*-dev.sh"
- "!assist-stats/requirements-*.txt"
name: Build and Deploy Assist Stats
name: Build and Deploy Assist Stats ee
jobs:
deploy:
@ -23,118 +23,140 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing assist-stats image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist-stats
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- name: Building and Pushing assist-stats image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist-stats
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("assist-stats")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist-stats")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist-stats")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
### Enterprise code deployment
### Enterprise code deployment
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontextee
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontextee
- name: Resetting vars file
run: |
git checkout -- scripts/helmcharts/vars.yaml
- name: Deploy to kubernetes ee
run: |
cd scripts/helmcharts/
cat <<EOF>/tmp/image_override.yaml
assist-stats:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
- name: Deploy to kubernetes ee
run: |
cd scripts/helmcharts/
cat <<EOF>/tmp/image_override.yaml
assist-stats:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
# Update changed image tag
sed -i "/assist-stats/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
export IMAGE_TAG=${IMAGE_TAG}
# Update changed image tag
yq '.utilities.apiCrons.assiststats.image.tag = strenv(IMAGE_TAG)' -i /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,assist-stats,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,assist-stats,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,assist-stats,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -3,13 +3,12 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
paths:
- "assist/**"
- "!assist/.gitignore"
@ -23,103 +22,112 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- name: Building and Pushing Assist image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Building and Pushing Assist image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd assist
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("assist")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("assist")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.OSS_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/assist/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/assist/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,assist,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,assist,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,assist,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
#
# with:
# iimit-access-to-actor: true

View file

@ -3,14 +3,13 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
- v1.11.0-patch
paths:
- "ee/api/**"
- "api/**"
@ -35,121 +34,126 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing api image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd api
PUSH_IMAGE=0 bash -x ./build_crons.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- name: Building and Pushing api image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd api
PUSH_IMAGE=0 bash -x ./build_crons.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("crons")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("crons")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("crons")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
env:
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
run: |
cd scripts/helmcharts/
cat <<EOF>/tmp/image_override.yaml
image: &image
tag: "${IMAGE_TAG}"
utilities:
apiCrons:
assiststats:
image: *image
report:
image: *image
sessionsCleaner:
image: *image
projectsStats:
image: *image
fixProjectsStats:
image: *image
EOF
echo > /tmp/image_override.yaml
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,utilities,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
ENVIRONMENT: staging
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/crons/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,utilities,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,utilities,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
#
# with:
# iimit-access-to-actor: true

View file

@ -59,17 +59,22 @@ jobs:
EOF
done
- uses: ./.github/composite-actions/update-keys
with:
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- name: Deploy to kubernetes foss
if: ${{ steps.check-migration.outputs.skip_migration_oss != 'true' }}
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
cat /tmp/image_override.yaml
@ -115,22 +120,21 @@ jobs:
EOF
done
- name: Resetting vars file
run: |
git checkout -- scripts/helmcharts/vars.yaml
- uses: ./.github/composite-actions/update-keys
with:
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- name: Deploy to kubernetes ee
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
cat /tmp/image_override.yaml
# Deploy command
helm upgrade --install openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --atomic --set forceMigration=true --set dbMigrationUpstreamBranch=${IMAGE_TAG}
@ -140,12 +144,13 @@ jobs:
IMAGE_TAG: ${{ github.sha }}
ENVIRONMENT: staging
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: eu-central-1
# AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
# - name: Debug Job
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -1,7 +1,7 @@
name: Frontend Dev Deployment
name: Frontend Dev Deployment
on: workflow_dispatch
# Disable previous workflows for this action.
concurrency:
concurrency:
group: ${{ github.workflow }} #-${{ github.ref }}
cancel-in-progress: true
@ -9,73 +9,77 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
domain_name: ${{ secrets.DEV_DOMAIN_NAME }}
license_key: ${{ secrets.DEV_LICENSE_KEY }}
jwt_secret: ${{ secrets.DEV_JWT_SECRET }}
minio_access_key: ${{ secrets.DEV_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.DEV_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.DEV_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.DEV_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- name: Building and Pushing frontend image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
set -x
cd frontend
mv .env.sample .env
docker run --rm -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v $(pwd):/home/${USER} -w /home/${USER} --name node_build node:14-stretch-slim /bin/bash -c "yarn && yarn build"
# https://github.com/docker/cli/issues/1134#issuecomment-613516912
DOCKER_BUILDKIT=1 docker build --target=cicd -t $DOCKER_REPO/frontend:${IMAGE_TAG} .
docker tag $DOCKER_REPO/frontend:${IMAGE_TAG} $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.DEV_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Deploy to kubernetes foss
run: |
cd scripts/helmcharts/
- name: Building and Pushing frontend image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
set -x
cd frontend
mv .env.sample .env
docker run --rm -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v $(pwd):/home/${USER} -w /home/${USER} --name node_build node:20-slim /bin/bash -c "yarn && yarn build"
# https://github.com/docker/cli/issues/1134#issuecomment-613516912
DOCKER_BUILDKIT=1 docker build --target=cicd -t $DOCKER_REPO/frontend:${IMAGE_TAG} .
docker tag $DOCKER_REPO/frontend:${IMAGE_TAG} $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
set -x
cat <<EOF>>/tmp/image_override.yaml
frontend:
image:
tag: ${IMAGE_TAG}
EOF
- name: Deploy to kubernetes foss
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.DEV_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.DEV_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.DEV_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.DEV_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.DEV_DOMAIN_NAME }}\"/g" vars.yaml
set -x
cat <<EOF>>/tmp/image_override.yaml
frontend:
image:
tag: ${IMAGE_TAG}
EOF
# Update changed image tag
sed -i "/frontend/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/frontend/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,frontend,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,frontend,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,frontend,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
iMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}

View file

@ -1,4 +1,4 @@
name: Frontend Foss Deployment
name: Frontend Foss Deployment
on:
workflow_dispatch:
push:
@ -7,7 +7,7 @@ on:
paths:
- frontend/**
# Disable previous workflows for this action.
concurrency:
concurrency:
group: ${{ github.workflow }} #-${{ github.ref }}
cancel-in-progress: true
@ -15,129 +15,145 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Cache node modules
uses: actions/cache@v4
with:
path: |
/home/runner/work/openreplay/openreplay/frontend/node_modules
/home/runner/work/openreplay/openreplay/frontend/.yarn
key: ${{ runner.OS }}-build-${{ hashFiles('frontend/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- name: Building and Pushing frontend image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
set -x
cd frontend
mv .env.sample .env
docker run --rm -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v $(pwd):/home/${USER} -w /home/${USER} --name node_build node:18-slim /bin/bash -c "yarn && yarn build"
# https://github.com/docker/cli/issues/1134#issuecomment-613516912
DOCKER_BUILDKIT=1 docker build --target=cicd -t $DOCKER_REPO/frontend:${IMAGE_TAG} .
docker tag $DOCKER_REPO/frontend:${IMAGE_TAG} $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Deploy to kubernetes foss
run: |
cd scripts/helmcharts/
- name: Building and Pushing frontend image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
set -x
cd frontend
mv .env.sample .env
docker run --rm -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v $(pwd):/home/${USER} -w /home/${USER} --name node_build node:20-slim /bin/bash -c "yarn && yarn build"
# https://github.com/docker/cli/issues/1134#issuecomment-613516912
DOCKER_BUILDKIT=1 docker build --target=cicd -t $DOCKER_REPO/frontend:${IMAGE_TAG} .
docker tag $DOCKER_REPO/frontend:${IMAGE_TAG} $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}
docker push $DOCKER_REPO/frontend:${IMAGE_TAG}-ee
set -x
cat <<EOF>>/tmp/image_override.yaml
frontend:
image:
tag: ${IMAGE_TAG}
EOF
- name: Deploy to kubernetes foss
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
set -x
cat <<EOF>>/tmp/image_override.yaml
frontend:
image:
tag: ${IMAGE_TAG}
EOF
# Update changed image tag
sed -i "/frontend/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/frontend/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,frontend,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,frontend,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,frontend,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
### Enterprise code deployment
### Enterprise code deployment
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontextee
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontextee
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- name: Resetting vars file
run: |
git checkout -- scripts/helmcharts/vars.yaml
- name: Deploy to kubernetes ee
run: |
cd scripts/helmcharts/
cat <<EOF>/tmp/image_override.yaml
frontend:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
- name: Deploy to kubernetes ee
run: |
cd scripts/helmcharts/
cat <<EOF>/tmp/image_override.yaml
frontend:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/frontend/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
# Update changed image tag
sed -i "/frontend/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,frontend,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,frontend,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,frontend,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: eu-central-1
# AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# iimit-access-to-actor: true

189
.github/workflows/patch-build-old.yaml vendored Normal file
View file

@ -0,0 +1,189 @@
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
on:
workflow_dispatch:
inputs:
services:
description: 'Comma separated names of services to build(in small letters).'
required: true
default: 'chalice,frontend'
tag:
description: 'Tag to update.'
required: true
type: string
branch:
description: 'Branch to build patches from. Make sure the branch is uptodate with tag. Else itll cause missing commits.'
required: true
type: string
name: Build patches from tag, rewrite commit HEAD to older timestamp, and Push the tag
jobs:
deploy:
name: Build Patch from old tag
runs-on: ubuntu-latest
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 4
ref: ${{ github.event.inputs.tag }}
- name: Set Remote with GITHUB_TOKEN
run: |
git config --unset http.https://github.com/.extraheader
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git
- name: Create backup tag with timestamp
run: |
set -e # Exit immediately if a command exits with a non-zero status
TIMESTAMP=$(date +%Y%m%d%H%M%S)
BACKUP_TAG="${{ github.event.inputs.tag }}-backup-${TIMESTAMP}"
echo "BACKUP_TAG=${BACKUP_TAG}" >> $GITHUB_ENV
echo "INPUT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
git tag $BACKUP_TAG || { echo "Failed to create backup tag"; exit 1; }
git push origin $BACKUP_TAG || { echo "Failed to push backup tag"; exit 1; }
echo "Created backup tag: $BACKUP_TAG"
# Get the oldest commit date from the last 3 commits in raw format
OLDEST_COMMIT_TIMESTAMP=$(git log -3 --pretty=format:"%at" | tail -1)
echo "Oldest commit timestamp: $OLDEST_COMMIT_TIMESTAMP"
# Add 1 second to the timestamp
NEW_TIMESTAMP=$((OLDEST_COMMIT_TIMESTAMP + 1))
echo "NEW_TIMESTAMP=$NEW_TIMESTAMP" >> $GITHUB_ENV
- name: Setup yq
uses: mikefarah/yq@master
# Configure AWS credentials for the first registry
- name: Configure AWS credentials for RELEASE_ARM_REGISTRY
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_DEPOT_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_DEPOT_SECRET_KEY }}
aws-region: ${{ secrets.AWS_DEPOT_DEFAULT_REGION }}
- name: Login to Amazon ECR for RELEASE_ARM_REGISTRY
id: login-ecr-arm
run: |
aws ecr get-login-password --region ${{ secrets.AWS_DEPOT_DEFAULT_REGION }} | docker login --username AWS --password-stdin ${{ secrets.RELEASE_ARM_REGISTRY }}
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.RELEASE_OSS_REGISTRY }}
- uses: depot/setup-action@v1
- name: Get HEAD Commit ID
run: echo "HEAD_COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Define Branch Name
run: echo "BRANCH_NAME=${{inputs.branch}}" >> $GITHUB_ENV
- name: Build
id: build-image
env:
DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }}
DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }}
MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }}
MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }}
MSAAS_REPO_FOLDER: /tmp/msaas
run: |
set -exo pipefail
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout -b $BRANCH_NAME
working_dir=$(pwd)
function image_version(){
local service=$1
chart_path="$working_dir/scripts/helmcharts/openreplay/charts/$service/Chart.yaml"
current_version=$(yq eval '.AppVersion' $chart_path)
new_version=$(echo $current_version | awk -F. '{$NF += 1 ; print $1"."$2"."$3}')
echo $new_version
# yq eval ".AppVersion = \"$new_version\"" -i $chart_path
}
function clone_msaas() {
[ -d $MSAAS_REPO_FOLDER ] || {
git clone -b $INPUT_TAG --recursive https://x-access-token:$MSAAS_REPO_CLONE_TOKEN@$MSAAS_REPO_URL $MSAAS_REPO_FOLDER
cd $MSAAS_REPO_FOLDER
cd openreplay && git fetch origin && git checkout $INPUT_TAG
git log -1
cd $MSAAS_REPO_FOLDER
bash git-init.sh
git checkout
}
}
function build_managed() {
local service=$1
local version=$2
echo building managed
clone_msaas
if [[ $service == 'chalice' ]]; then
cd $MSAAS_REPO_FOLDER/openreplay/api
else
cd $MSAAS_REPO_FOLDER/openreplay/$service
fi
IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash build.sh >> /tmp/arm.txt
}
# Checking for backend images
ls backend/cmd >> /tmp/backend.txt
echo Services: "${{ github.event.inputs.services }}"
IFS=',' read -ra SERVICES <<< "${{ github.event.inputs.services }}"
BUILD_SCRIPT_NAME="build.sh"
# Build FOSS
for SERVICE in "${SERVICES[@]}"; do
# Check if service is backend
if grep -q $SERVICE /tmp/backend.txt; then
cd backend
foss_build_args="nil $SERVICE"
ee_build_args="ee $SERVICE"
else
[[ $SERVICE == 'chalice' || $SERVICE == 'alerts' || $SERVICE == 'crons' ]] && cd $working_dir/api || cd $SERVICE
[[ $SERVICE == 'alerts' || $SERVICE == 'crons' ]] && BUILD_SCRIPT_NAME="build_${SERVICE}.sh"
ee_build_args="ee"
fi
version=$(image_version $SERVICE)
echo IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $foss_build_args
IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $foss_build_args
echo IMAGE_TAG=$version-ee DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $ee_build_args
IMAGE_TAG=$version-ee DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $ee_build_args
if [[ "$SERVICE" != "chalice" && "$SERVICE" != "frontend" ]]; then
IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $foss_build_args
echo IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $foss_build_args
else
build_managed $SERVICE $version
fi
cd $working_dir
chart_path="$working_dir/scripts/helmcharts/openreplay/charts/$SERVICE/Chart.yaml"
yq eval ".AppVersion = \"$version\"" -i $chart_path
git add $chart_path
git commit -m "Increment $SERVICE chart version"
done
- name: Change commit timestamp
run: |
# Convert the timestamp to a date format git can understand
NEW_DATE=$(perl -le 'print scalar gmtime($ARGV[0])." +0000"' $NEW_TIMESTAMP)
echo "Setting commit date to: $NEW_DATE"
# Amend the commit with the new date
GIT_COMMITTER_DATE="$NEW_DATE" git commit --amend --no-edit --date="$NEW_DATE"
# Verify the change
git log -1 --pretty=format:"Commit now dated: %cD"
# git tag and push
git tag $INPUT_TAG -f
git push origin $INPUT_TAG -f
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }}
# DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }}
# MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }}
# MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }}
# MSAAS_REPO_FOLDER: /tmp/msaas
# with:
# limit-access-to-actor: true

261
.github/workflows/patch-build.yaml vendored Normal file
View file

@ -0,0 +1,261 @@
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
on:
workflow_dispatch:
inputs:
services:
description: 'Comma separated names of services to build(in small letters).'
required: true
default: 'chalice,frontend'
name: Build patches from main branch, Raise PR to Main, and Push to tag
jobs:
deploy:
name: Build Patch from main
runs-on: ubuntu-latest
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Rebase with main branch, to make sure the code has latest main changes
if: github.ref != 'refs/heads/main'
run: |
git remote -v
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git config --global rebase.autoStash true
git fetch origin main:main
git rebase main
git log -3
- name: Downloading yq
run: |
VERSION="v4.42.1"
sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
# Configure AWS credentials for the first registry
- name: Configure AWS credentials for RELEASE_ARM_REGISTRY
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_DEPOT_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_DEPOT_SECRET_KEY }}
aws-region: ${{ secrets.AWS_DEPOT_DEFAULT_REGION }}
- name: Login to Amazon ECR for RELEASE_ARM_REGISTRY
id: login-ecr-arm
run: |
aws ecr get-login-password --region ${{ secrets.AWS_DEPOT_DEFAULT_REGION }} | docker login --username AWS --password-stdin ${{ secrets.RELEASE_ARM_REGISTRY }}
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.RELEASE_OSS_REGISTRY }}
- uses: depot/setup-action@v1
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
- name: Get HEAD Commit ID
run: echo "HEAD_COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Define Branch Name
run: echo "BRANCH_NAME=patch/main/${HEAD_COMMIT_ID}" >> $GITHUB_ENV
- name: Set Remote with GITHUB_TOKEN
run: |
git config --unset http.https://github.com/.extraheader
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git
- name: Build
id: build-image
env:
DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }}
DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }}
MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }}
MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }}
MSAAS_REPO_FOLDER: /tmp/msaas
SERVICES_INPUT: ${{ github.event.inputs.services }}
run: |
#!/bin/bash
set -euo pipefail
# Configuration
readonly WORKING_DIR=$(pwd)
readonly BUILD_SCRIPT_NAME="build.sh"
readonly BACKEND_SERVICES_FILE="/tmp/backend.txt"
# Initialize git configuration
setup_git() {
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout -b "$BRANCH_NAME"
}
# Get and increment image version
image_version() {
local service=$1
local chart_path="$WORKING_DIR/scripts/helmcharts/openreplay/charts/$service/Chart.yaml"
local current_version new_version
current_version=$(yq eval '.AppVersion' "$chart_path")
new_version=$(echo "$current_version" | awk -F. '{$NF += 1; print $1"."$2"."$3}')
echo "$new_version"
}
# Clone MSAAS repository if not exists
clone_msaas() {
if [[ ! -d "$MSAAS_REPO_FOLDER" ]]; then
git clone -b dev --recursive "https://x-access-token:${MSAAS_REPO_CLONE_TOKEN}@${MSAAS_REPO_URL}" "$MSAAS_REPO_FOLDER"
cd "$MSAAS_REPO_FOLDER"
cd openreplay && git fetch origin && git checkout main
git log -1
cd "$MSAAS_REPO_FOLDER"
bash git-init.sh
git checkout
fi
}
# Build managed services
build_managed() {
local service=$1
local version=$2
echo "Building managed service: $service"
clone_msaas
if [[ $service == 'chalice' ]]; then
cd "$MSAAS_REPO_FOLDER/openreplay/api"
else
cd "$MSAAS_REPO_FOLDER/openreplay/$service"
fi
local build_cmd="IMAGE_TAG=$version DOCKER_RUNTIME=depot DOCKER_BUILD_ARGS=--push ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash build.sh"
echo "Executing: $build_cmd"
if ! eval "$build_cmd" 2>&1; then
echo "Build failed for $service"
exit 1
fi
}
# Build service with given arguments
build_service() {
local service=$1
local version=$2
local build_args=$3
local build_script=${4:-$BUILD_SCRIPT_NAME}
local command="IMAGE_TAG=$version DOCKER_RUNTIME=depot DOCKER_BUILD_ARGS=--push ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash $build_script $build_args"
echo "Executing: $command"
eval "$command"
}
# Update chart version and commit changes
update_chart_version() {
local service=$1
local version=$2
local chart_path="$WORKING_DIR/scripts/helmcharts/openreplay/charts/$service/Chart.yaml"
# Ensure we're in the original working directory/repository
cd "$WORKING_DIR"
yq eval ".AppVersion = \"$version\"" -i "$chart_path"
git add "$chart_path"
git commit -m "Increment $service chart version to $version"
git push --set-upstream origin "$BRANCH_NAME"
cd -
}
# Main execution
main() {
setup_git
# Get backend services list
ls backend/cmd >"$BACKEND_SERVICES_FILE"
# Parse services input (fix for GitHub Actions syntax)
echo "Services: ${SERVICES_INPUT:-$1}"
IFS=',' read -ra services <<<"${SERVICES_INPUT:-$1}"
# Process each service
for service in "${services[@]}"; do
echo "Processing service: $service"
cd "$WORKING_DIR"
local foss_build_args="" ee_build_args="" build_script="$BUILD_SCRIPT_NAME"
# Determine build configuration based on service type
if grep -q "$service" "$BACKEND_SERVICES_FILE"; then
# Backend service
cd backend
foss_build_args="nil $service"
ee_build_args="ee $service"
else
# Non-backend service
case "$service" in
chalice | alerts | crons)
cd "$WORKING_DIR/api"
;;
*)
cd "$service"
;;
esac
# Special build scripts for alerts/crons
if [[ $service == 'alerts' || $service == 'crons' ]]; then
build_script="build_${service}.sh"
fi
ee_build_args="ee"
fi
# Get version and build
local version
version=$(image_version "$service")
# Build FOSS and EE versions
build_service "$service" "$version" "$foss_build_args"
build_service "$service" "${version}-ee" "$ee_build_args"
# Build managed version for specific services
if [[ "$service" != "chalice" && "$service" != "frontend" ]]; then
echo "Nothing to build in managed for service $service"
else
build_managed "$service" "$version"
fi
# Update chart and commit
update_chart_version "$service" "$version"
done
cd "$WORKING_DIR"
# Cleanup
rm -f "$BACKEND_SERVICES_FILE"
}
echo "Working directory: $WORKING_DIR"
# Run main function with all arguments
main "$SERVICES_INPUT"
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.ACTIONS_COMMMIT_TOKEN }}
source_branch: ${{ env.BRANCH_NAME }}
destination_branch: "main"
pr_title: "Updated patch build from main ${{ env.HEAD_COMMIT_ID }}"
pr_body: |
This PR updates the Helm chart version after building the patch from $HEAD_COMMIT_ID.
Once this PR is merged, tag update job will run automatically.
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }}
# DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }}
# MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }}
# MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }}
# MSAAS_REPO_FOLDER: /tmp/msaas
# with:
# limit-access-to-actor: true

View file

@ -1,143 +0,0 @@
# This action will push the peers changes to aws
on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
required: false
default: 'false'
push:
branches:
- dev
- api-*
paths:
- "ee/peers/**"
- "peers/**"
- "!peers/.gitignore"
- "!peers/*-dev.sh"
name: Build and Deploy Peers EE
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing peers image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd peers
PUSH_IMAGE=0 bash -x ./build.sh ee
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("peers")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("peers")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
# We've to strip off the -ee, as helm will append it.
tag: `echo ${image_array[1]} | cut -d '-' -f 1`
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/peers/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,peers,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,peers,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# ENVIRONMENT: staging
#

View file

@ -1,140 +0,0 @@
# This action will push the peers changes to aws
on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
required: false
default: 'false'
push:
branches:
- dev
- api-*
paths:
- "peers/**"
- "!peers/.gitignore"
- "!peers/*-dev.sh"
name: Build and Deploy Peers
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing peers image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd peers
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("peers")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("peers")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
# Update changed image tag
sed -i "/peers/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,peers,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,peers,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
# - name: Debug Job
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# ENVIRONMENT: staging

View file

@ -83,4 +83,4 @@ jobs:
]
}
EOF
aws route53 change-resource-record-sets --hosted-zone-id ${{ secrets.OR_PR_HOSTED_ZONE_ID }} --change-batch file://route53-changes.json
iws route53 change-resource-record-sets --hosted-zone-id ${{ secrets.OR_PR_HOSTED_ZONE_ID }} --change-batch file://route53-changes.json

View file

@ -329,10 +329,12 @@ jobs:
# run: |
# # Add any cleanup commands if necessary
- name: Debug Job
if: failure()
uses: mxschmitt/action-tmate@v3
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.sha }}
ENVIRONMENT: staging
# - name: Debug Job
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# iimit-access-to-actor: true

View file

@ -0,0 +1,103 @@
name: Release Deployment
on:
workflow_dispatch:
inputs:
services:
description: 'Comma-separated list of services to deploy. eg: frontend,api,sink'
required: true
branch:
description: 'Branch to deploy (defaults to dev)'
required: false
default: 'dev'
env:
IMAGE_REGISTRY_URL: ${{ secrets.OSS_REGISTRY_URL }}
DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }}
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Docker login
run: |
docker login $IMAGE_REGISTRY_URL -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- name: Set image tag with branch info
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
echo "IMAGE_TAG=${{ github.event.inputs.branch }}-${SHORT_SHA}" >> $GITHUB_ENV
echo "Using image tag: $IMAGE_TAG"
- uses: depot/setup-action@v1
- name: Build and push Docker images
run: |
# Parse the comma-separated services list into an array
IFS=',' read -ra SERVICES <<< "${{ github.event.inputs.services }}"
working_dir=$(pwd)
# Define backend services (consider moving this to workflow inputs or repo config)
ls backend/cmd >> /tmp/backend.txt
BUILD_SCRIPT_NAME="build.sh"
for SERVICE in "${SERVICES[@]}"; do
# Check if service is backend
if grep -q $SERVICE /tmp/backend.txt; then
cd $working_dir/backend
foss_build_args="nil $SERVICE"
ee_build_args="ee $SERVICE"
else
cd $working_dir
[[ $SERVICE == 'chalice' || $SERVICE == 'alerts' || $SERVICE == 'crons' ]] && cd $working_dir/api || cd $SERVICE
[[ $SERVICE == 'alerts' || $SERVICE == 'crons' ]] && BUILD_SCRIPT_NAME="build_${SERVICE}.sh"
ee_build_args="ee"
fi
{
echo IMAGE_TAG=$IMAGE_TAG DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$IMAGE_REGISTRY_URL PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $foss_build_args
IMAGE_TAG=$IMAGE_TAG DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$IMAGE_REGISTRY_URL PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $foss_build_args
}&
{
echo IMAGE_TAG=${IMAGE_TAG}-ee DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$IMAGE_REGISTRY_URL PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $ee_build_args
IMAGE_TAG=${IMAGE_TAG}-ee DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$IMAGE_REGISTRY_URL PUSH_IMAGE=0 bash ${BUILD_SCRIPT_NAME} $ee_build_args
}&
done
wait
- uses: azure/k8s-set-context@v1
name: Using ee release cluster
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_RELEASE_KUBECONFIG }}
- name: Deploy to ee release Kubernetes
run: |
echo "Deploying services to EE cluster: ${{ github.event.inputs.services }}"
IFS=',' read -ra SERVICES <<< "${{ github.event.inputs.services }}"
for SERVICE in "${SERVICES[@]}"; do
SERVICE=$(echo $SERVICE | xargs) # Trim whitespace
echo "Deploying $SERVICE to EE cluster with image tag: ${IMAGE_TAG}"
kubectl set image deployment/$SERVICE-openreplay -n app $SERVICE=${IMAGE_REGISTRY_URL}/$SERVICE:${IMAGE_TAG}-ee
done
- uses: azure/k8s-set-context@v1
name: Using foss release cluster
with:
method: kubeconfig
kubeconfig: ${{ secrets.FOSS_RELEASE_KUBECONFIG }}
- name: Deploy to FOSS release Kubernetes
run: |
echo "Deploying services to FOSS cluster: ${{ github.event.inputs.services }}"
IFS=',' read -ra SERVICES <<< "${{ github.event.inputs.services }}"
for SERVICE in "${SERVICES[@]}"; do
SERVICE=$(echo $SERVICE | xargs) # Trim whitespace
echo "Deploying $SERVICE to FOSS cluster with image tag: ${IMAGE_TAG}"
echo "Deploying $SERVICE to FOSS cluster with image tag: ${IMAGE_TAG}"
kubectl set image deployment/$SERVICE-openreplay -n app $SERVICE=${IMAGE_REGISTRY_URL}/$SERVICE:${IMAGE_TAG}
done

View file

@ -1,21 +1,21 @@
# This action will push the sourcemapreader changes to aws
# This action will push the sourcemapreader changes to ee
on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
paths:
- "ee/sourcemap-reader/**"
- "sourcemap-reader/**"
- "!sourcemap-reader/.gitignore"
- "!sourcemap-reader/*-dev.sh"
name: Build and Deploy sourcemap-reader
name: Build and Deploy sourcemap-reader EE
jobs:
deploy:
@ -23,120 +23,128 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing sourcemaps-reader image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd sourcemap-reader
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- name: Building and Pushing sourcemaps-reader image
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd sourcemap-reader
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("sourcemaps-reader")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("sourcemaps-reader")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("sourcemaps-reader")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
# Update changed image tag
sed -i "/sourcemaps-reader/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
sed -i "s/sourcemaps-reader/sourcemapreader/g" /tmp/image_override.yaml
# Update changed image tag
sed -i "/sourcemaps-reader/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
sed -i "s/sourcemaps-reader/sourcemapreader/g" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,sourcemapreader,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,sourcemapreader,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,sourcemapreader,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -3,13 +3,12 @@ on:
workflow_dispatch:
inputs:
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- api-*
paths:
- "sourcemap-reader/**"
- "!sourcemap-reader/.gitignore"
@ -23,119 +22,128 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Building and Pushing sourcemaps-reader image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd sourcemap-reader
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
- name: Building and Pushing sourcemaps-reader image
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
cd sourcemap-reader
PUSH_IMAGE=0 bash -x ./build.sh
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
images=("sourcemaps-reader")
for image in ${images[*]};do
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("sourcemaps-reader")
for image in ${images[*]};do
./trivy image --exit-code 1 --security-checks vuln --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
images=("sourcemaps-reader")
for image in ${images[*]};do
docker push $DOCKER_REPO/$image:$IMAGE_TAG
done
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
- name: Creating old image input
run: |
#
# Create yaml with existing image tags
#
kubectl get pods -n app -o jsonpath="{.items[*].spec.containers[*].image}" |\
tr -s '[[:space:]]' '\n' | sort | uniq -c | grep '/foss/' | cut -d '/' -f3 > /tmp/image_tag.txt
echo > /tmp/image_override.yaml
echo > /tmp/image_override.yaml
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
for line in `cat /tmp/image_tag.txt`;
do
image_array=($(echo "$line" | tr ':' '\n'))
cat <<EOF >> /tmp/image_override.yaml
${image_array[0]}:
image:
tag: ${image_array[1]}
EOF
done
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
- name: Deploy to kubernetes
run: |
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
# Update changed image tag
sed -i "/sourcemaps-reader/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
sed -i "s/sourcemaps-reader/sourcemapreader/g" /tmp/image_override.yaml
# Update changed image tag
sed -i "/sourcemaps-reader/{n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
sed -i "s/sourcemaps-reader/sourcemapreader/g" /tmp/image_override.yaml
cat /tmp/image_override.yaml
# Deploy command
mkdir -p /tmp/charts
mv openreplay/charts/{ingress-nginx,sourcemapreader,quickwit,connector} /tmp/charts/
rm -rf openreplay/charts/*
mv /tmp/charts/* openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
cat /tmp/image_override.yaml
# Deploy command
mv openreplay/charts/{ingress-nginx,sourcemapreader,quickwit} /tmp
rm -rf openreplay/charts/*
mv /tmp/{ingress-nginx,sourcemapreader,quickwit} openreplay/charts/
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f -
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
# with:
# limit-access-to-actor: true

View file

@ -9,24 +9,16 @@ on:
pull_request:
branches: [ "dev", "main" ]
paths:
- frontend/**
- tracker/**
jobs:
build-and-test:
runs-on: macos-latest
name: Build and test Tracker
strategy:
matrix:
node-version: [ 18.x ]
steps:
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache tracker modules
uses: actions/cache@v3
with:
@ -72,4 +64,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tracker
name: tracker
iame: tracker

View file

@ -27,9 +27,9 @@ jobs:
name: Build and test Tracker plus Replayer
strategy:
matrix:
node-version: [ 18.x ]
node-version: [ 20.x ]
steps:
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/checkout@v3
@ -102,11 +102,11 @@ jobs:
- name: Setup packages
run: |
cd frontend
npm install --legacy-peer-deps
yarn
- name: Run unit tests
run: |
cd frontend
npm run test:ci
yarn test:ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
@ -138,12 +138,13 @@ jobs:
- name: (Chrome) Run visual tests
run: |
cd frontend
npm run cy:test
yarn cy:test
# firefox have different viewport somehow
# - name: (Firefox) Run visual tests
# run: yarn cy:test-firefox
# - name: (Edge) Run visual tests
# run: yarn cy:test-edge
timeout-minutes: 5
- name: Upload Debug
if: ${{ failure() }}
uses: actions/upload-artifact@v3

42
.github/workflows/update-tag.yaml vendored Normal file
View file

@ -0,0 +1,42 @@
on:
pull_request:
types: [closed]
branches:
- main
name: Release tag update --force
jobs:
deploy:
name: Build Patch from main
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event.inputs.services == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get latest release tag using GitHub API
id: get-latest-tag
run: |
LATEST_TAG=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/latest" \
| jq -r .tag_name)
# Fallback to git command if API doesn't return a tag
if [ "$LATEST_TAG" == "null" ] || [ -z "$LATEST_TAG" ]; then
echo "Not found latest tag"
exit 100
fi
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
echo "Latest tag: $LATEST_TAG"
- name: Set Remote with GITHUB_TOKEN
run: |
git config --unset http.https://github.com/.extraheader
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}
- name: Push main branch to tag
run: |
git checkout main
echo "Updating tag ${{ env.LATEST_TAG }} to point to latest commit on main"
git push origin HEAD:refs/tags/${{ env.LATEST_TAG }} --force

View file

@ -6,14 +6,14 @@ on:
build_service:
description: 'Name of a single service to build(in small letters). "all" to build everything'
required: false
default: 'false'
default: "false"
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- dev
paths:
- ee/backend/**
- backend/**
@ -26,154 +26,168 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
# ref: staging
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
# ref: staging
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.EE_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.EE_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.EE_LICENSE_KEY }}
minio_access_key: ${{ secrets.EE_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.EE_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.EE_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Docker login
run: |
docker login ${{ secrets.EE_REGISTRY_URL }} -u ${{ secrets.EE_DOCKER_USERNAME }} -p "${{ secrets.EE_REGISTRY_TOKEN }}"
# # Caching docker images
# - uses: satackey/action-docker-layer-caching@v0.0.11
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
- name: Downloading yq
run: |
VERSION="v4.42.1"
sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: Build, tag
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
#
# TODO: Check the container tags are same, then skip the build and deployment.
#
# Build a docker container and push it to Docker Registry so that it can be deployed to Kubernetes cluster.
#
# Getting the images to build
#
set -x
touch /tmp/images_to_build.txt
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
tmp_param=${{ github.event.inputs.build_service }}
build_param=${tmp_param:-'false'}
case ${build_param} in
false)
{
git diff --name-only HEAD HEAD~1 | grep -E "backend/pkg|backend/internal" | grep -vE ^ee/ | cut -d '/' -f3 | uniq | while read -r pkg_name ; do
grep -rl "pkg/$pkg_name" backend/services backend/cmd | cut -d '/' -f3
done
} | awk '!seen[$0]++' > /tmp/images_to_build.txt
;;
all)
ls backend/cmd > /tmp/images_to_build.txt
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.EE_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# # Caching docker images
# - uses: satackey/action-docker-layer-caching@v0.0.11
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
- name: Build, tag
id: build-image
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}-ee
ENVIRONMENT: staging
run: |
#
# TODO: Check the container tags are same, then skip the build and deployment.
#
# Build a docker container and push it to Docker Registry so that it can be deployed to Kubernetes cluster.
#
# Getting the images to build
#
set -x
touch /tmp/images_to_build.txt
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
tmp_param=${{ github.event.inputs.build_service }}
build_param=${tmp_param:-'false'}
case ${build_param} in
false)
{
git diff --name-only HEAD HEAD~1 | grep -E "backend/pkg|backend/internal" | grep -vE ^ee/ | cut -d '/' -f3 | uniq | while read -r pkg_name ; do
grep -rl "pkg/$pkg_name" backend/services backend/cmd | cut -d '/' -f3
done
} | awk '!seen[$0]++' > /tmp/images_to_build.txt
;;
*)
echo ${{github.event.inputs.build_service }} > /tmp/images_to_build.txt
;;
esac
all)
ls backend/cmd > /tmp/images_to_build.txt
;;
*)
echo ${{github.event.inputs.build_service }} > /tmp/images_to_build.txt
;;
esac
if [[ $(cat /tmp/images_to_build.txt) == "" ]]; then
echo "Nothing to build here"
touch /tmp/nothing-to-build-here
exit 0
fi
#
# Pushing image to registry
#
cd backend
cat /tmp/images_to_build.txt
for image in $(cat /tmp/images_to_build.txt);
do
echo "Bulding $image"
PUSH_IMAGE=0 bash -x ./build.sh ee $image
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
./trivy image --exit-code 1 --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
if [[ $(cat /tmp/images_to_build.txt) == "" ]]; then
echo "Nothing to build here"
touch /tmp/nothing-to-build-here
exit 0
fi
#
# Pushing image to registry
#
cd backend
cat /tmp/images_to_build.txt
for image in $(cat /tmp/images_to_build.txt);
do
echo "Bulding $image"
PUSH_IMAGE=0 bash -x ./build.sh ee $image
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
} && {
echo "Skipping Security Checks"
}
docker push $DOCKER_REPO/$image:$IMAGE_TAG
echo "::set-output name=image::$DOCKER_REPO/$image:$IMAGE_TAG"
done
docker push $DOCKER_REPO/$image:$IMAGE_TAG
echo "::set-output name=image::$DOCKER_REPO/$image:$IMAGE_TAG"
done
- name: Deploying to kuberntes
env:
# We're not passing -ee flag, because helm will add that.
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
run: |
#
# Deploying image to environment.
#
set -x
[[ -f /tmp/nothing-to-build-here ]] && exit 0
cd scripts/helmcharts/
- name: Deploying to kuberntes
env:
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
run: |
#
# Deploying image to environment.
#
set -x
[[ -f /tmp/nothing-to-build-here ]] && exit 0
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.EE_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.EE_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.EE_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.EE_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.EE_DOMAIN_NAME }}\"/g" vars.yaml
sed -i "s/enterpriseEditionLicense: \"\"/enterpriseEditionLicense: \"${{ secrets.EE_LICENSE_KEY }}\"/g" vars.yaml
set -x
echo > /tmp/image_override.yaml
mkdir /tmp/helmcharts
mv openreplay/charts/ingress-nginx /tmp/helmcharts/
mv openreplay/charts/quickwit /tmp/helmcharts/
mv openreplay/charts/connector /tmp/helmcharts/
## Update images
for image in $(cat /tmp/images_to_build.txt);
do
mv openreplay/charts/$image /tmp/helmcharts/
cat <<EOF>>/tmp/image_override.yaml
${image}:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
done
ls /tmp/helmcharts
rm -rf openreplay/charts/*
ls openreplay/charts
mv /tmp/helmcharts/* openreplay/charts/
ls openreplay/charts
set -x
echo > /tmp/image_override.yaml
mkdir /tmp/helmcharts
mv openreplay/charts/ingress-nginx /tmp/helmcharts/
mv openreplay/charts/quickwit /tmp/helmcharts/
## Update images
for image in $(cat /tmp/images_to_build.txt);
do
mv openreplay/charts/$image /tmp/helmcharts/
cat <<EOF>>/tmp/image_override.yaml
${image}:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
done
ls /tmp/helmcharts
rm -rf openreplay/charts/*
ls openreplay/charts
mv /tmp/helmcharts/* openreplay/charts/
ls openreplay/charts
# Deploy command
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true | kubectl apply -f -
# Deploy command
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true | kubectl apply -f -
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ee
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
#
# with:
# iimit-access-to-actor: true

View file

@ -6,14 +6,14 @@ on:
build_service:
description: 'Name of a single service to build(in small letters). "all" to build everything'
required: false
default: 'false'
default: "false"
skip_security_checks:
description: 'Skip Security checks if there is a unfixable vuln or error. Value: true/false'
description: "Skip Security checks if there is a unfixable vuln or error. Value: true/false"
required: false
default: 'false'
default: "false"
push:
branches:
- dev
- dev
paths:
- backend/**
@ -25,152 +25,162 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
# ref: staging
- name: Checkout
uses: actions/checkout@v2
with:
# We need to diff with old commit
# to see which workers got changed.
fetch-depth: 2
# ref: staging
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: ./.github/composite-actions/update-keys
with:
assist_jwt_secret: ${{ secrets.ASSIST_JWT_SECRET }}
assist_key: ${{ secrets.ASSIST_KEY }}
domain_name: ${{ secrets.OSS_DOMAIN_NAME }}
jwt_refresh_secret: ${{ secrets.JWT_REFRESH_SECRET }}
jwt_secret: ${{ secrets.OSS_JWT_SECRET }}
jwt_spot_refresh_secret: ${{ secrets.JWT_SPOT_REFRESH_SECRET }}
jwt_spot_secret: ${{ secrets.JWT_SPOT_SECRET }}
license_key: ${{ secrets.OSS_LICENSE_KEY }}
minio_access_key: ${{ secrets.OSS_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.OSS_MINIO_SECRET_KEY }}
pg_password: ${{ secrets.OSS_PG_PASSWORD }}
registry_url: ${{ secrets.OSS_REGISTRY_URL }}
name: Update Keys
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
# Caching docker images
# - uses: satackey/action-docker-layer-caching@v0.0.11
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
- name: Docker login
run: |
docker login ${{ secrets.OSS_REGISTRY_URL }} -u ${{ secrets.OSS_DOCKER_USERNAME }} -p "${{ secrets.OSS_REGISTRY_TOKEN }}"
- uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
id: setcontext
- name: Build, tag
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
#
# TODO: Check the container tags are same, then skip the build and deployment.
#
# Build a docker container and push it to Docker Registry so that it can be deployed to Kubernetes cluster.
#
# Getting the images to build
#
set -xe
touch /tmp/images_to_build.txt
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
tmp_param=${{ github.event.inputs.build_service }}
build_param=${tmp_param:-'false'}
case ${build_param} in
false)
{
git diff --name-only HEAD HEAD~1 | grep -E "backend/pkg|backend/internal" | grep -vE ^ee/ | cut -d '/' -f3 | uniq | while read -r pkg_name ; do
grep -rl "pkg/$pkg_name" backend/services backend/cmd | cut -d '/' -f3
done
} | awk '!seen[$0]++' > /tmp/images_to_build.txt
;;
all)
ls backend/cmd > /tmp/images_to_build.txt
# Caching docker images
# - uses: satackey/action-docker-layer-caching@v0.0.11
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
- name: Build, tag
id: build-image
env:
DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
ENVIRONMENT: staging
run: |
#
# TODO: Check the container tags are same, then skip the build and deployment.
#
# Build a docker container and push it to Docker Registry so that it can be deployed to Kubernetes cluster.
#
# Getting the images to build
#
set -xe
touch /tmp/images_to_build.txt
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
tmp_param=${{ github.event.inputs.build_service }}
build_param=${tmp_param:-'false'}
case ${build_param} in
false)
{
git diff --name-only HEAD HEAD~1 | grep -E "backend/pkg|backend/internal" | grep -vE ^ee/ | cut -d '/' -f3 | uniq | while read -r pkg_name ; do
grep -rl "pkg/$pkg_name" backend/services backend/cmd | cut -d '/' -f3
done
} | awk '!seen[$0]++' > /tmp/images_to_build.txt
;;
*)
echo ${{github.event.inputs.build_service }} > /tmp/images_to_build.txt
;;
esac
all)
ls backend/cmd > /tmp/images_to_build.txt
;;
*)
echo ${{github.event.inputs.build_service }} > /tmp/images_to_build.txt
;;
esac
if [[ $(cat /tmp/images_to_build.txt) == "" ]]; then
echo "Nothing to build here"
touch /tmp/nothing-to-build-here
exit 0
fi
#
# Pushing image to registry
#
cd backend
cat /tmp/images_to_build.txt
for image in $(cat /tmp/images_to_build.txt);
do
echo "Bulding $image"
PUSH_IMAGE=0 bash -x ./build.sh skip $image
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
./trivy image --exit-code 1 --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
if [[ $(cat /tmp/images_to_build.txt) == "" ]]; then
echo "Nothing to build here"
touch /tmp/nothing-to-build-here
exit 0
fi
#
# Pushing image to registry
#
cd backend
cat /tmp/images_to_build.txt
for image in $(cat /tmp/images_to_build.txt);
do
echo "Bulding $image"
PUSH_IMAGE=0 bash -x ./build.sh skip $image
[[ "x$skip_security_checks" == "xtrue" ]] || {
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
./trivy image --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --exit-code 1 --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
err_code=$?
[[ $err_code -ne 0 ]] && {
exit $err_code
}
} && {
echo "Skipping Security Checks"
}
} && {
echo "Skipping Security Checks"
}
docker push $DOCKER_REPO/$image:$IMAGE_TAG
echo "::set-output name=image::$DOCKER_REPO/$image:$IMAGE_TAG"
done
docker push $DOCKER_REPO/$image:$IMAGE_TAG
echo "::set-output name=image::$DOCKER_REPO/$image:$IMAGE_TAG"
done
- name: Deploying to kuberntes
env:
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
run: |
#
# Deploying image to environment.
#
set -x
[[ -f /tmp/nothing-to-build-here ]] && exit 0
cd scripts/helmcharts/
- name: Deploying to kuberntes
env:
IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }}
run: |
#
# Deploying image to environment.
#
set -x
[[ -f /tmp/nothing-to-build-here ]] && exit 0
cd scripts/helmcharts/
## Update secerts
sed -i "s#openReplayContainerRegistry.*#openReplayContainerRegistry: \"${{ secrets.OSS_REGISTRY_URL }}\"#g" vars.yaml
sed -i "s/postgresqlPassword: \"changeMePassword\"/postgresqlPassword: \"${{ secrets.OSS_PG_PASSWORD }}\"/g" vars.yaml
sed -i "s/accessKey: \"changeMeMinioAccessKey\"/accessKey: \"${{ secrets.OSS_MINIO_ACCESS_KEY }}\"/g" vars.yaml
sed -i "s/secretKey: \"changeMeMinioPassword\"/secretKey: \"${{ secrets.OSS_MINIO_SECRET_KEY }}\"/g" vars.yaml
sed -i "s/jwt_secret: \"SetARandomStringHere\"/jwt_secret: \"${{ secrets.OSS_JWT_SECRET }}\"/g" vars.yaml
sed -i "s/domainName: \"\"/domainName: \"${{ secrets.OSS_DOMAIN_NAME }}\"/g" vars.yaml
set -x
echo > /tmp/image_override.yaml
mkdir /tmp/helmcharts
mv openreplay/charts/ingress-nginx /tmp/helmcharts/
mv openreplay/charts/quickwit /tmp/helmcharts/
mv openreplay/charts/connector /tmp/helmcharts/
## Update images
for image in $(cat /tmp/images_to_build.txt);
do
mv openreplay/charts/$image /tmp/helmcharts/
cat <<EOF>>/tmp/image_override.yaml
${image}:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
done
ls /tmp/helmcharts
rm -rf openreplay/charts/*
ls openreplay/charts
mv /tmp/helmcharts/* openreplay/charts/
ls openreplay/charts
set -x
echo > /tmp/image_override.yaml
mkdir /tmp/helmcharts
mv openreplay/charts/ingress-nginx /tmp/helmcharts/
mv openreplay/charts/quickwit /tmp/helmcharts/
## Update images
for image in $(cat /tmp/images_to_build.txt);
do
mv openreplay/charts/$image /tmp/helmcharts/
cat <<EOF>>/tmp/image_override.yaml
${image}:
image:
# We've to strip off the -ee, as helm will append it.
tag: ${IMAGE_TAG}
EOF
done
ls /tmp/helmcharts
rm -rf openreplay/charts/*
ls openreplay/charts
mv /tmp/helmcharts/* openreplay/charts/
ls openreplay/charts
# Deploy command
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true | kubectl apply -f -
# Deploy command
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true | kubectl apply -f -
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: 'Build failed :bomb:'
- name: Alert slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: foss
SLACK_TITLE: "Failed ${{ github.workflow }}"
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }}
SLACK_USERNAME: "OR Bot"
SLACK_MESSAGE: "Build failed :bomb:"
# - name: Debug Job
# if: ${{ failure() }}
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# env:
# DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}
# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# IMAGE_TAG: ${{ github.sha }}-ee
# ENVIRONMENT: staging
#
# with:
# iimit-access-to-actor: true
#

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "ee/intelligent_search/llama"]
path = ee/intelligent_search/llama
url = https://github.com/facebookresearch/llama.git

702
LICENSE
View file

@ -1,64 +1,694 @@
Copyright (c) 2022 Asayer, Inc.
Copyright (c) 2021-2025 Asayer, Inc dba OpenReplay
OpenReplay monorepo uses multiple licenses. Portions of this software are licensed as follows:
- All content that resides under the "ee/" directory of this repository, is licensed under the license defined in "ee/LICENSE".
- Some directories have a specific LICENSE file and are licensed under the "MIT" license, as defined below.
- Content outside of the above mentioned directories or restrictions defaults to the "Elastic License 2.0 (ELv2)" license, as defined below.
- All third party components incorporated into the OpenReplay Software are licensed under the original license provided by the owner of the applicable component.
- Some directories are licensed under the "MIT" license, as defined below.
- Content outside of the above mentioned directories or restrictions defaults to the "GNU Affero General Public License Version 3 (AGPL v3)" license, as defined below.
Reach out (license@openreplay.com) if you have any questions regarding licenses.
------------------------------------------------------------------------------------
MIT License
--------------------------------------------------------------------------------
MIT LICENSE
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------------
Elastic License 2.0 (ELv2)
--------------------------------------------------------------------------------
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
**Acceptance**
By using the software, you agree to all of the terms and conditions below.
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
**Copyright License**
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
Preamble
**Limitations**
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensors trademarks is subject to applicable law.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
**Patents**
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
**Notices**
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
**No Other Rights**
These terms do not imply any licenses other than those expressly granted in these terms.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
**Termination**
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
The precise terms and conditions for copying, distribution and
modification follow.
**No Liability**
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
TERMS AND CONDITIONS
**Definitions**
The *licensor* is the entity offering these terms, and the *software* is the software the licensor makes available under these terms, including any portion of it.
0. Definitions.
*you* refers to the individual or entity agreeing to these terms.
"This License" refers to version 3 of the GNU Affero General Public License.
*your company* is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. *control* means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
*your licenses* are all the licenses granted to you for the software under these terms.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
*use* means anything you do with the software requiring one of your licenses.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
*trademark* means trademarks, service marks, and similar rights.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View file

@ -44,7 +44,7 @@
</a>
</p>
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.
OpenReplay is an open-source session replay suite you can host yourself, that lets you see what users do on your web app, helping you troubleshoot issues faster.
- **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 ~26KB (.br) tracker that asynchronously sends minimal data for a very limited impact on performance.
@ -55,9 +55,9 @@ OpenReplay is a session replay suite you can host yourself, that lets you see wh
## Features
- **Session replay:** Lets you relive your users' experience, see where they struggle and how it affects their behavior. Each session replay is automatically analyzed based on heuristics, for easy triage.
- **Spot:** A Chrome extension that lets record bugs directly from your browser — each recording includes all the technical details developers need to fix them.
- **DevTools:** It's like debugging in your own browser. OpenReplay provides you with the full context (network activity, JS errors, store actions/state and 40+ metrics) so you can instantly reproduce bugs and understand performance issues.
- **Assist:** Helps you support your users by seeing their live screen and instantly hopping on call (WebRTC) with them without requiring any 3rd-party screen sharing software.
- **Feature flags:** Enable or disable a feature, make gradual releases and A/B test all without redeploying your app.
- **Omni-search:** Search and filter by almost any user action/criteria, session attribute or technical event, so you can answer any question. No instrumentation required.
- **Analytics:** For surfacing the most impactful issues causing conversion and revenue loss.
- **Fine-grained privacy controls:** Choose what to capture, what to obscure or what to ignore so user data doesn't even reach your servers.
@ -98,10 +98,6 @@ See our [Contributing Guide](CONTRIBUTING.md) for more details.
Also, feel free to join our [Slack](https://slack.openreplay.com) to ask questions, discuss ideas or connect with our contributors.
## Roadmap
Check out our [roadmap](https://www.notion.so/openreplay/Roadmap-889d2c3d968b4786ab9b281ab2394a94) and keep an eye on what's coming next. You're free to [submit](https://github.com/openreplay/openreplay/issues/new) new ideas and vote on features.
## License
This monorepo uses several licenses. See [LICENSE](/LICENSE) for more details.

3
api/.gitignore vendored
View file

@ -175,4 +175,5 @@ SUBNETS.json
./chalicelib/.configs
README/*
.local
.local
/.dev/

View file

@ -1,30 +1,31 @@
FROM python:3.11-alpine
LABEL Maintainer="Rajesh Rajendran<rjshrjndrn@gmail.com>"
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
ARG GIT_SHA
LABEL GIT_SHA=$GIT_SHA
FROM python:3.12-alpine AS builder
LABEL maintainer="Rajesh Rajendran<rjshrjndrn@gmail.com>"
LABEL maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
RUN apk add --no-cache build-base tini
RUN apk add --no-cache build-base
WORKDIR /work
COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade uv && \
export UV_SYSTEM_PYTHON=true && \
uv pip install --no-cache-dir --upgrade pip setuptools wheel && \
uv pip install --no-cache-dir --upgrade -r requirements.txt
FROM python:3.12-alpine
ARG GIT_SHA
ARG envarg
# Add Tini
# Startup daemon
ENV SOURCE_MAP_VERSION=0.7.4 \
APP_NAME=chalice \
LISTEN_PORT=8000 \
PRIVATE_ENDPOINTS=false \
ENTERPRISE_BUILD=${envarg} \
GIT_SHA=$GIT_SHA
APP_NAME=chalice \
LISTEN_PORT=8000 \
PRIVATE_ENDPOINTS=false \
ENTERPRISE_BUILD=${envarg} \
GIT_SHA=$GIT_SHA
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
WORKDIR /work
COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY . .
RUN mv env.default .env
RUN adduser -u 1001 openreplay -D
USER 1001
RUN apk add --no-cache tini && mv env.default .env
ENTRYPOINT ["/sbin/tini", "--"]
CMD ./entrypoint.sh
CMD ["./entrypoint.sh"]

View file

@ -1,4 +1,4 @@
FROM python:3.11-alpine
FROM python:3.12-alpine
LABEL Maintainer="Rajesh Rajendran<rjshrjndrn@gmail.com>"
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
ARG GIT_SHA
@ -16,7 +16,9 @@ ENV APP_NAME=alerts \
WORKDIR /work
COPY requirements-alerts.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN pip install --no-cache-dir --upgrade uv
RUN uv pip install --no-cache-dir --upgrade pip setuptools wheel --system
RUN uv pip install --no-cache-dir --upgrade -r requirements.txt --system
COPY . .
RUN mv env.default .env && mv app_alerts.py app.py && mv entrypoint_alerts.sh entrypoint.sh

View file

@ -4,22 +4,26 @@ verify_ssl = true
name = "pypi"
[packages]
requests = "==2.31.0"
boto3 = "==1.33.8"
pyjwt = "==2.8.0"
psycopg2-binary = "==2.9.9"
elasticsearch = "==8.11.0"
jira = "==3.5.2"
fastapi = "==0.104.1"
urllib3 = "==2.3.0"
requests = "==2.32.3"
boto3 = "==1.36.12"
pyjwt = "==2.10.1"
psycopg2-binary = "==2.9.10"
psycopg = {extras = ["pool", "binary"], version = "==3.2.4"}
clickhouse-driver = {extras = ["lz4"], version = "==0.2.9"}
clickhouse-connect = "==0.8.15"
elasticsearch = "==8.17.1"
jira = "==3.8.0"
cachetools = "==5.5.1"
fastapi = "==0.115.8"
uvicorn = {extras = ["standard"], version = "==0.34.0"}
python-decouple = "==3.8"
apscheduler = "==3.10.4"
redis = "==5.0.1"
urllib3 = "==1.26.16"
uvicorn = {extras = ["standard"], version = "==0.23.2"}
pydantic = {extras = ["email"], version = "==2.3.0"}
psycopg = {extras = ["binary", "pool"], version = "==3.1.14"}
pydantic = {extras = ["email"], version = "==2.10.6"}
apscheduler = "==3.11.0"
redis = "==5.2.1"
[dev-packages]
[requires]
python_version = "3.11"
python_version = "3.12"
python_full_version = "3.12.8"

View file

@ -9,18 +9,18 @@ from fastapi import FastAPI, Request
from fastapi.middleware.cors import CORSMiddleware
from fastapi.middleware.gzip import GZipMiddleware
from psycopg import AsyncConnection
from psycopg.rows import dict_row
from starlette.responses import StreamingResponse
from chalicelib.utils import helper
from chalicelib.utils import pg_client
from chalicelib.utils import pg_client, ch_client
from crons import core_crons, core_dynamic_crons
from routers import core, core_dynamic, additional_routes
from routers.subs import insights, metrics, v1_api, health, usability_tests
from routers import core, core_dynamic
from routers.subs import insights, metrics, v1_api, health, usability_tests, spot, product_anaytics
loglevel = config("LOGLEVEL", default=logging.WARNING)
print(f">Loglevel set to: {loglevel}")
logging.basicConfig(level=loglevel)
from psycopg.rows import dict_row
class ORPYAsyncConnection(AsyncConnection):
@ -38,6 +38,7 @@ async def lifespan(app: FastAPI):
app.schedule = AsyncIOScheduler()
await pg_client.init()
await ch_client.init()
app.schedule.start()
for job in core_crons.cron_jobs + core_dynamic_crons.cron_jobs:
@ -56,7 +57,9 @@ async def lifespan(app: FastAPI):
"application_name": "AIO" + config("APP_NAME", default="PY"),
}
database = psycopg_pool.AsyncConnectionPool(kwargs=database, connection_class=ORPYAsyncConnection)
database = psycopg_pool.AsyncConnectionPool(kwargs=database, connection_class=ORPYAsyncConnection,
min_size=config("PG_AIO_MINCONN", cast=int, default=1),
max_size=config("PG_AIO_MAXCONN", cast=int, default=5), )
app.state.postgresql = database
# App listening
@ -90,6 +93,7 @@ async def or_middleware(request: Request, call_next):
if now > 2:
now = round(now, 2)
logging.warning(f"Execution time: {now} s for {request.method}: {request.url.path}")
response.headers["x-robots-tag"] = 'noindex, nofollow'
return response
@ -121,11 +125,10 @@ app.include_router(usability_tests.public_app)
app.include_router(usability_tests.app)
app.include_router(usability_tests.app_apikey)
app.include_router(additional_routes.app)
app.include_router(spot.public_app)
app.include_router(spot.app)
app.include_router(spot.app_apikey)
# @app.get('/private/shutdown', tags=["private"])
# async def stop_server():
# logging.info("Requested shutdown")
# await shutdown()
# import os, signal
# os.kill(1, signal.SIGTERM)
app.include_router(product_anaytics.public_app)
app.include_router(product_anaytics.app)
app.include_router(product_anaytics.app_apikey)

View file

@ -5,14 +5,14 @@ from apscheduler.schedulers.asyncio import AsyncIOScheduler
from decouple import config
from fastapi import FastAPI
from chalicelib.core import alerts_processor
from chalicelib.core.alerts import alerts_processor
from chalicelib.utils import pg_client
@asynccontextmanager
async def lifespan(app: FastAPI):
# Startup
logging.info(">>>>> starting up <<<<<")
ap_logger.info(">>>>> starting up <<<<<")
await pg_client.init()
app.schedule.start()
app.schedule.add_job(id="alerts_processor", **{"func": alerts_processor.process, "trigger": "interval",
@ -27,14 +27,22 @@ async def lifespan(app: FastAPI):
yield
# Shutdown
logging.info(">>>>> shutting down <<<<<")
ap_logger.info(">>>>> shutting down <<<<<")
app.schedule.shutdown(wait=False)
await pg_client.terminate()
loglevel = config("LOGLEVEL", default=logging.INFO)
print(f">Loglevel set to: {loglevel}")
logging.basicConfig(level=loglevel)
ap_logger = logging.getLogger('apscheduler')
ap_logger.setLevel(loglevel)
app = FastAPI(root_path=config("root_path", default="/alerts"), docs_url=config("docs_url", default=""),
redoc_url=config("redoc_url", default=""), lifespan=lifespan)
logging.info("============= ALERTS =============")
app.schedule = AsyncIOScheduler()
ap_logger.info("============= ALERTS =============")
@app.get("/")
@ -50,17 +58,8 @@ async def get_health_status():
}}
app.schedule = AsyncIOScheduler()
loglevel = config("LOGLEVEL", default=logging.INFO)
print(f">Loglevel set to: {loglevel}")
logging.basicConfig(level=loglevel)
ap_logger = logging.getLogger('apscheduler')
ap_logger.setLevel(loglevel)
app.schedule = AsyncIOScheduler()
if config("LOCAL_DEV", default=False, cast=bool):
@app.get('/trigger', tags=["private"])
async def trigger_main_cron():
logging.info("Triggering main cron")
ap_logger.info("Triggering main cron")
alerts_processor.process()

View file

@ -2,13 +2,14 @@ import datetime
import logging
from typing import Optional
from decouple import config
from fastapi import Request
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
from starlette import status
from starlette.exceptions import HTTPException
import schemas
from chalicelib.core import authorizers, users
from chalicelib.core import authorizers, users, spot
logger = logging.getLogger(__name__)
@ -32,28 +33,10 @@ class JWTAuth(HTTPBearer):
async def __call__(self, request: Request) -> Optional[schemas.CurrentContext]:
if request.url.path in ["/refresh", "/api/refresh"]:
refresh_token = request.cookies.get("refreshToken")
jwt_payload = authorizers.jwt_refresh_authorizer(scheme="Bearer", token=refresh_token)
if jwt_payload is None or jwt_payload.get("jti") is None:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid token or expired token.")
auth_exists = users.refresh_auth_exists(user_id=jwt_payload.get("userId", -1),
jwt_jti=jwt_payload["jti"])
if not auth_exists:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid token or expired token.")
return await self.__process_refresh_call(request)
credentials: HTTPAuthorizationCredentials = await super(JWTAuth, self).__call__(request)
if credentials:
if not credentials.scheme == "Bearer":
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Invalid authentication scheme.")
old_jwt_payload = authorizers.jwt_authorizer(scheme=credentials.scheme, token=credentials.credentials,
leeway=datetime.timedelta(days=3))
if old_jwt_payload is None \
or old_jwt_payload.get("userId") is None \
or old_jwt_payload.get("userId") != jwt_payload.get("userId"):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid token or expired token.")
return _get_current_auth_context(request=request, jwt_payload=jwt_payload)
elif request.url.path in ["/spot/refresh", "/api/spot/refresh"]:
return await self.__process_spot_refresh_call(request)
else:
credentials: HTTPAuthorizationCredentials = await super(JWTAuth, self).__call__(request)
@ -62,9 +45,8 @@ class JWTAuth(HTTPBearer):
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Invalid authentication scheme.")
jwt_payload = authorizers.jwt_authorizer(scheme=credentials.scheme, token=credentials.credentials)
auth_exists = jwt_payload is not None \
and users.auth_exists(user_id=jwt_payload.get("userId", -1),
jwt_iat=jwt_payload.get("iat", 100))
auth_exists = jwt_payload is not None and users.auth_exists(user_id=jwt_payload.get("userId", -1),
jwt_iat=jwt_payload.get("iat", 100))
if jwt_payload is None \
or jwt_payload.get("iat") is None or jwt_payload.get("aud") is None \
or not auth_exists:
@ -79,7 +61,93 @@ class JWTAuth(HTTPBearer):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid token or expired token.")
if jwt_payload.get("aud", "").startswith("spot") and not request.url.path.startswith("/spot"):
# Allow access to spot endpoints only
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED,
detail="Unauthorized access (spot).")
elif jwt_payload.get("aud", "").startswith("front") and request.url.path.startswith("/spot"):
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED,
detail="Unauthorized access endpoint reserved for Spot only.")
return _get_current_auth_context(request=request, jwt_payload=jwt_payload)
logger.warning("Invalid authorization code.")
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid authorization code.")
async def __process_refresh_call(self, request: Request) -> schemas.CurrentContext:
if "refreshToken" not in request.cookies:
logger.warning("Missing refreshToken cookie.")
jwt_payload = None
else:
jwt_payload = authorizers.jwt_refresh_authorizer(scheme="Bearer", token=request.cookies["refreshToken"])
if jwt_payload is None or jwt_payload.get("jti") is None:
logger.warning("Null refreshToken's payload, or null JTI.")
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
detail="Invalid refresh-token or expired refresh-token.")
auth_exists = users.refresh_auth_exists(user_id=jwt_payload.get("userId", -1),
jwt_jti=jwt_payload["jti"])
if not auth_exists:
logger.warning("refreshToken's user not found.")
logger.warning(jwt_payload)
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
detail="Invalid refresh-token or expired refresh-token.")
credentials: HTTPAuthorizationCredentials = await super(JWTAuth, self).__call__(request)
if credentials:
if not credentials.scheme == "Bearer":
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Invalid authentication scheme.")
old_jwt_payload = authorizers.jwt_authorizer(scheme=credentials.scheme, token=credentials.credentials,
leeway=datetime.timedelta(
days=config("JWT_LEEWAY_DAYS", cast=int, default=3)
))
if old_jwt_payload is None \
or old_jwt_payload.get("userId") is None \
or old_jwt_payload.get("userId") != jwt_payload.get("userId"):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Invalid token or expired token.")
return _get_current_auth_context(request=request, jwt_payload=jwt_payload)
logger.warning("Invalid authorization code (refresh logic).")
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid authorization code for refresh.")
async def __process_spot_refresh_call(self, request: Request) -> schemas.CurrentContext:
if "spotRefreshToken" not in request.cookies:
logger.warning("Missing soptRefreshToken cookie.")
jwt_payload = None
else:
jwt_payload = authorizers.jwt_refresh_authorizer(scheme="Bearer", token=request.cookies["spotRefreshToken"])
if jwt_payload is None or jwt_payload.get("jti") is None:
logger.warning("Null spotRefreshToken's payload, or null JTI.")
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
detail="Invalid spotRefreshToken or expired refresh-token.")
auth_exists = spot.refresh_auth_exists(user_id=jwt_payload.get("userId", -1),
jwt_jti=jwt_payload["jti"])
if not auth_exists:
logger.warning("spotRefreshToken's user not found.")
logger.warning(jwt_payload)
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
detail="Invalid spotRefreshToken or expired refresh-token.")
credentials: HTTPAuthorizationCredentials = await super(JWTAuth, self).__call__(request)
if credentials:
if not credentials.scheme == "Bearer":
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Invalid spot-authentication scheme.")
old_jwt_payload = authorizers.jwt_authorizer(scheme=credentials.scheme, token=credentials.credentials,
leeway=datetime.timedelta(
days=config("JWT_LEEWAY_DAYS", cast=int, default=3)
))
if old_jwt_payload is None \
or old_jwt_payload.get("userId") is None \
or old_jwt_payload.get("userId") != jwt_payload.get("userId"):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
detail="Invalid spot-token or expired token.")
return _get_current_auth_context(request=request, jwt_payload=jwt_payload)
logger.warning("Invalid authorization code (spot-refresh logic).")
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Invalid authorization code for spot-refresh.")

View file

@ -31,8 +31,8 @@ class ProjectAuthorizer:
logger.debug(f"unauthorized project {self.project_identifier}:{value}")
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="project not found.")
else:
current_project = schemas.CurrentProjectContext(projectId=current_project["projectId"],
projectKey=current_project["projectKey"],
platform=current_project["platform"],
name=current_project["name"])
current_project = schemas.ProjectContext(projectId=current_project["projectId"],
projectKey=current_project["projectKey"],
platform=current_project["platform"],
name=current_project["name"])
request.state.currentContext.project = current_project

View file

@ -15,6 +15,9 @@ exit_err() {
fi
}
source ../scripts/lib/_docker.sh
ARCH=${ARCH:-'amd64'}
environment=$1
git_sha=$(git rev-parse --short HEAD)
image_tag=${IMAGE_TAG:-git_sha}
@ -66,7 +69,7 @@ function build_api() {
tag="ee-"
}
mv Dockerfile.dockerignore .dockerignore
docker build -f ./Dockerfile --build-arg envarg=$envarg --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/${IMAGE_NAME:-'chalice'}:${image_tag} .
docker build -f ./Dockerfile --platform linux/${ARCH} --build-arg envarg=$envarg --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/${IMAGE_NAME:-'chalice'}:${image_tag} .
cd ../api || exit_err 100
rm -rf ../${destination}
[[ $PUSH_IMAGE -eq 1 ]] && {

View file

@ -10,6 +10,7 @@
git_sha=$(git rev-parse --short HEAD)
image_tag=${IMAGE_TAG:-git_sha}
envarg="default-foss"
source ../scripts/lib/_docker.sh
check_prereq() {
which docker || {
echo "Docker not installed, please install docker."
@ -17,27 +18,26 @@ check_prereq() {
}
}
[[ $1 == ee ]] && ee=true
[[ $PATCH -eq 1 ]] && {
image_tag="$(grep -ER ^.ppVersion ../scripts/helmcharts/openreplay/charts/$chart | xargs | awk '{print $2}' | awk -F. -v OFS=. '{$NF += 1 ; print}')"
[[ $ee == "true" ]] && {
image_tag="${image_tag}-ee"
}
image_tag="$(grep -ER ^.ppVersion ../scripts/helmcharts/openreplay/charts/$chart | xargs | awk '{print $2}' | awk -F. -v OFS=. '{$NF += 1 ; print}')"
[[ $ee == "true" ]] && {
image_tag="${image_tag}-ee"
}
}
update_helm_release() {
chart=$1
HELM_TAG="$(grep -iER ^version ../scripts/helmcharts/openreplay/charts/$chart | awk '{print $2}' | awk -F. -v OFS=. '{$NF += 1 ; print}')"
# Update the chart version
sed -i "s#^version.*#version: $HELM_TAG# g" ../scripts/helmcharts/openreplay/charts/$chart/Chart.yaml
# Update image tags
sed -i "s#ppVersion.*#ppVersion: \"$image_tag\"#g" ../scripts/helmcharts/openreplay/charts/$chart/Chart.yaml
# Commit the changes
git add ../scripts/helmcharts/openreplay/charts/$chart/Chart.yaml
git commit -m "chore(helm): Updating $chart image release"
chart=$1
HELM_TAG="$(grep -iER ^version ../scripts/helmcharts/openreplay/charts/$chart | awk '{print $2}' | awk -F. -v OFS=. '{$NF += 1 ; print}')"
# Update the chart version
sed -i "s#^version.*#version: $HELM_TAG# g" ../scripts/helmcharts/openreplay/charts/$chart/Chart.yaml
# Update image tags
sed -i "s#ppVersion.*#ppVersion: \"$image_tag\"#g" ../scripts/helmcharts/openreplay/charts/$chart/Chart.yaml
# Commit the changes
git add ../scripts/helmcharts/openreplay/charts/$chart/Chart.yaml
git commit -m "chore(helm): Updating $chart image release"
}
function build_alerts(){
function build_alerts() {
destination="_alerts"
[[ $1 == "ee" ]] && {
destination="_alerts_ee"
@ -52,7 +52,7 @@ function build_alerts(){
tag="ee-"
}
mv Dockerfile_alerts.dockerignore .dockerignore
docker build -f ./Dockerfile_alerts --build-arg envarg=$envarg --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/alerts:${image_tag} .
docker build -f ./Dockerfile_alerts --platform linux/${ARCH:-"amd64"} --build-arg envarg=$envarg --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/alerts:${image_tag} .
cd ../api
rm -rf ../${destination}
[[ $PUSH_IMAGE -eq 1 ]] && {
@ -69,5 +69,5 @@ function build_alerts(){
check_prereq
build_alerts $1
if [[ $PATCH -eq 1 ]]; then
update_helm_release alerts
update_helm_release alerts
fi

View file

@ -9,6 +9,7 @@
git_sha1=${IMAGE_TAG:-$(git rev-parse HEAD)}
envarg="default-foss"
source ../scripts/lib/_docker.sh
check_prereq() {
which docker || {
echo "Docker not installed, please install docker."
@ -17,7 +18,7 @@ check_prereq() {
[[ exit -eq 1 ]] && exit 1
}
function build_crons(){
function build_crons() {
destination="_crons_ee"
cp -R ../api ../${destination}
cd ../${destination}
@ -28,7 +29,7 @@ function build_crons(){
envarg="default-ee"
tag="ee-"
mv Dockerfile_crons.dockerignore .dockerignore
docker build -f ./Dockerfile_crons --build-arg envarg=$envarg -t ${DOCKER_REPO:-'local'}/crons:${git_sha1} .
docker build -f ./Dockerfile_crons --platform=linux/${ARCH:-'amd64'} --build-arg envarg=$envarg -t ${DOCKER_REPO:-'local'}/crons:${git_sha1} .
cd ../api
rm -rf ../${destination}
[[ $PUSH_IMAGE -eq 1 ]] && {
@ -46,7 +47,6 @@ check_prereq
[[ $1 == "ee" ]] && {
build_crons $1
} || {
echo -e "Crons is only for ee. Rerun the script using \n bash $0 ee"
exit 100
echo -e "Crons is only for ee. Rerun the script using \n bash $0 ee"
exit 100
}

View file

@ -1 +0,0 @@
from . import sessions as sessions_legacy

View file

@ -0,0 +1,10 @@
import logging
from decouple import config
logger = logging.getLogger(__name__)
if config("EXP_ALERTS", cast=bool, default=False):
logging.info(">>> Using experimental alerts")
from . import alerts_processor_ch as alerts_processor
else:
from . import alerts_processor as alerts_processor

View file

@ -7,11 +7,13 @@ from decouple import config
import schemas
from chalicelib.core import notifications, webhook
from chalicelib.core.collaboration_msteams import MSTeams
from chalicelib.core.collaboration_slack import Slack
from chalicelib.core.collaborations.collaboration_msteams import MSTeams
from chalicelib.core.collaborations.collaboration_slack import Slack
from chalicelib.utils import pg_client, helper, email_helper, smtp
from chalicelib.utils.TimeUTC import TimeUTC
logger = logging.getLogger(__name__)
def get(id):
with pg_client.PostgresClient() as cur:
@ -124,26 +126,26 @@ def process_notifications(data):
try:
send_to_slack_batch(notifications_list=notifications_list)
except Exception as e:
logging.error("!!!Error while sending slack notifications batch")
logging.error(str(e))
logger.error("!!!Error while sending slack notifications batch")
logger.error(str(e))
elif t == "msteams":
try:
send_to_msteams_batch(notifications_list=notifications_list)
except Exception as e:
logging.error("!!!Error while sending msteams notifications batch")
logging.error(str(e))
logger.error("!!!Error while sending msteams notifications batch")
logger.error(str(e))
elif t == "email":
try:
send_by_email_batch(notifications_list=notifications_list)
except Exception as e:
logging.error("!!!Error while sending email notifications batch")
logging.error(str(e))
logger.error("!!!Error while sending email notifications batch")
logger.error(str(e))
elif t == "webhook":
try:
webhook.trigger_batch(data_list=notifications_list)
except Exception as e:
logging.error("!!!Error while sending webhook notifications batch")
logging.error(str(e))
logger.error("!!!Error while sending webhook notifications batch")
logger.error(str(e))
def send_by_email(notification, destination):
@ -158,9 +160,9 @@ def send_by_email(notification, destination):
def send_by_email_batch(notifications_list):
if not smtp.has_smtp():
logging.info("no SMTP configuration for email notifications")
logger.info("no SMTP configuration for email notifications")
if notifications_list is None or len(notifications_list) == 0:
logging.info("no email notifications")
logger.info("no email notifications")
return
for n in notifications_list:
send_by_email(notification=n.get("notification"), destination=n.get("destination"))
@ -229,5 +231,5 @@ def get_predefined_values():
"unit": "count" if v.endswith(".count") else "ms",
"predefined": True,
"metricId": None,
"seriesId": None} for v in values if v != schemas.AlertColumn.custom]
"seriesId": None} for v in values if v != schemas.AlertColumn.CUSTOM]
return values

View file

@ -0,0 +1,33 @@
from chalicelib.core.alerts.modules import TENANT_ID
from chalicelib.utils import pg_client, helper
def get_all_alerts():
with pg_client.PostgresClient(long_query=True) as cur:
query = f"""SELECT {TENANT_ID} AS tenant_id,
alert_id,
projects.project_id,
projects.name AS project_name,
detection_method,
query,
options,
(EXTRACT(EPOCH FROM alerts.created_at) * 1000)::BIGINT AS created_at,
alerts.name,
alerts.series_id,
filter,
change,
COALESCE(metrics.name || '.' || (COALESCE(metric_series.name, 'series ' || index)) || '.count',
query ->> 'left') AS series_name
FROM public.alerts
INNER JOIN projects USING (project_id)
LEFT JOIN metric_series USING (series_id)
LEFT JOIN metrics USING (metric_id)
WHERE alerts.deleted_at ISNULL
AND alerts.active
AND projects.active
AND projects.deleted_at ISNULL
AND (alerts.series_id ISNULL OR metric_series.deleted_at ISNULL)
ORDER BY alerts.created_at;"""
cur.execute(query=query)
all_alerts = helper.list_to_camel_case(cur.fetchall())
return all_alerts

View file

@ -0,0 +1,169 @@
import logging
from pydantic_core._pydantic_core import ValidationError
import schemas
from chalicelib.core.alerts import alerts, alerts_listener
from chalicelib.core.alerts.modules import alert_helpers
from chalicelib.core.sessions import sessions_pg as sessions
from chalicelib.utils import pg_client
from chalicelib.utils.TimeUTC import TimeUTC
logger = logging.getLogger(__name__)
LeftToDb = {
schemas.AlertColumn.PERFORMANCE__DOM_CONTENT_LOADED__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "COALESCE(AVG(NULLIF(dom_content_loaded_time ,0)),0)"},
schemas.AlertColumn.PERFORMANCE__FIRST_MEANINGFUL_PAINT__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "COALESCE(AVG(NULLIF(first_contentful_paint_time,0)),0)"},
schemas.AlertColumn.PERFORMANCE__PAGE_LOAD_TIME__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)", "formula": "AVG(NULLIF(load_time ,0))"},
schemas.AlertColumn.PERFORMANCE__DOM_BUILD_TIME__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(dom_building_time,0))"},
schemas.AlertColumn.PERFORMANCE__SPEED_INDEX__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)", "formula": "AVG(NULLIF(speed_index,0))"},
schemas.AlertColumn.PERFORMANCE__PAGE_RESPONSE_TIME__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(response_time,0))"},
schemas.AlertColumn.PERFORMANCE__TTFB__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(first_paint_time,0))"},
schemas.AlertColumn.PERFORMANCE__TIME_TO_RENDER__AVERAGE: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(visually_complete,0))"},
schemas.AlertColumn.PERFORMANCE__CRASHES__COUNT: {
"table": "public.sessions",
"formula": "COUNT(DISTINCT session_id)",
"condition": "errors_count > 0 AND duration>0"},
schemas.AlertColumn.ERRORS__JAVASCRIPT__COUNT: {
"table": "events.errors INNER JOIN public.errors AS m_errors USING (error_id)",
"formula": "COUNT(DISTINCT session_id)", "condition": "source='js_exception'", "joinSessions": False},
schemas.AlertColumn.ERRORS__BACKEND__COUNT: {
"table": "events.errors INNER JOIN public.errors AS m_errors USING (error_id)",
"formula": "COUNT(DISTINCT session_id)", "condition": "source!='js_exception'", "joinSessions": False},
}
def Build(a):
now = TimeUTC.now()
params = {"project_id": a["projectId"], "now": now}
full_args = {}
j_s = True
main_table = ""
if a["seriesId"] is not None:
a["filter"]["sort"] = "session_id"
a["filter"]["order"] = schemas.SortOrderType.DESC
a["filter"]["startDate"] = 0
a["filter"]["endDate"] = TimeUTC.now()
try:
data = schemas.SessionsSearchPayloadSchema.model_validate(a["filter"])
except ValidationError:
logger.warning("Validation error for:")
logger.warning(a["filter"])
raise
full_args, query_part = sessions.search_query_parts(data=data, error_status=None, errors_only=False,
issue=None, project_id=a["projectId"], user_id=None,
favorite_only=False)
subQ = f"""SELECT COUNT(session_id) AS value
{query_part}"""
else:
colDef = LeftToDb[a["query"]["left"]]
subQ = f"""SELECT {colDef["formula"]} AS value
FROM {colDef["table"]}
WHERE project_id = %(project_id)s
{"AND " + colDef["condition"] if colDef.get("condition") else ""}"""
j_s = colDef.get("joinSessions", True)
main_table = colDef["table"]
is_ss = main_table == "public.sessions"
q = f"""SELECT coalesce(value,0) AS value, coalesce(value,0) {a["query"]["operator"]} {a["query"]["right"]} AS valid"""
if a["detectionMethod"] == schemas.AlertDetectionMethod.THRESHOLD:
if a["seriesId"] is not None:
q += f""" FROM ({subQ}) AS stat"""
else:
q += f""" FROM ({subQ} {"AND timestamp >= %(startDate)s AND timestamp <= %(now)s" if not is_ss else ""}
{"AND start_ts >= %(startDate)s AND start_ts <= %(now)s" if j_s else ""}) AS stat"""
params = {**params, **full_args, "startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000}
else:
if a["change"] == schemas.AlertDetectionType.CHANGE:
if a["seriesId"] is not None:
sub2 = subQ.replace("%(startDate)s", "%(timestamp_sub2)s").replace("%(endDate)s", "%(startDate)s")
sub1 = f"SELECT (({subQ})-({sub2})) AS value"
q += f" FROM ( {sub1} ) AS stat"
params = {**params, **full_args,
"startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000,
"timestamp_sub2": TimeUTC.now() - 2 * a["options"]["currentPeriod"] * 60 * 1000}
else:
sub1 = f"""{subQ} {"AND timestamp >= %(startDate)s AND timestamp <= %(now)s" if not is_ss else ""}
{"AND start_ts >= %(startDate)s AND start_ts <= %(now)s" if j_s else ""}"""
params["startDate"] = TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000
sub2 = f"""{subQ} {"AND timestamp < %(startDate)s AND timestamp >= %(timestamp_sub2)s" if not is_ss else ""}
{"AND start_ts < %(startDate)s AND start_ts >= %(timestamp_sub2)s" if j_s else ""}"""
params["timestamp_sub2"] = TimeUTC.now() - 2 * a["options"]["currentPeriod"] * 60 * 1000
sub1 = f"SELECT (( {sub1} )-( {sub2} )) AS value"
q += f" FROM ( {sub1} ) AS stat"
else:
if a["seriesId"] is not None:
sub2 = subQ.replace("%(startDate)s", "%(timestamp_sub2)s").replace("%(endDate)s", "%(startDate)s")
sub1 = f"SELECT (({subQ})/NULLIF(({sub2}),0)-1)*100 AS value"
q += f" FROM ({sub1}) AS stat"
params = {**params, **full_args,
"startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000,
"timestamp_sub2": TimeUTC.now() \
- (a["options"]["currentPeriod"] + a["options"]["currentPeriod"]) \
* 60 * 1000}
else:
sub1 = f"""{subQ} {"AND timestamp >= %(startDate)s AND timestamp <= %(now)s" if not is_ss else ""}
{"AND start_ts >= %(startDate)s AND start_ts <= %(now)s" if j_s else ""}"""
params["startDate"] = TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000
sub2 = f"""{subQ} {"AND timestamp < %(startDate)s AND timestamp >= %(timestamp_sub2)s" if not is_ss else ""}
{"AND start_ts < %(startDate)s AND start_ts >= %(timestamp_sub2)s" if j_s else ""}"""
params["timestamp_sub2"] = TimeUTC.now() \
- (a["options"]["currentPeriod"] + a["options"]["currentPeriod"]) * 60 * 1000
sub1 = f"SELECT (({sub1})/NULLIF(({sub2}),0)-1)*100 AS value"
q += f" FROM ({sub1}) AS stat"
return q, params
def process():
logger.info("> processing alerts on PG")
notifications = []
all_alerts = alerts_listener.get_all_alerts()
with pg_client.PostgresClient() as cur:
for alert in all_alerts:
if alert_helpers.can_check(alert):
query, params = Build(alert)
try:
query = cur.mogrify(query, params)
except Exception as e:
logger.error(
f"!!!Error while building alert query for alertId:{alert['alertId']} name: {alert['name']}")
logger.error(e)
continue
logger.debug(alert)
logger.debug(query)
try:
cur.execute(query)
result = cur.fetchone()
if result["valid"]:
logger.info(f"Valid alert, notifying users, alertId:{alert['alertId']} name: {alert['name']}")
notifications.append(alert_helpers.generate_notification(alert, result))
except Exception as e:
logger.error(
f"!!!Error while running alert query for alertId:{alert['alertId']} name: {alert['name']}")
logger.error(query)
logger.error(e)
cur = cur.recreate(rollback=True)
if len(notifications) > 0:
cur.execute(
cur.mogrify(f"""UPDATE public.alerts
SET options = options||'{{"lastNotification":{TimeUTC.now()}}}'::jsonb
WHERE alert_id IN %(ids)s;""", {"ids": tuple([n["alertId"] for n in notifications])}))
if len(notifications) > 0:
alerts.process_notifications(notifications)

View file

@ -0,0 +1,195 @@
import logging
from pydantic_core._pydantic_core import ValidationError
import schemas
from chalicelib.utils import pg_client, ch_client, exp_ch_helper
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.core.alerts import alerts, alerts_listener
from chalicelib.core.alerts.modules import alert_helpers
from chalicelib.core.sessions import sessions_ch as sessions
logger = logging.getLogger(__name__)
LeftToDb = {
schemas.AlertColumn.PERFORMANCE__DOM_CONTENT_LOADED__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "COALESCE(AVG(NULLIF(dom_content_loaded_event_time ,0)),0)",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__FIRST_MEANINGFUL_PAINT__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "COALESCE(AVG(NULLIF(first_contentful_paint_time,0)),0)",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__PAGE_LOAD_TIME__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "AVG(NULLIF(load_event_time ,0))",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__DOM_BUILD_TIME__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "AVG(NULLIF(dom_building_time,0))",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__SPEED_INDEX__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "AVG(NULLIF(speed_index,0))",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__PAGE_RESPONSE_TIME__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "AVG(NULLIF(response_time,0))",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__TTFB__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "AVG(NULLIF(first_contentful_paint_time,0))",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__TIME_TO_RENDER__AVERAGE: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS pages",
"formula": "AVG(NULLIF(visually_complete,0))",
"eventType": "LOCATION"
},
schemas.AlertColumn.PERFORMANCE__CRASHES__COUNT: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_sessions_table(timestamp)} AS sessions",
"formula": "COUNT(DISTINCT session_id)",
"condition": "duration>0 AND errors_count>0"
},
schemas.AlertColumn.ERRORS__JAVASCRIPT__COUNT: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS errors",
"eventType": "ERROR",
"formula": "COUNT(DISTINCT session_id)",
"condition": "source='js_exception'"
},
schemas.AlertColumn.ERRORS__BACKEND__COUNT: {
"table": lambda timestamp: f"{exp_ch_helper.get_main_events_table(timestamp)} AS errors",
"eventType": "ERROR",
"formula": "COUNT(DISTINCT session_id)",
"condition": "source!='js_exception'"
},
}
def Build(a):
now = TimeUTC.now()
params = {"project_id": a["projectId"], "now": now}
full_args = {}
if a["seriesId"] is not None:
a["filter"]["sort"] = "session_id"
a["filter"]["order"] = schemas.SortOrderType.DESC
a["filter"]["startDate"] = 0
a["filter"]["endDate"] = TimeUTC.now()
try:
data = schemas.SessionsSearchPayloadSchema.model_validate(a["filter"])
except ValidationError:
logger.warning("Validation error for:")
logger.warning(a["filter"])
raise
full_args, query_part = sessions.search_query_parts_ch(data=data, error_status=None, errors_only=False,
issue=None, project_id=a["projectId"], user_id=None,
favorite_only=False)
subQ = f"""SELECT COUNT(session_id) AS value
{query_part}"""
else:
colDef = LeftToDb[a["query"]["left"]]
params["event_type"] = LeftToDb[a["query"]["left"]].get("eventType")
subQ = f"""SELECT {colDef["formula"]} AS value
FROM {colDef["table"](now)}
WHERE project_id = %(project_id)s
{"AND event_type=%(event_type)s" if params["event_type"] else ""}
{"AND " + colDef["condition"] if colDef.get("condition") else ""}"""
q = f"""SELECT coalesce(value,0) AS value, coalesce(value,0) {a["query"]["operator"]} {a["query"]["right"]} AS valid"""
if a["detectionMethod"] == schemas.AlertDetectionMethod.THRESHOLD:
if a["seriesId"] is not None:
q += f""" FROM ({subQ}) AS stat"""
else:
q += f""" FROM ({subQ}
AND datetime>=toDateTime(%(startDate)s/1000)
AND datetime<=toDateTime(%(now)s/1000) ) AS stat"""
params = {**params, **full_args, "startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000}
else:
if a["change"] == schemas.AlertDetectionType.CHANGE:
if a["seriesId"] is not None:
sub2 = subQ.replace("%(startDate)s", "%(timestamp_sub2)s").replace("%(endDate)s", "%(startDate)s")
sub1 = f"SELECT (({subQ})-({sub2})) AS value"
q += f" FROM ( {sub1} ) AS stat"
params = {**params, **full_args,
"startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000,
"timestamp_sub2": TimeUTC.now() - 2 * a["options"]["currentPeriod"] * 60 * 1000}
else:
sub1 = f"""{subQ} AND datetime>=toDateTime(%(startDate)s/1000)
AND datetime<=toDateTime(%(now)s/1000)"""
params["startDate"] = TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000
sub2 = f"""{subQ} AND datetime<toDateTime(%(startDate)s/1000)
AND datetime>=toDateTime(%(timestamp_sub2)s/1000)"""
params["timestamp_sub2"] = TimeUTC.now() - 2 * a["options"]["currentPeriod"] * 60 * 1000
sub1 = f"SELECT (( {sub1} )-( {sub2} )) AS value"
q += f" FROM ( {sub1} ) AS stat"
else:
if a["seriesId"] is not None:
sub2 = subQ.replace("%(startDate)s", "%(timestamp_sub2)s").replace("%(endDate)s", "%(startDate)s")
sub1 = f"SELECT (({subQ})/NULLIF(({sub2}),0)-1)*100 AS value"
q += f" FROM ({sub1}) AS stat"
params = {**params, **full_args,
"startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000,
"timestamp_sub2": TimeUTC.now() \
- (a["options"]["currentPeriod"] + a["options"]["currentPeriod"]) \
* 60 * 1000}
else:
sub1 = f"""{subQ} AND datetime>=toDateTime(%(startDate)s/1000)
AND datetime<=toDateTime(%(now)s/1000)"""
params["startDate"] = TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000
sub2 = f"""{subQ} AND datetime<toDateTime(%(startDate)s/1000)
AND datetime>=toDateTime(%(timestamp_sub2)s/1000)"""
params["timestamp_sub2"] = TimeUTC.now() \
- (a["options"]["currentPeriod"] + a["options"]["currentPeriod"]) * 60 * 1000
sub1 = f"SELECT (({sub1})/NULLIF(({sub2}),0)-1)*100 AS value"
q += f" FROM ({sub1}) AS stat"
return q, params
def process():
logger.info("> processing alerts on CH")
notifications = []
all_alerts = alerts_listener.get_all_alerts()
with pg_client.PostgresClient() as cur, ch_client.ClickHouseClient() as ch_cur:
for alert in all_alerts:
if alert["query"]["left"] != "CUSTOM":
continue
if alert_helpers.can_check(alert):
query, params = Build(alert)
try:
query = ch_cur.format(query=query, parameters=params)
except Exception as e:
logger.error(
f"!!!Error while building alert query for alertId:{alert['alertId']} name: {alert['name']}")
logger.error(e)
continue
logger.debug(alert)
logger.debug(query)
try:
result = ch_cur.execute(query=query)
if len(result) > 0:
result = result[0]
if result["valid"]:
logger.info("Valid alert, notifying users")
notifications.append(alert_helpers.generate_notification(alert, result))
except Exception as e:
logger.error(f"!!!Error while running alert query for alertId:{alert['alertId']}")
logger.error(str(e))
logger.error(query)
if len(notifications) > 0:
cur.execute(
cur.mogrify(f"""UPDATE public.alerts
SET options = options||'{{"lastNotification":{TimeUTC.now()}}}'::jsonb
WHERE alert_id IN %(ids)s;""", {"ids": tuple([n["alertId"] for n in notifications])}))
if len(notifications) > 0:
alerts.process_notifications(notifications)

View file

@ -0,0 +1,3 @@
TENANT_ID = "-1"
from . import helpers as alert_helpers

View file

@ -0,0 +1,74 @@
import decimal
import logging
import schemas
from chalicelib.utils.TimeUTC import TimeUTC
logger = logging.getLogger(__name__)
# This is the frequency of execution for each threshold
TimeInterval = {
15: 3,
30: 5,
60: 10,
120: 20,
240: 30,
1440: 60,
}
def __format_value(x):
if x % 1 == 0:
x = int(x)
else:
x = round(x, 2)
return f"{x:,}"
def can_check(a) -> bool:
now = TimeUTC.now()
repetitionBase = a["options"]["currentPeriod"] \
if a["detectionMethod"] == schemas.AlertDetectionMethod.CHANGE \
and a["options"]["currentPeriod"] > a["options"]["previousPeriod"] \
else a["options"]["previousPeriod"]
if TimeInterval.get(repetitionBase) is None:
logger.error(f"repetitionBase: {repetitionBase} NOT FOUND")
return False
return (a["options"]["renotifyInterval"] <= 0 or
a["options"].get("lastNotification") is None or
a["options"]["lastNotification"] <= 0 or
((now - a["options"]["lastNotification"]) > a["options"]["renotifyInterval"] * 60 * 1000)) \
and ((now - a["createdAt"]) % (TimeInterval[repetitionBase] * 60 * 1000)) < 60 * 1000
def generate_notification(alert, result):
left = __format_value(result['value'])
right = __format_value(alert['query']['right'])
return {
"alertId": alert["alertId"],
"tenantId": alert["tenantId"],
"title": alert["name"],
"description": f"{alert['seriesName']} = {left} ({alert['query']['operator']} {right}).",
"buttonText": "Check metrics for more details",
"buttonUrl": f"/{alert['projectId']}/metrics",
"imageUrl": None,
"projectId": alert["projectId"],
"projectName": alert["projectName"],
"options": {"source": "ALERT", "sourceId": alert["alertId"],
"sourceMeta": alert["detectionMethod"],
"message": alert["options"]["message"], "projectId": alert["projectId"],
"data": {"title": alert["name"],
"limitValue": alert["query"]["right"],
"actualValue": float(result["value"]) \
if isinstance(result["value"], decimal.Decimal) \
else result["value"],
"operator": alert["query"]["operator"],
"trigger": alert["query"]["left"],
"alertId": alert["alertId"],
"detectionMethod": alert["detectionMethod"],
"currentPeriod": alert["options"]["currentPeriod"],
"previousPeriod": alert["options"]["previousPeriod"],
"createdAt": TimeUTC.now()}},
}

View file

@ -1,32 +0,0 @@
from chalicelib.utils import pg_client, helper
def get_all_alerts():
with pg_client.PostgresClient(long_query=True) as cur:
query = """SELECT -1 AS tenant_id,
alert_id,
projects.project_id,
projects.name AS project_name,
detection_method,
query,
options,
(EXTRACT(EPOCH FROM alerts.created_at) * 1000)::BIGINT AS created_at,
alerts.name,
alerts.series_id,
filter,
change,
COALESCE(metrics.name || '.' || (COALESCE(metric_series.name, 'series ' || index)) || '.count',
query ->> 'left') AS series_name
FROM public.alerts
INNER JOIN projects USING (project_id)
LEFT JOIN metric_series USING (series_id)
LEFT JOIN metrics USING (metric_id)
WHERE alerts.deleted_at ISNULL
AND alerts.active
AND projects.active
AND projects.deleted_at ISNULL
AND (alerts.series_id ISNULL OR metric_series.deleted_at ISNULL)
ORDER BY alerts.created_at;"""
cur.execute(query=query)
all_alerts = helper.list_to_camel_case(cur.fetchall())
return all_alerts

View file

@ -1,262 +0,0 @@
import decimal
import logging
from decouple import config
from pydantic_core._pydantic_core import ValidationError
import schemas
from chalicelib.core import alerts
from chalicelib.core import alerts_listener
from chalicelib.core import sessions
from chalicelib.utils import pg_client
from chalicelib.utils.TimeUTC import TimeUTC
logging.basicConfig(level=config("LOGLEVEL", default=logging.INFO))
LeftToDb = {
schemas.AlertColumn.performance__dom_content_loaded__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "COALESCE(AVG(NULLIF(dom_content_loaded_time ,0)),0)"},
schemas.AlertColumn.performance__first_meaningful_paint__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "COALESCE(AVG(NULLIF(first_contentful_paint_time,0)),0)"},
schemas.AlertColumn.performance__page_load_time__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)", "formula": "AVG(NULLIF(load_time ,0))"},
schemas.AlertColumn.performance__dom_build_time__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(dom_building_time,0))"},
schemas.AlertColumn.performance__speed_index__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)", "formula": "AVG(NULLIF(speed_index,0))"},
schemas.AlertColumn.performance__page_response_time__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(response_time,0))"},
schemas.AlertColumn.performance__ttfb__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(first_paint_time,0))"},
schemas.AlertColumn.performance__time_to_render__average: {
"table": "events.pages INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(visually_complete,0))"},
schemas.AlertColumn.performance__image_load_time__average: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(resources.duration,0))", "condition": "type='img'"},
schemas.AlertColumn.performance__request_load_time__average: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(resources.duration,0))", "condition": "type='fetch'"},
schemas.AlertColumn.resources__load_time__average: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "AVG(NULLIF(resources.duration,0))"},
schemas.AlertColumn.resources__missing__count: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "COUNT(DISTINCT url_hostpath)", "condition": "success= FALSE AND type='img'"},
schemas.AlertColumn.errors__4xx_5xx__count: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)", "formula": "COUNT(session_id)",
"condition": "status/100!=2"},
schemas.AlertColumn.errors__4xx__count: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "COUNT(session_id)", "condition": "status/100=4"},
schemas.AlertColumn.errors__5xx__count: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "COUNT(session_id)", "condition": "status/100=5"},
schemas.AlertColumn.errors__javascript__impacted_sessions__count: {
"table": "events.resources INNER JOIN public.sessions USING(session_id)",
"formula": "COUNT(DISTINCT session_id)", "condition": "success= FALSE AND type='script'"},
schemas.AlertColumn.performance__crashes__count: {
"table": "public.sessions",
"formula": "COUNT(DISTINCT session_id)",
"condition": "errors_count > 0 AND duration>0"},
schemas.AlertColumn.errors__javascript__count: {
"table": "events.errors INNER JOIN public.errors AS m_errors USING (error_id)",
"formula": "COUNT(DISTINCT session_id)", "condition": "source='js_exception'", "joinSessions": False},
schemas.AlertColumn.errors__backend__count: {
"table": "events.errors INNER JOIN public.errors AS m_errors USING (error_id)",
"formula": "COUNT(DISTINCT session_id)", "condition": "source!='js_exception'", "joinSessions": False},
}
# This is the frequency of execution for each threshold
TimeInterval = {
15: 3,
30: 5,
60: 10,
120: 20,
240: 30,
1440: 60,
}
def can_check(a) -> bool:
now = TimeUTC.now()
repetitionBase = a["options"]["currentPeriod"] \
if a["detectionMethod"] == schemas.AlertDetectionMethod.change \
and a["options"]["currentPeriod"] > a["options"]["previousPeriod"] \
else a["options"]["previousPeriod"]
if TimeInterval.get(repetitionBase) is None:
logging.error(f"repetitionBase: {repetitionBase} NOT FOUND")
return False
return (a["options"]["renotifyInterval"] <= 0 or
a["options"].get("lastNotification") is None or
a["options"]["lastNotification"] <= 0 or
((now - a["options"]["lastNotification"]) > a["options"]["renotifyInterval"] * 60 * 1000)) \
and ((now - a["createdAt"]) % (TimeInterval[repetitionBase] * 60 * 1000)) < 60 * 1000
def Build(a):
now = TimeUTC.now()
params = {"project_id": a["projectId"], "now": now}
full_args = {}
j_s = True
main_table = ""
if a["seriesId"] is not None:
a["filter"]["sort"] = "session_id"
a["filter"]["order"] = schemas.SortOrderType.desc
a["filter"]["startDate"] = 0
a["filter"]["endDate"] = TimeUTC.now()
try:
data = schemas.SessionsSearchPayloadSchema.model_validate(a["filter"])
except ValidationError:
logging.warning("Validation error for:")
logging.warning(a["filter"])
raise
full_args, query_part = sessions.search_query_parts(data=data, error_status=None, errors_only=False,
issue=None, project_id=a["projectId"], user_id=None,
favorite_only=False)
subQ = f"""SELECT COUNT(session_id) AS value
{query_part}"""
else:
colDef = LeftToDb[a["query"]["left"]]
subQ = f"""SELECT {colDef["formula"]} AS value
FROM {colDef["table"]}
WHERE project_id = %(project_id)s
{"AND " + colDef["condition"] if colDef.get("condition") else ""}"""
j_s = colDef.get("joinSessions", True)
main_table = colDef["table"]
is_ss = main_table == "public.sessions"
q = f"""SELECT coalesce(value,0) AS value, coalesce(value,0) {a["query"]["operator"]} {a["query"]["right"]} AS valid"""
if a["detectionMethod"] == schemas.AlertDetectionMethod.threshold:
if a["seriesId"] is not None:
q += f""" FROM ({subQ}) AS stat"""
else:
q += f""" FROM ({subQ} {"AND timestamp >= %(startDate)s AND timestamp <= %(now)s" if not is_ss else ""}
{"AND start_ts >= %(startDate)s AND start_ts <= %(now)s" if j_s else ""}) AS stat"""
params = {**params, **full_args, "startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000}
else:
if a["change"] == schemas.AlertDetectionType.change:
if a["seriesId"] is not None:
sub2 = subQ.replace("%(startDate)s", "%(timestamp_sub2)s").replace("%(endDate)s", "%(startDate)s")
sub1 = f"SELECT (({subQ})-({sub2})) AS value"
q += f" FROM ( {sub1} ) AS stat"
params = {**params, **full_args,
"startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000,
"timestamp_sub2": TimeUTC.now() - 2 * a["options"]["currentPeriod"] * 60 * 1000}
else:
sub1 = f"""{subQ} {"AND timestamp >= %(startDate)s AND timestamp <= %(now)s" if not is_ss else ""}
{"AND start_ts >= %(startDate)s AND start_ts <= %(now)s" if j_s else ""}"""
params["startDate"] = TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000
sub2 = f"""{subQ} {"AND timestamp < %(startDate)s AND timestamp >= %(timestamp_sub2)s" if not is_ss else ""}
{"AND start_ts < %(startDate)s AND start_ts >= %(timestamp_sub2)s" if j_s else ""}"""
params["timestamp_sub2"] = TimeUTC.now() - 2 * a["options"]["currentPeriod"] * 60 * 1000
sub1 = f"SELECT (( {sub1} )-( {sub2} )) AS value"
q += f" FROM ( {sub1} ) AS stat"
else:
if a["seriesId"] is not None:
sub2 = subQ.replace("%(startDate)s", "%(timestamp_sub2)s").replace("%(endDate)s", "%(startDate)s")
sub1 = f"SELECT (({subQ})/NULLIF(({sub2}),0)-1)*100 AS value"
q += f" FROM ({sub1}) AS stat"
params = {**params, **full_args,
"startDate": TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000,
"timestamp_sub2": TimeUTC.now() \
- (a["options"]["currentPeriod"] + a["options"]["currentPeriod"]) \
* 60 * 1000}
else:
sub1 = f"""{subQ} {"AND timestamp >= %(startDate)s AND timestamp <= %(now)s" if not is_ss else ""}
{"AND start_ts >= %(startDate)s AND start_ts <= %(now)s" if j_s else ""}"""
params["startDate"] = TimeUTC.now() - a["options"]["currentPeriod"] * 60 * 1000
sub2 = f"""{subQ} {"AND timestamp < %(startDate)s AND timestamp >= %(timestamp_sub2)s" if not is_ss else ""}
{"AND start_ts < %(startDate)s AND start_ts >= %(timestamp_sub2)s" if j_s else ""}"""
params["timestamp_sub2"] = TimeUTC.now() \
- (a["options"]["currentPeriod"] + a["options"]["currentPeriod"]) * 60 * 1000
sub1 = f"SELECT (({sub1})/NULLIF(({sub2}),0)-1)*100 AS value"
q += f" FROM ({sub1}) AS stat"
return q, params
def process():
notifications = []
all_alerts = alerts_listener.get_all_alerts()
with pg_client.PostgresClient() as cur:
for alert in all_alerts:
if can_check(alert):
query, params = Build(alert)
try:
query = cur.mogrify(query, params)
except Exception as e:
logging.error(
f"!!!Error while building alert query for alertId:{alert['alertId']} name: {alert['name']}")
logging.error(e)
continue
logging.debug(alert)
logging.debug(query)
try:
cur.execute(query)
result = cur.fetchone()
if result["valid"]:
logging.info(f"Valid alert, notifying users, alertId:{alert['alertId']} name: {alert['name']}")
notifications.append(generate_notification(alert, result))
except Exception as e:
logging.error(
f"!!!Error while running alert query for alertId:{alert['alertId']} name: {alert['name']}")
logging.error(query)
logging.error(e)
cur = cur.recreate(rollback=True)
if len(notifications) > 0:
cur.execute(
cur.mogrify(f"""UPDATE public.alerts
SET options = options||'{{"lastNotification":{TimeUTC.now()}}}'::jsonb
WHERE alert_id IN %(ids)s;""", {"ids": tuple([n["alertId"] for n in notifications])}))
if len(notifications) > 0:
alerts.process_notifications(notifications)
def __format_value(x):
if x % 1 == 0:
x = int(x)
else:
x = round(x, 2)
return f"{x:,}"
def generate_notification(alert, result):
left = __format_value(result['value'])
right = __format_value(alert['query']['right'])
return {
"alertId": alert["alertId"],
"tenantId": alert["tenantId"],
"title": alert["name"],
"description": f"{alert['seriesName']} = {left} ({alert['query']['operator']} {right}).",
"buttonText": "Check metrics for more details",
"buttonUrl": f"/{alert['projectId']}/metrics",
"imageUrl": None,
"projectId": alert["projectId"],
"projectName": alert["projectName"],
"options": {"source": "ALERT", "sourceId": alert["alertId"],
"sourceMeta": alert["detectionMethod"],
"message": alert["options"]["message"], "projectId": alert["projectId"],
"data": {"title": alert["name"],
"limitValue": alert["query"]["right"],
"actualValue": float(result["value"]) \
if isinstance(result["value"], decimal.Decimal) \
else result["value"],
"operator": alert["query"]["operator"],
"trigger": alert["query"]["left"],
"alertId": alert["alertId"],
"detectionMethod": alert["detectionMethod"],
"currentPeriod": alert["options"]["currentPeriod"],
"previousPeriod": alert["options"]["previousPeriod"],
"createdAt": TimeUTC.now()}},
}

View file

@ -1,3 +1,4 @@
import logging
from os import access, R_OK
from os.path import exists as path_exists, getsize
@ -10,22 +11,10 @@ import schemas
from chalicelib.core import projects
from chalicelib.utils.TimeUTC import TimeUTC
logger = logging.getLogger(__name__)
ASSIST_KEY = config("ASSIST_KEY")
ASSIST_URL = config("ASSIST_URL") % ASSIST_KEY
SESSION_PROJECTION_COLS = """s.project_id,
s.session_id::text AS session_id,
s.user_uuid,
s.user_id,
s.user_agent,
s.user_os,
s.user_browser,
s.user_device,
s.user_device_type,
s.user_country,
s.start_ts,
s.user_anonymous_id,
s.platform
"""
def get_live_sessions_ws_user_id(project_id, user_id):
@ -52,7 +41,7 @@ def get_live_sessions_ws(project_id, body: schemas.LiveSessionsSearchPayloadSche
"sort": {"key": body.sort, "order": body.order}
}
for f in body.filters:
if f.type == schemas.LiveFilterType.metadata:
if f.type == schemas.LiveFilterType.METADATA:
data["filter"][f.source] = {"values": f.value, "operator": f.operator}
else:
@ -66,21 +55,21 @@ def __get_live_sessions_ws(project_id, data):
results = requests.post(ASSIST_URL + config("assist") + f"/{project_key}",
json=data, timeout=config("assistTimeout", cast=int, default=5))
if results.status_code != 200:
print(f"!! issue with the peer-server code:{results.status_code} for __get_live_sessions_ws")
print(results.text)
logger.error(f"!! issue with the peer-server code:{results.status_code} for __get_live_sessions_ws")
logger.error(results.text)
return {"total": 0, "sessions": []}
live_peers = results.json().get("data", [])
except requests.exceptions.Timeout:
print("!! Timeout getting Assist response")
logger.error("!! Timeout getting Assist response")
live_peers = {"total": 0, "sessions": []}
except Exception as e:
print("!! Issue getting Live-Assist response")
print(str(e))
print("expected JSON, received:")
logger.error("!! Issue getting Live-Assist response")
logger.exception(e)
logger.error("expected JSON, received:")
try:
print(results.text)
logger.error(results.text)
except:
print("couldn't get response")
logger.error("couldn't get response")
live_peers = {"total": 0, "sessions": []}
_live_peers = live_peers
if "sessions" in live_peers:
@ -106,7 +95,7 @@ def __get_agent_token(project_id, project_key, session_id):
"aud": f"openreplay:agent"
},
key=config("ASSIST_JWT_SECRET"),
algorithm=config("jwt_algorithm")
algorithm=config("JWT_ALGORITHM")
)
@ -116,8 +105,8 @@ def get_live_session_by_id(project_id, session_id):
results = requests.get(ASSIST_URL + config("assist") + f"/{project_key}/{session_id}",
timeout=config("assistTimeout", cast=int, default=5))
if results.status_code != 200:
print(f"!! issue with the peer-server code:{results.status_code} for get_live_session_by_id")
print(results.text)
logger.error(f"!! issue with the peer-server code:{results.status_code} for get_live_session_by_id")
logger.error(results.text)
return None
results = results.json().get("data")
if results is None:
@ -125,16 +114,16 @@ def get_live_session_by_id(project_id, session_id):
results["live"] = True
results["agentToken"] = __get_agent_token(project_id=project_id, project_key=project_key, session_id=session_id)
except requests.exceptions.Timeout:
print("!! Timeout getting Assist response")
logger.error("!! Timeout getting Assist response")
return None
except Exception as e:
print("!! Issue getting Assist response")
print(str(e))
print("expected JSON, received:")
logger.error("!! Issue getting Assist response")
logger.exception(e)
logger.error("expected JSON, received:")
try:
print(results.text)
logger.error(results.text)
except:
print("couldn't get response")
logger.error("couldn't get response")
return None
return results
@ -146,21 +135,21 @@ def is_live(project_id, session_id, project_key=None):
results = requests.get(ASSIST_URL + config("assistList") + f"/{project_key}/{session_id}",
timeout=config("assistTimeout", cast=int, default=5))
if results.status_code != 200:
print(f"!! issue with the peer-server code:{results.status_code} for is_live")
print(results.text)
logger.error(f"!! issue with the peer-server code:{results.status_code} for is_live")
logger.error(results.text)
return False
results = results.json().get("data")
except requests.exceptions.Timeout:
print("!! Timeout getting Assist response")
logger.error("!! Timeout getting Assist response")
return False
except Exception as e:
print("!! Issue getting Assist response")
print(str(e))
print("expected JSON, received:")
logger.error("!! Issue getting Assist response")
logger.exception(e)
logger.error("expected JSON, received:")
try:
print(results.text)
logger.error(results.text)
except:
print("couldn't get response")
logger.error("couldn't get response")
return False
return str(session_id) == results
@ -175,32 +164,27 @@ def autocomplete(project_id, q: str, key: str = None):
ASSIST_URL + config("assistList") + f"/{project_key}/autocomplete",
params=params, timeout=config("assistTimeout", cast=int, default=5))
if results.status_code != 200:
print(f"!! issue with the peer-server code:{results.status_code} for autocomplete")
print(results.text)
logger.error(f"!! issue with the peer-server code:{results.status_code} for autocomplete")
logger.error(results.text)
return {"errors": [f"Something went wrong wile calling assist:{results.text}"]}
results = results.json().get("data", [])
except requests.exceptions.Timeout:
print("!! Timeout getting Assist response")
logger.error("!! Timeout getting Assist response")
return {"errors": ["Assist request timeout"]}
except Exception as e:
print("!! Issue getting Assist response")
print(str(e))
print("expected JSON, received:")
logger.error("!! Issue getting Assist response")
logger.exception(e)
logger.error("expected JSON, received:")
try:
print(results.text)
logger.error(results.text)
except:
print("couldn't get response")
logger.error("couldn't get response")
return {"errors": ["Something went wrong wile calling assist"]}
for r in results:
r["type"] = __change_keys(r["type"])
return {"data": results}
def get_ice_servers():
return config("iceServers") if config("iceServers", default=None) is not None \
and len(config("iceServers")) > 0 else None
def __get_efs_path():
efs_path = config("FS_DIR")
if not path_exists(efs_path):
@ -258,46 +242,46 @@ def session_exists(project_id, session_id):
results = requests.get(ASSIST_URL + config("assist") + f"/{project_key}/{session_id}",
timeout=config("assistTimeout", cast=int, default=5))
if results.status_code != 200:
print(f"!! issue with the peer-server code:{results.status_code} for session_exists")
print(results.text)
logger.error(f"!! issue with the peer-server code:{results.status_code} for session_exists")
logger.error(results.text)
return None
results = results.json().get("data")
if results is None:
return False
return True
except requests.exceptions.Timeout:
print("!! Timeout getting Assist response")
logger.error("!! Timeout getting Assist response")
return False
except Exception as e:
print("!! Issue getting Assist response")
print(str(e))
print("expected JSON, received:")
logger.error("!! Issue getting Assist response")
logger.exception(e)
logger.error("expected JSON, received:")
try:
print(results.text)
logger.error(results.text)
except:
print("couldn't get response")
logger.error("couldn't get response")
return False
def __change_keys(key):
return {
"PAGETITLE": schemas.LiveFilterType.page_title.value,
"PAGETITLE": schemas.LiveFilterType.PAGE_TITLE.value,
"ACTIVE": "active",
"LIVE": "live",
"SESSIONID": schemas.LiveFilterType.session_id.value,
"METADATA": schemas.LiveFilterType.metadata.value,
"USERID": schemas.LiveFilterType.user_id.value,
"USERUUID": schemas.LiveFilterType.user_UUID.value,
"SESSIONID": schemas.LiveFilterType.SESSION_ID.value,
"METADATA": schemas.LiveFilterType.METADATA.value,
"USERID": schemas.LiveFilterType.USER_ID.value,
"USERUUID": schemas.LiveFilterType.USER_UUID.value,
"PROJECTKEY": "projectKey",
"REVID": schemas.LiveFilterType.rev_id.value,
"REVID": schemas.LiveFilterType.REV_ID.value,
"TIMESTAMP": "timestamp",
"TRACKERVERSION": schemas.LiveFilterType.tracker_version.value,
"TRACKERVERSION": schemas.LiveFilterType.TRACKER_VERSION.value,
"ISSNIPPET": "isSnippet",
"USEROS": schemas.LiveFilterType.user_os.value,
"USERBROWSER": schemas.LiveFilterType.user_browser.value,
"USERBROWSERVERSION": schemas.LiveFilterType.user_browser_version.value,
"USERDEVICE": schemas.LiveFilterType.user_device.value,
"USERDEVICETYPE": schemas.LiveFilterType.user_device_type.value,
"USERCOUNTRY": schemas.LiveFilterType.user_country.value,
"USEROS": schemas.LiveFilterType.USER_OS.value,
"USERBROWSER": schemas.LiveFilterType.USER_BROWSER.value,
"USERBROWSERVERSION": schemas.LiveFilterType.USER_BROWSER_VERSION.value,
"USERDEVICE": schemas.LiveFilterType.USER_DEVICE.value,
"USERDEVICETYPE": schemas.LiveFilterType.USER_DEVICE_TYPE.value,
"USERCOUNTRY": schemas.LiveFilterType.USER_COUNTRY.value,
"PROJECTID": "projectId"
}.get(key.upper(), key)

View file

@ -4,30 +4,40 @@ import jwt
from decouple import config
from chalicelib.core import tenants
from chalicelib.core import users
from chalicelib.utils import helper
from chalicelib.core import users, spot
from chalicelib.utils.TimeUTC import TimeUTC
logger = logging.getLogger(__name__)
def jwt_authorizer(scheme: str, token: str, leeway=0):
def get_supported_audience():
return [users.AUDIENCE, spot.AUDIENCE]
def is_spot_token(token: str) -> bool:
try:
decoded_token = jwt.decode(token, options={"verify_signature": False, "verify_exp": False})
audience = decoded_token.get("aud")
return audience == spot.AUDIENCE
except jwt.InvalidTokenError:
logger.error(f"Invalid token for is_spot_token: {token}")
raise
def jwt_authorizer(scheme: str, token: str, leeway=0) -> dict | None:
if scheme.lower() != "bearer":
return None
try:
payload = jwt.decode(
token,
config("jwt_secret"),
algorithms=config("jwt_algorithm"),
audience=[f"front:{helper.get_stage_name()}"],
leeway=leeway
)
payload = jwt.decode(jwt=token,
key=config("JWT_SECRET") if not is_spot_token(token) else config("JWT_SPOT_SECRET"),
algorithms=config("JWT_ALGORITHM"),
audience=get_supported_audience(),
leeway=leeway)
except jwt.ExpiredSignatureError:
logger.debug("! JWT Expired signature")
return None
except BaseException as e:
logger.warning("! JWT Base Exception")
logger.debug(e)
logger.warning("! JWT Base Exception", exc_info=e)
return None
return payload
@ -36,62 +46,51 @@ def jwt_refresh_authorizer(scheme: str, token: str):
if scheme.lower() != "bearer":
return None
try:
payload = jwt.decode(
token,
config("JWT_REFRESH_SECRET"),
algorithms=config("jwt_algorithm"),
audience=[f"front:{helper.get_stage_name()}"]
)
payload = jwt.decode(jwt=token,
key=config("JWT_REFRESH_SECRET") if not is_spot_token(token) \
else config("JWT_SPOT_REFRESH_SECRET"),
algorithms=config("JWT_ALGORITHM"),
audience=get_supported_audience())
except jwt.ExpiredSignatureError:
logger.debug("! JWT-refresh Expired signature")
return None
except BaseException as e:
logger.warning("! JWT-refresh Base Exception")
logger.debug(e)
logger.error("! JWT-refresh Base Exception", exc_info=e)
return None
return payload
def jwt_context(context):
user = users.get(user_id=context["userId"], tenant_id=context["tenantId"])
if user is None:
return None
return {
"tenantId": context["tenantId"],
"userId": context["userId"],
**user
}
def generate_jwt(user_id, tenant_id, iat, aud):
def generate_jwt(user_id, tenant_id, iat, aud, for_spot=False):
token = jwt.encode(
payload={
"userId": user_id,
"tenantId": tenant_id,
"exp": iat + config("JWT_EXPIRATION", cast=int),
"exp": iat + (config("JWT_EXPIRATION", cast=int) if not for_spot
else config("JWT_SPOT_EXPIRATION", cast=int)),
"iss": config("JWT_ISSUER"),
"iat": iat,
"aud": aud
},
key=config("jwt_secret"),
algorithm=config("jwt_algorithm")
key=config("JWT_SECRET") if not for_spot else config("JWT_SPOT_SECRET"),
algorithm=config("JWT_ALGORITHM")
)
return token
def generate_jwt_refresh(user_id, tenant_id, iat, aud, jwt_jti):
def generate_jwt_refresh(user_id, tenant_id, iat, aud, jwt_jti, for_spot=False):
token = jwt.encode(
payload={
"userId": user_id,
"tenantId": tenant_id,
"exp": iat + config("JWT_REFRESH_EXPIRATION", cast=int),
"exp": iat + (config("JWT_REFRESH_EXPIRATION", cast=int) if not for_spot
else config("JWT_SPOT_REFRESH_EXPIRATION", cast=int)),
"iss": config("JWT_ISSUER"),
"iat": iat,
"aud": aud,
"jti": jwt_jti
},
key=config("JWT_REFRESH_SECRET"),
algorithm=config("jwt_algorithm")
key=config("JWT_REFRESH_SECRET") if not for_spot else config("JWT_SPOT_REFRESH_SECRET"),
algorithm=config("JWT_ALGORITHM")
)
return token

View file

@ -1,331 +0,0 @@
import schemas
from chalicelib.core import countries, events, metadata
from chalicelib.utils import helper
from chalicelib.utils import pg_client
from chalicelib.utils.event_filter_definition import Event
TABLE = "public.autocomplete"
def __get_autocomplete_table(value, project_id):
autocomplete_events = [schemas.FilterType.rev_id,
schemas.EventType.click,
schemas.FilterType.user_device,
schemas.FilterType.user_id,
schemas.FilterType.user_browser,
schemas.FilterType.user_os,
schemas.EventType.custom,
schemas.FilterType.user_country,
schemas.FilterType.user_city,
schemas.FilterType.user_state,
schemas.EventType.location,
schemas.EventType.input]
autocomplete_events.sort()
sub_queries = []
c_list = []
for e in autocomplete_events:
if e == schemas.FilterType.user_country:
c_list = countries.get_country_code_autocomplete(value)
if len(c_list) > 0:
sub_queries.append(f"""(SELECT DISTINCT ON(value) '{e.value}' AS _type, value
FROM {TABLE}
WHERE project_id = %(project_id)s
AND type= '{e.value.upper()}'
AND value IN %(c_list)s)""")
continue
sub_queries.append(f"""(SELECT '{e.value}' AS _type, value
FROM {TABLE}
WHERE project_id = %(project_id)s
AND type= '{e.value.upper()}'
AND value ILIKE %(svalue)s
ORDER BY value
LIMIT 5)""")
if len(value) > 2:
sub_queries.append(f"""(SELECT '{e.value}' AS _type, value
FROM {TABLE}
WHERE project_id = %(project_id)s
AND type= '{e.value.upper()}'
AND value ILIKE %(value)s
ORDER BY value
LIMIT 5)""")
with pg_client.PostgresClient() as cur:
query = cur.mogrify(" UNION DISTINCT ".join(sub_queries) + ";",
{"project_id": project_id,
"value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value),
"c_list": tuple(c_list)
})
try:
cur.execute(query)
except Exception as err:
print("--------- AUTOCOMPLETE SEARCH QUERY EXCEPTION -----------")
print(query.decode('UTF-8'))
print("--------- VALUE -----------")
print(value)
print("--------------------")
raise err
results = cur.fetchall()
for r in results:
r["type"] = r.pop("_type")
results = helper.list_to_camel_case(results)
return results
def __generic_query(typename, value_length=None):
if typename == schemas.FilterType.user_country:
return f"""SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value IN %(value)s
ORDER BY value"""
if value_length is None or value_length > 2:
return f"""(SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value ILIKE %(svalue)s
ORDER BY value
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value ILIKE %(value)s
ORDER BY value
LIMIT 5);"""
return f"""SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value ILIKE %(svalue)s
ORDER BY value
LIMIT 10;"""
def __generic_autocomplete(event: Event):
def f(project_id, value, key=None, source=None):
with pg_client.PostgresClient() as cur:
query = __generic_query(event.ui_type, value_length=len(value))
params = {"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value)}
cur.execute(cur.mogrify(query, params))
return helper.list_to_camel_case(cur.fetchall())
return f
def __generic_autocomplete_metas(typename):
def f(project_id, text):
with pg_client.PostgresClient() as cur:
params = {"project_id": project_id, "value": helper.string_to_sql_like(text),
"svalue": helper.string_to_sql_like("^" + text)}
if typename == schemas.FilterType.user_country:
params["value"] = tuple(countries.get_country_code_autocomplete(text))
if len(params["value"]) == 0:
return []
query = cur.mogrify(__generic_query(typename, value_length=len(text)), params)
cur.execute(query)
rows = cur.fetchall()
return rows
return f
def __errors_query(source=None, value_length=None):
if value_length is None or value_length > 2:
return f"""((SELECT DISTINCT ON(lg.message)
lg.message AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.message ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.message)
lg.message AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.message ILIKE %(value)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.name ILIKE %(value)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5));"""
return f"""((SELECT DISTINCT ON(lg.message)
lg.message AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.message ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5));"""
def __search_errors(project_id, value, key=None, source=None):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(__errors_query(source,
value_length=len(value)),
{"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value),
"source": source}))
results = helper.list_to_camel_case(cur.fetchall())
return results
def __search_errors_ios(project_id, value, key=None, source=None):
if len(value) > 2:
query = f"""(SELECT DISTINCT ON(lg.reason)
lg.reason AS value,
'{events.EventType.CRASH_IOS.ui_type}' AS type
FROM {events.EventType.CRASH_IOS.table} INNER JOIN public.crashes_ios AS lg USING (crash_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.reason ILIKE %(svalue)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
'{events.EventType.CRASH_IOS.ui_type}' AS type
FROM {events.EventType.CRASH_IOS.table} INNER JOIN public.crashes_ios AS lg USING (crash_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.reason)
lg.reason AS value,
'{events.EventType.CRASH_IOS.ui_type}' AS type
FROM {events.EventType.CRASH_IOS.table} INNER JOIN public.crashes_ios AS lg USING (crash_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.reason ILIKE %(value)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
'{events.EventType.CRASH_IOS.ui_type}' AS type
FROM {events.EventType.CRASH_IOS.table} INNER JOIN public.crashes_ios AS lg USING (crash_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.name ILIKE %(value)s
LIMIT 5);"""
else:
query = f"""(SELECT DISTINCT ON(lg.reason)
lg.reason AS value,
'{events.EventType.CRASH_IOS.ui_type}' AS type
FROM {events.EventType.CRASH_IOS.table} INNER JOIN public.crashes_ios AS lg USING (crash_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.reason ILIKE %(svalue)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
'{events.EventType.CRASH_IOS.ui_type}' AS type
FROM {events.EventType.CRASH_IOS.table} INNER JOIN public.crashes_ios AS lg USING (crash_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
LIMIT 5);"""
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(query, {"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value)}))
results = helper.list_to_camel_case(cur.fetchall())
return results
def __search_metadata(project_id, value, key=None, source=None):
meta_keys = metadata.get(project_id=project_id)
meta_keys = {m["key"]: m["index"] for m in meta_keys}
if len(meta_keys) == 0 or key is not None and key not in meta_keys.keys():
return []
sub_from = []
if key is not None:
meta_keys = {key: meta_keys[key]}
for k in meta_keys.keys():
colname = metadata.index_to_colname(meta_keys[k])
if len(value) > 2:
sub_from.append(f"""((SELECT DISTINCT ON ({colname}) {colname} AS value, '{k}' AS key
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} ILIKE %(svalue)s LIMIT 5)
UNION
(SELECT DISTINCT ON ({colname}) {colname} AS value, '{k}' AS key
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} ILIKE %(value)s LIMIT 5))
""")
else:
sub_from.append(f"""(SELECT DISTINCT ON ({colname}) {colname} AS value, '{k}' AS key
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} ILIKE %(svalue)s LIMIT 5)""")
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""\
SELECT key, value, 'METADATA' AS TYPE
FROM({" UNION ALL ".join(sub_from)}) AS all_metas
LIMIT 5;""", {"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value)}))
results = helper.list_to_camel_case(cur.fetchall())
return results

View file

@ -0,0 +1,439 @@
import logging
import schemas
from chalicelib.core import countries, events, metadata
from chalicelib.utils import helper
from chalicelib.utils import pg_client
from chalicelib.utils.event_filter_definition import Event
from chalicelib.utils.or_cache import CachedResponse
logger = logging.getLogger(__name__)
TABLE = "public.autocomplete"
def __get_autocomplete_table(value, project_id):
autocomplete_events = [schemas.FilterType.REV_ID,
schemas.EventType.CLICK,
schemas.FilterType.USER_DEVICE,
schemas.FilterType.USER_ID,
schemas.FilterType.USER_BROWSER,
schemas.FilterType.USER_OS,
schemas.EventType.CUSTOM,
schemas.FilterType.USER_COUNTRY,
schemas.FilterType.USER_CITY,
schemas.FilterType.USER_STATE,
schemas.EventType.LOCATION,
schemas.EventType.INPUT]
autocomplete_events.sort()
sub_queries = []
c_list = []
for e in autocomplete_events:
if e == schemas.FilterType.USER_COUNTRY:
c_list = countries.get_country_code_autocomplete(value)
if len(c_list) > 0:
sub_queries.append(f"""(SELECT DISTINCT ON(value) '{e.value}' AS _type, value
FROM {TABLE}
WHERE project_id = %(project_id)s
AND type= '{e.value.upper()}'
AND value IN %(c_list)s)""")
continue
sub_queries.append(f"""(SELECT '{e.value}' AS _type, value
FROM {TABLE}
WHERE project_id = %(project_id)s
AND type= '{e.value.upper()}'
AND value ILIKE %(svalue)s
ORDER BY value
LIMIT 5)""")
if len(value) > 2:
sub_queries.append(f"""(SELECT '{e.value}' AS _type, value
FROM {TABLE}
WHERE project_id = %(project_id)s
AND type= '{e.value.upper()}'
AND value ILIKE %(value)s
ORDER BY value
LIMIT 5)""")
with pg_client.PostgresClient() as cur:
query = cur.mogrify(" UNION DISTINCT ".join(sub_queries) + ";",
{"project_id": project_id,
"value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value),
"c_list": tuple(c_list)
})
try:
cur.execute(query)
except Exception as err:
logger.exception("--------- AUTOCOMPLETE SEARCH QUERY EXCEPTION -----------")
logger.exception(query.decode('UTF-8'))
logger.exception("--------- VALUE -----------")
logger.exception(value)
logger.exception("--------------------")
raise err
results = cur.fetchall()
for r in results:
r["type"] = r.pop("_type")
results = helper.list_to_camel_case(results)
return results
def __generic_query(typename, value_length=None):
if typename == schemas.FilterType.USER_COUNTRY:
return f"""SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value IN %(value)s
ORDER BY value"""
if value_length is None or value_length > 2:
return f"""SELECT DISTINCT ON(value,type) value, type
((SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value ILIKE %(svalue)s
ORDER BY value
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value ILIKE %(value)s
ORDER BY value
LIMIT 5)) AS raw;"""
return f"""SELECT DISTINCT value, type
FROM {TABLE}
WHERE
project_id = %(project_id)s
AND type='{typename.upper()}'
AND value ILIKE %(svalue)s
ORDER BY value
LIMIT 10;"""
def __generic_autocomplete(event: Event):
def f(project_id, value, key=None, source=None):
with pg_client.PostgresClient() as cur:
query = __generic_query(event.ui_type, value_length=len(value))
params = {"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value)}
cur.execute(cur.mogrify(query, params))
return helper.list_to_camel_case(cur.fetchall())
return f
def generic_autocomplete_metas(typename):
def f(project_id, text):
with pg_client.PostgresClient() as cur:
params = {"project_id": project_id, "value": helper.string_to_sql_like(text),
"svalue": helper.string_to_sql_like("^" + text)}
if typename == schemas.FilterType.USER_COUNTRY:
params["value"] = tuple(countries.get_country_code_autocomplete(text))
if len(params["value"]) == 0:
return []
query = cur.mogrify(__generic_query(typename, value_length=len(text)), params)
cur.execute(query)
rows = cur.fetchall()
return rows
return f
def __errors_query(source=None, value_length=None):
if value_length is None or value_length > 2:
return f"""((SELECT DISTINCT ON(lg.message)
lg.message AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.message ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.message)
lg.message AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.message ILIKE %(value)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.name ILIKE %(value)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5));"""
return f"""((SELECT DISTINCT ON(lg.message)
lg.message AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.message ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5)
UNION DISTINCT
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
source,
'{events.EventType.ERROR.ui_type}' AS type
FROM {events.EventType.ERROR.table} INNER JOIN public.errors AS lg USING (error_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
AND lg.project_id = %(project_id)s
{"AND source = %(source)s" if source is not None else ""}
LIMIT 5));"""
def __search_errors(project_id, value, key=None, source=None):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(__errors_query(source,
value_length=len(value)),
{"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value),
"source": source}))
results = helper.list_to_camel_case(cur.fetchall())
return results
def __search_errors_mobile(project_id, value, key=None, source=None):
if len(value) > 2:
query = f"""(SELECT DISTINCT ON(lg.reason)
lg.reason AS value,
'{events.EventType.CRASH_MOBILE.ui_type}' AS type
FROM {events.EventType.CRASH_MOBILE.table} INNER JOIN public.crashes_ios AS lg USING (crash_ios_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.reason ILIKE %(svalue)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
'{events.EventType.CRASH_MOBILE.ui_type}' AS type
FROM {events.EventType.CRASH_MOBILE.table} INNER JOIN public.crashes_ios AS lg USING (crash_ios_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.reason)
lg.reason AS value,
'{events.EventType.CRASH_MOBILE.ui_type}' AS type
FROM {events.EventType.CRASH_MOBILE.table} INNER JOIN public.crashes_ios AS lg USING (crash_ios_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.reason ILIKE %(value)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
'{events.EventType.CRASH_MOBILE.ui_type}' AS type
FROM {events.EventType.CRASH_MOBILE.table} INNER JOIN public.crashes_ios AS lg USING (crash_ios_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.name ILIKE %(value)s
LIMIT 5);"""
else:
query = f"""(SELECT DISTINCT ON(lg.reason)
lg.reason AS value,
'{events.EventType.CRASH_MOBILE.ui_type}' AS type
FROM {events.EventType.CRASH_MOBILE.table} INNER JOIN public.crashes_ios AS lg USING (crash_ios_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.reason ILIKE %(svalue)s
LIMIT 5)
UNION ALL
(SELECT DISTINCT ON(lg.name)
lg.name AS value,
'{events.EventType.CRASH_MOBILE.ui_type}' AS type
FROM {events.EventType.CRASH_MOBILE.table} INNER JOIN public.crashes_ios AS lg USING (crash_ios_id) LEFT JOIN public.sessions AS s USING(session_id)
WHERE
s.project_id = %(project_id)s
AND lg.project_id = %(project_id)s
AND lg.name ILIKE %(svalue)s
LIMIT 5);"""
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(query, {"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value)}))
results = helper.list_to_camel_case(cur.fetchall())
return results
def __search_metadata(project_id, value, key=None, source=None):
meta_keys = metadata.get(project_id=project_id)
meta_keys = {m["key"]: m["index"] for m in meta_keys}
if len(meta_keys) == 0 or key is not None and key not in meta_keys.keys():
return []
sub_from = []
if key is not None:
meta_keys = {key: meta_keys[key]}
for k in meta_keys.keys():
colname = metadata.index_to_colname(meta_keys[k])
if len(value) > 2:
sub_from.append(f"""((SELECT DISTINCT ON ({colname}) {colname} AS value, '{k}' AS key
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} ILIKE %(svalue)s LIMIT 5)
UNION
(SELECT DISTINCT ON ({colname}) {colname} AS value, '{k}' AS key
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} ILIKE %(value)s LIMIT 5))
""")
else:
sub_from.append(f"""(SELECT DISTINCT ON ({colname}) {colname} AS value, '{k}' AS key
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} ILIKE %(svalue)s LIMIT 5)""")
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""\
SELECT DISTINCT ON(key, value) key, value, 'METADATA' AS TYPE
FROM({" UNION ALL ".join(sub_from)}) AS all_metas
LIMIT 5;""", {"project_id": project_id, "value": helper.string_to_sql_like(value),
"svalue": helper.string_to_sql_like("^" + value)}))
results = helper.list_to_camel_case(cur.fetchall())
return results
TYPE_TO_COLUMN = {
schemas.EventType.CLICK: "label",
schemas.EventType.INPUT: "label",
schemas.EventType.LOCATION: "path",
schemas.EventType.CUSTOM: "name",
schemas.FetchFilterType.FETCH_URL: "path",
schemas.GraphqlFilterType.GRAPHQL_NAME: "name",
schemas.EventType.STATE_ACTION: "name",
# For ERROR, sessions search is happening over name OR message,
# for simplicity top 10 is using name only
schemas.EventType.ERROR: "name",
schemas.FilterType.USER_COUNTRY: "user_country",
schemas.FilterType.USER_CITY: "user_city",
schemas.FilterType.USER_STATE: "user_state",
schemas.FilterType.USER_ID: "user_id",
schemas.FilterType.USER_ANONYMOUS_ID: "user_anonymous_id",
schemas.FilterType.USER_OS: "user_os",
schemas.FilterType.USER_BROWSER: "user_browser",
schemas.FilterType.USER_DEVICE: "user_device",
schemas.FilterType.PLATFORM: "platform",
schemas.FilterType.REV_ID: "rev_id",
schemas.FilterType.REFERRER: "referrer",
schemas.FilterType.UTM_SOURCE: "utm_source",
schemas.FilterType.UTM_MEDIUM: "utm_medium",
schemas.FilterType.UTM_CAMPAIGN: "utm_campaign",
}
TYPE_TO_TABLE = {
schemas.EventType.CLICK: "events.clicks",
schemas.EventType.INPUT: "events.inputs",
schemas.EventType.LOCATION: "events.pages",
schemas.EventType.CUSTOM: "events_common.customs",
schemas.FetchFilterType.FETCH_URL: "events_common.requests",
schemas.GraphqlFilterType.GRAPHQL_NAME: "events.graphql",
schemas.EventType.STATE_ACTION: "events.state_actions",
}
def is_top_supported(event_type):
return TYPE_TO_COLUMN.get(event_type, False)
@CachedResponse(table="or_cache.autocomplete_top_values", ttl=5 * 60)
def get_top_values(project_id, event_type, event_key=None):
with pg_client.PostgresClient() as cur:
if schemas.FilterType.has_value(event_type):
if event_type == schemas.FilterType.METADATA \
and (event_key is None \
or (colname := metadata.get_colname_by_key(project_id=project_id, key=event_key)) is None) \
or event_type != schemas.FilterType.METADATA \
and (colname := TYPE_TO_COLUMN.get(event_type)) is None:
return []
query = f"""WITH raw AS (SELECT DISTINCT {colname} AS c_value,
COUNT(1) OVER (PARTITION BY {colname}) AS row_count,
COUNT(1) OVER () AS total_count
FROM public.sessions
WHERE project_id = %(project_id)s
AND {colname} IS NOT NULL
AND sessions.duration IS NOT NULL
AND sessions.duration > 0
ORDER BY row_count DESC
LIMIT 10)
SELECT c_value AS value, row_count, trunc(row_count * 100 / total_count, 2) AS row_percentage
FROM raw;"""
elif event_type == schemas.EventType.ERROR:
colname = TYPE_TO_COLUMN.get(event_type)
query = f"""WITH raw AS (SELECT DISTINCT {colname} AS c_value,
COUNT(1) OVER (PARTITION BY {colname}) AS row_count,
COUNT(1) OVER () AS total_count
FROM public.errors
WHERE project_id = %(project_id)s
AND {colname} IS NOT NULL
AND {colname} != ''
ORDER BY row_count DESC
LIMIT 10)
SELECT c_value AS value, row_count, trunc(row_count * 100 / total_count,2) AS row_percentage
FROM raw;"""
else:
colname = TYPE_TO_COLUMN.get(event_type)
table = TYPE_TO_TABLE.get(event_type)
query = f"""WITH raw AS (SELECT DISTINCT {colname} AS c_value,
COUNT(1) OVER (PARTITION BY {colname}) AS row_count,
COUNT(1) OVER () AS total_count
FROM {table} INNER JOIN public.sessions USING(session_id)
WHERE project_id = %(project_id)s
AND {colname} IS NOT NULL
AND {colname} != ''
AND sessions.duration IS NOT NULL
AND sessions.duration > 0
ORDER BY row_count DESC
LIMIT 10)
SELECT c_value AS value, row_count, trunc(row_count * 100 / total_count,2) AS row_percentage
FROM raw;"""
params = {"project_id": project_id}
query = cur.mogrify(query, params)
logger.debug("--------------------")
logger.debug(query)
logger.debug("--------------------")
cur.execute(query=query)
results = cur.fetchall()
return helper.list_to_camel_case(results)

View file

@ -1,7 +1,8 @@
from chalicelib.utils import pg_client
from chalicelib.core import projects, log_tool_datadog, log_tool_stackdriver, log_tool_sentry
from chalicelib.core import projects
from chalicelib.core import users
from chalicelib.core.log_tools import datadog, stackdriver, sentry
from chalicelib.core.modules import TENANT_CONDITION
from chalicelib.utils import pg_client
def get_state(tenant_id):
@ -12,47 +13,61 @@ def get_state(tenant_id):
if len(pids) > 0:
cur.execute(
cur.mogrify("""SELECT EXISTS(( SELECT 1
cur.mogrify(
"""SELECT EXISTS(( SELECT 1
FROM public.sessions AS s
WHERE s.project_id IN %(ids)s)) AS exists;""",
{"ids": tuple(pids)})
{"ids": tuple(pids)},
)
)
recorded = cur.fetchone()["exists"]
meta = False
if recorded:
cur.execute("""SELECT EXISTS((SELECT 1
query = cur.mogrify(
f"""SELECT EXISTS((SELECT 1
FROM public.projects AS p
LEFT JOIN LATERAL ( SELECT 1
FROM public.sessions
WHERE sessions.project_id = p.project_id
AND sessions.user_id IS NOT NULL
LIMIT 1) AS sessions(user_id) ON (TRUE)
WHERE p.deleted_at ISNULL
WHERE {TENANT_CONDITION} AND p.deleted_at ISNULL
AND ( sessions.user_id IS NOT NULL OR p.metadata_1 IS NOT NULL
OR p.metadata_2 IS NOT NULL OR p.metadata_3 IS NOT NULL
OR p.metadata_4 IS NOT NULL OR p.metadata_5 IS NOT NULL
OR p.metadata_6 IS NOT NULL OR p.metadata_7 IS NOT NULL
OR p.metadata_8 IS NOT NULL OR p.metadata_9 IS NOT NULL
OR p.metadata_10 IS NOT NULL )
)) AS exists;""")
)) AS exists;""",
{"tenant_id": tenant_id},
)
cur.execute(query)
meta = cur.fetchone()["exists"]
return [
{"task": "Install OpenReplay",
"done": recorded,
"URL": "https://docs.openreplay.com/getting-started/quick-start"},
{"task": "Identify Users",
"done": meta,
"URL": "https://docs.openreplay.com/data-privacy-security/metadata"},
{"task": "Invite Team Members",
"done": len(users.get_members(tenant_id=tenant_id)) > 1,
"URL": "https://app.openreplay.com/client/manage-users"},
{"task": "Integrations",
"done": len(log_tool_datadog.get_all(tenant_id=tenant_id)) > 0 \
or len(log_tool_sentry.get_all(tenant_id=tenant_id)) > 0 \
or len(log_tool_stackdriver.get_all(tenant_id=tenant_id)) > 0,
"URL": "https://docs.openreplay.com/integrations"}
{
"task": "Install OpenReplay",
"done": recorded,
"URL": "https://docs.openreplay.com/getting-started/quick-start",
},
{
"task": "Identify Users",
"done": meta,
"URL": "https://docs.openreplay.com/data-privacy-security/metadata",
},
{
"task": "Invite Team Members",
"done": len(users.get_members(tenant_id=tenant_id)) > 1,
"URL": "https://app.openreplay.com/client/manage-users",
},
{
"task": "Integrations",
"done": len(datadog.get_all(tenant_id=tenant_id)) > 0
or len(sentry.get_all(tenant_id=tenant_id)) > 0
or len(stackdriver.get_all(tenant_id=tenant_id)) > 0,
"URL": "https://docs.openreplay.com/integrations",
},
]
@ -63,52 +78,66 @@ def get_state_installing(tenant_id):
if len(pids) > 0:
cur.execute(
cur.mogrify("""SELECT EXISTS(( SELECT 1
cur.mogrify(
"""SELECT EXISTS(( SELECT 1
FROM public.sessions AS s
WHERE s.project_id IN %(ids)s)) AS exists;""",
{"ids": tuple(pids)})
{"ids": tuple(pids)},
)
)
recorded = cur.fetchone()["exists"]
return {"task": "Install OpenReplay",
"done": recorded,
"URL": "https://docs.openreplay.com/getting-started/quick-start"}
return {
"task": "Install OpenReplay",
"done": recorded,
"URL": "https://docs.openreplay.com/getting-started/quick-start",
}
def get_state_identify_users(tenant_id):
with pg_client.PostgresClient() as cur:
cur.execute("""SELECT EXISTS((SELECT 1
query = cur.mogrify(
f"""SELECT EXISTS((SELECT 1
FROM public.projects AS p
LEFT JOIN LATERAL ( SELECT 1
FROM public.sessions
WHERE sessions.project_id = p.project_id
AND sessions.user_id IS NOT NULL
LIMIT 1) AS sessions(user_id) ON (TRUE)
WHERE p.deleted_at ISNULL
WHERE {TENANT_CONDITION} AND p.deleted_at ISNULL
AND ( sessions.user_id IS NOT NULL OR p.metadata_1 IS NOT NULL
OR p.metadata_2 IS NOT NULL OR p.metadata_3 IS NOT NULL
OR p.metadata_4 IS NOT NULL OR p.metadata_5 IS NOT NULL
OR p.metadata_6 IS NOT NULL OR p.metadata_7 IS NOT NULL
OR p.metadata_8 IS NOT NULL OR p.metadata_9 IS NOT NULL
OR p.metadata_10 IS NOT NULL )
)) AS exists;""")
)) AS exists;""",
{"tenant_id": tenant_id},
)
cur.execute(query)
meta = cur.fetchone()["exists"]
return {"task": "Identify Users",
"done": meta,
"URL": "https://docs.openreplay.com/data-privacy-security/metadata"}
return {
"task": "Identify Users",
"done": meta,
"URL": "https://docs.openreplay.com/data-privacy-security/metadata",
}
def get_state_manage_users(tenant_id):
return {"task": "Invite Team Members",
"done": len(users.get_members(tenant_id=tenant_id)) > 1,
"URL": "https://app.openreplay.com/client/manage-users"}
return {
"task": "Invite Team Members",
"done": len(users.get_members(tenant_id=tenant_id)) > 1,
"URL": "https://app.openreplay.com/client/manage-users",
}
def get_state_integrations(tenant_id):
return {"task": "Integrations",
"done": len(log_tool_datadog.get_all(tenant_id=tenant_id)) > 0 \
or len(log_tool_sentry.get_all(tenant_id=tenant_id)) > 0 \
or len(log_tool_stackdriver.get_all(tenant_id=tenant_id)) > 0,
"URL": "https://docs.openreplay.com/integrations"}
return {
"task": "Integrations",
"done": len(datadog.get_all(tenant_id=tenant_id)) > 0
or len(sentry.get_all(tenant_id=tenant_id)) > 0
or len(stackdriver.get_all(tenant_id=tenant_id)) > 0,
"URL": "https://docs.openreplay.com/integrations",
}

View file

@ -1,4 +1,4 @@
from chalicelib.utils import pg_client, helper
from chalicelib.utils import pg_client
from chalicelib.utils.storage import StorageClient
from decouple import config
@ -13,17 +13,23 @@ def get_canvas_presigned_urls(session_id, project_id):
{"project_id": project_id, "session_id": session_id})
)
rows = cur.fetchall()
urls = []
for i in range(len(rows)):
params = {
"sessionId": session_id,
"projectId": project_id,
"recordingId": rows[i]["recording_id"]
}
key = config("CANVAS_PATTERN", default="%(sessionId)s/%(recordingId)s.mp4") % params
rows[i] = StorageClient.get_presigned_url_for_sharing(
oldKey = "%(sessionId)s/%(recordingId)s.mp4" % params
key = config("CANVAS_PATTERN", default="%(sessionId)s/%(recordingId)s.tar.zst") % params
urls.append(StorageClient.get_presigned_url_for_sharing(
bucket=config("CANVAS_BUCKET", default=config("sessions_bucket")),
expires_in=config("PRESIGNED_URL_EXPIRATION", cast=int, default=900),
key=key
)
return rows
))
urls.append(StorageClient.get_presigned_url_for_sharing(
bucket=config("CANVAS_BUCKET", default=config("sessions_bucket")),
expires_in=config("PRESIGNED_URL_EXPIRATION", cast=int, default=900),
key=oldKey
))
return urls

View file

@ -1,77 +0,0 @@
import schemas
from chalicelib.core import sessions_mobs, sessions_legacy as sessions_search, events
from chalicelib.utils import pg_client, helper
SESSION_PROJECTION_COLS = """s.project_id,
s.session_id::text AS session_id,
s.user_uuid,
s.user_id,
s.user_os,
s.user_browser,
s.user_device,
s.user_device_type,
s.user_country,
s.start_ts,
s.duration,
s.events_count,
s.pages_count,
s.errors_count,
s.user_anonymous_id,
s.platform,
s.issue_score,
to_jsonb(s.issue_types) AS issue_types,
favorite_sessions.session_id NOTNULL AS favorite,
COALESCE((SELECT TRUE
FROM public.user_viewed_sessions AS fs
WHERE s.session_id = fs.session_id
AND fs.user_id = %(userId)s LIMIT 1), FALSE) AS viewed """
def search_short_session(data: schemas.ClickMapSessionsSearch, project_id, user_id, include_mobs: bool = True):
no_platform = True
for f in data.filters:
if f.type == schemas.FilterType.platform:
no_platform = False
break
if no_platform:
data.filters.append(schemas.SessionSearchFilterSchema(type=schemas.FilterType.platform,
value=[schemas.PlatformType.desktop],
operator=schemas.SearchEventOperator._is))
full_args, query_part = sessions_search.search_query_parts(data=data, error_status=None, errors_only=False,
favorite_only=data.bookmarked, issue=None,
project_id=project_id, user_id=user_id)
with pg_client.PostgresClient() as cur:
data.order = schemas.SortOrderType.desc
data.sort = 'duration'
# meta_keys = metadata.get(project_id=project_id)
meta_keys = []
main_query = cur.mogrify(f"""SELECT {SESSION_PROJECTION_COLS}
{"," if len(meta_keys) > 0 else ""}{",".join([f'metadata_{m["index"]}' for m in meta_keys])}
{query_part}
ORDER BY {data.sort} {data.order.value}
LIMIT 1;""", full_args)
# print("--------------------")
# print(main_query)
# print("--------------------")
try:
cur.execute(main_query)
except Exception as err:
print("--------- CLICK MAP SHORT SESSION SEARCH QUERY EXCEPTION -----------")
print(main_query.decode('UTF-8'))
print("--------- PAYLOAD -----------")
print(data.model_dump_json())
print("--------------------")
raise err
session = cur.fetchone()
if session:
if include_mobs:
session['domURL'] = sessions_mobs.get_urls(session_id=session["session_id"], project_id=project_id)
session['mobsUrl'] = sessions_mobs.get_urls_depercated(session_id=session["session_id"])
session['events'] = events.get_by_session_id(project_id=project_id, session_id=session["session_id"],
event_type=schemas.EventType.location)
return helper.dict_to_camel_case(session)

View file

@ -0,0 +1 @@
from . import collaboration_base as _

View file

@ -6,7 +6,7 @@ from fastapi import HTTPException, status
import schemas
from chalicelib.core import webhook
from chalicelib.core.collaboration_base import BaseCollaboration
from chalicelib.core.collaborations.collaboration_base import BaseCollaboration
logger = logging.getLogger(__name__)
@ -15,28 +15,34 @@ class MSTeams(BaseCollaboration):
@classmethod
def add(cls, tenant_id, data: schemas.AddCollaborationSchema):
if webhook.exists_by_name(tenant_id=tenant_id, name=data.name, exclude_id=None,
webhook_type=schemas.WebhookType.msteams):
webhook_type=schemas.WebhookType.MSTEAMS):
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"name already exists.")
if cls.say_hello(data.url):
return webhook.add(tenant_id=tenant_id,
endpoint=data.url.unicode_string(),
webhook_type=schemas.WebhookType.msteams,
webhook_type=schemas.WebhookType.MSTEAMS,
name=data.name)
return None
@classmethod
def say_hello(cls, url):
r = requests.post(
url=url,
json={
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "Welcome to OpenReplay",
"title": "Welcome to OpenReplay"
})
if r.status_code != 200:
logging.warning("MSTeams integration failed")
logging.warning(r.text)
try:
r = requests.post(
url=url,
json={
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "Welcome to OpenReplay",
"title": "Welcome to OpenReplay"
},
timeout=3)
if r.status_code != 200:
logger.warning("MSTeams integration failed")
logger.warning(r.text)
return False
except Exception as e:
logger.warning("!!! MSTeams integration failed")
logger.exception(e)
return False
return True
@ -51,15 +57,15 @@ class MSTeams(BaseCollaboration):
json=body,
timeout=5)
if r.status_code != 200:
logging.warning(f"!! issue sending msteams raw; webhookId:{webhook_id} code:{r.status_code}")
logging.warning(r.text)
logger.warning(f"!! issue sending msteams raw; webhookId:{webhook_id} code:{r.status_code}")
logger.warning(r.text)
return None
except requests.exceptions.Timeout:
logging.warning(f"!! Timeout sending msteams raw webhookId:{webhook_id}")
logger.warning(f"!! Timeout sending msteams raw webhookId:{webhook_id}")
return None
except Exception as e:
logging.warning(f"!! Issue sending msteams raw webhookId:{webhook_id}")
logging.warning(e)
logger.warning(f"!! Issue sending msteams raw webhookId:{webhook_id}")
logger.warning(e)
return None
return {"data": r.text}
@ -68,7 +74,7 @@ class MSTeams(BaseCollaboration):
integration = cls.get_integration(tenant_id=tenant_id, integration_id=webhook_id)
if integration is None:
return {"errors": ["msteams integration not found"]}
logging.debug(f"====> sending msteams batch notification: {len(attachments)}")
logger.debug(f"====> sending msteams batch notification: {len(attachments)}")
for i in range(0, len(attachments), 50):
part = attachments[i:i + 50]
for j in range(1, len(part), 2):
@ -82,8 +88,8 @@ class MSTeams(BaseCollaboration):
"sections": part
})
if r.status_code != 200:
logging.warning("!!!! something went wrong")
logging.warning(r.text)
logger.warning("!!!! something went wrong")
logger.warning(r.text)
@classmethod
def __share(cls, tenant_id, integration_id, attachement, extra=None):
@ -157,9 +163,9 @@ class MSTeams(BaseCollaboration):
def get_integration(cls, tenant_id, integration_id=None):
if integration_id is not None:
return webhook.get_webhook(tenant_id=tenant_id, webhook_id=integration_id,
webhook_type=schemas.WebhookType.msteams)
webhook_type=schemas.WebhookType.MSTEAMS)
integrations = webhook.get_by_type(tenant_id=tenant_id, webhook_type=schemas.WebhookType.msteams)
integrations = webhook.get_by_type(tenant_id=tenant_id, webhook_type=schemas.WebhookType.MSTEAMS)
if integrations is None or len(integrations) == 0:
return None
return integrations[0]

View file

@ -6,19 +6,19 @@ from fastapi import HTTPException, status
import schemas
from chalicelib.core import webhook
from chalicelib.core.collaboration_base import BaseCollaboration
from chalicelib.core.collaborations.collaboration_base import BaseCollaboration
class Slack(BaseCollaboration):
@classmethod
def add(cls, tenant_id, data: schemas.AddCollaborationSchema):
if webhook.exists_by_name(tenant_id=tenant_id, name=data.name, exclude_id=None,
webhook_type=schemas.WebhookType.slack):
webhook_type=schemas.WebhookType.SLACK):
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"name already exists.")
if cls.say_hello(data.url):
return webhook.add(tenant_id=tenant_id,
endpoint=data.url.unicode_string(),
webhook_type=schemas.WebhookType.slack,
webhook_type=schemas.WebhookType.SLACK,
name=data.name)
return None
@ -118,9 +118,9 @@ class Slack(BaseCollaboration):
def get_integration(cls, tenant_id, integration_id=None):
if integration_id is not None:
return webhook.get_webhook(tenant_id=tenant_id, webhook_id=integration_id,
webhook_type=schemas.WebhookType.slack)
webhook_type=schemas.WebhookType.SLACK)
integrations = webhook.get_by_type(tenant_id=tenant_id, webhook_type=schemas.WebhookType.slack)
integrations = webhook.get_by_type(tenant_id=tenant_id, webhook_type=schemas.WebhookType.SLACK)
if integrations is None or len(integrations) == 0:
return None
return integrations[0]

View file

@ -1,688 +0,0 @@
import json
import logging
from decouple import config
from fastapi import HTTPException, status
import schemas
from chalicelib.core import sessions, funnels, errors, issues, click_maps, sessions_mobs, product_analytics, \
custom_metrics_predefined
from chalicelib.utils import helper, pg_client
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.utils.storage import StorageClient
logger = logging.getLogger(__name__)
PIE_CHART_GROUP = 5
# TODO: refactor this to split
# timeseries /
# table of errors / table of issues / table of browsers / table of devices / table of countries / table of URLs
# remove "table of" calls from this function
def __try_live(project_id, data: schemas.CardSchema):
results = []
for i, s in enumerate(data.series):
results.append(sessions.search2_series(data=s.filter, project_id=project_id, density=data.density,
view_type=data.view_type, metric_type=data.metric_type,
metric_of=data.metric_of, metric_value=data.metric_value))
if data.view_type == schemas.MetricTimeseriesViewType.progress:
r = {"count": results[-1]}
diff = s.filter.endTimestamp - s.filter.startTimestamp
s.filter.endTimestamp = s.filter.startTimestamp
s.filter.startTimestamp = s.filter.endTimestamp - diff
r["previousCount"] = sessions.search2_series(data=s.filter, project_id=project_id, density=data.density,
view_type=data.view_type, metric_type=data.metric_type,
metric_of=data.metric_of, metric_value=data.metric_value)
r["countProgress"] = helper.__progress(old_val=r["previousCount"], new_val=r["count"])
r["seriesName"] = s.name if s.name else i + 1
r["seriesId"] = s.series_id if s.series_id else None
results[-1] = r
elif data.view_type == schemas.MetricTableViewType.pie_chart:
if len(results[i].get("values", [])) > PIE_CHART_GROUP:
results[i]["values"] = results[i]["values"][:PIE_CHART_GROUP] \
+ [{
"name": "Others", "group": True,
"sessionCount": sum(r["sessionCount"] for r in results[i]["values"][PIE_CHART_GROUP:])
}]
return results
def __get_table_of_series(project_id, data: schemas.CardSchema):
results = []
for i, s in enumerate(data.series):
results.append(sessions.search2_table(data=s.filter, project_id=project_id, density=data.density,
metric_of=data.metric_of, metric_value=data.metric_value))
return results
def __get_funnel_chart(project_id: int, data: schemas.CardFunnel, user_id: int = None):
if len(data.series) == 0:
return {
"stages": [],
"totalDropDueToIssues": 0
}
return funnels.get_top_insights_on_the_fly_widget(project_id=project_id, data=data.series[0].filter)
def __get_errors_list(project_id, user_id, data: schemas.CardSchema):
if len(data.series) == 0:
return {
"total": 0,
"errors": []
}
return errors.search(data.series[0].filter, project_id=project_id, user_id=user_id)
def __get_sessions_list(project_id, user_id, data: schemas.CardSchema):
if len(data.series) == 0:
logger.debug("empty series")
return {
"total": 0,
"sessions": []
}
return sessions.search_sessions(data=data.series[0].filter, project_id=project_id, user_id=user_id)
def __get_click_map_chart(project_id, user_id, data: schemas.CardClickMap, include_mobs: bool = True):
if len(data.series) == 0:
return None
return click_maps.search_short_session(project_id=project_id, user_id=user_id,
data=schemas.ClickMapSessionsSearch(
**data.series[0].filter.model_dump()),
include_mobs=include_mobs)
def __get_path_analysis_chart(project_id: int, user_id: int, data: schemas.CardPathAnalysis):
if len(data.series) == 0:
data.series.append(
schemas.CardPathAnalysisSeriesSchema(startTimestamp=data.startTimestamp, endTimestamp=data.endTimestamp))
elif not isinstance(data.series[0].filter, schemas.PathAnalysisSchema):
data.series[0].filter = schemas.PathAnalysisSchema()
return product_analytics.path_analysis(project_id=project_id, data=data)
def __get_timeseries_chart(project_id: int, data: schemas.CardTimeSeries, user_id: int = None):
series_charts = __try_live(project_id=project_id, data=data)
if data.view_type == schemas.MetricTimeseriesViewType.progress:
return series_charts
results = [{}] * len(series_charts[0])
for i in range(len(results)):
for j, series_chart in enumerate(series_charts):
results[i] = {**results[i], "timestamp": series_chart[i]["timestamp"],
data.series[j].name if data.series[j].name else j + 1: series_chart[i]["count"]}
return results
def not_supported(**args):
raise Exception("not supported")
def __get_table_of_user_ids(project_id: int, data: schemas.CardTable, user_id: int = None):
return __get_table_of_series(project_id=project_id, data=data)
def __get_table_of_sessions(project_id: int, data: schemas.CardTable, user_id):
return __get_sessions_list(project_id=project_id, user_id=user_id, data=data)
def __get_table_of_errors(project_id: int, data: schemas.CardTable, user_id: int):
return __get_errors_list(project_id=project_id, user_id=user_id, data=data)
def __get_table_of_issues(project_id: int, data: schemas.CardTable, user_id: int = None):
return __get_table_of_series(project_id=project_id, data=data)
def __get_table_of_browsers(project_id: int, data: schemas.CardTable, user_id: int = None):
return __get_table_of_series(project_id=project_id, data=data)
def __get_table_of_devises(project_id: int, data: schemas.CardTable, user_id: int = None):
return __get_table_of_series(project_id=project_id, data=data)
def __get_table_of_countries(project_id: int, data: schemas.CardTable, user_id: int = None):
return __get_table_of_series(project_id=project_id, data=data)
def __get_table_of_urls(project_id: int, data: schemas.CardTable, user_id: int = None):
return __get_table_of_series(project_id=project_id, data=data)
def __get_table_chart(project_id: int, data: schemas.CardTable, user_id: int):
supported = {
schemas.MetricOfTable.sessions: __get_table_of_sessions,
schemas.MetricOfTable.errors: __get_table_of_errors,
schemas.MetricOfTable.user_id: __get_table_of_user_ids,
schemas.MetricOfTable.issues: __get_table_of_issues,
schemas.MetricOfTable.user_browser: __get_table_of_browsers,
schemas.MetricOfTable.user_device: __get_table_of_devises,
schemas.MetricOfTable.user_country: __get_table_of_countries,
schemas.MetricOfTable.visited_url: __get_table_of_urls,
}
return supported.get(data.metric_of, not_supported)(project_id=project_id, data=data, user_id=user_id)
def get_chart(project_id: int, data: schemas.CardSchema, user_id: int):
if data.is_predefined:
return custom_metrics_predefined.get_metric(key=data.metric_of,
project_id=project_id,
data=data.model_dump())
supported = {
schemas.MetricType.timeseries: __get_timeseries_chart,
schemas.MetricType.table: __get_table_chart,
schemas.MetricType.click_map: __get_click_map_chart,
schemas.MetricType.funnel: __get_funnel_chart,
schemas.MetricType.insights: not_supported,
schemas.MetricType.pathAnalysis: __get_path_analysis_chart
}
return supported.get(data.metric_type, not_supported)(project_id=project_id, data=data, user_id=user_id)
def __merge_metric_with_data(metric: schemas.CardSchema,
data: schemas.CardSessionsSchema) -> schemas.CardSchema:
metric.startTimestamp = data.startTimestamp
metric.endTimestamp = data.endTimestamp
metric.page = data.page
metric.limit = data.limit
metric.density = data.density
if data.series is not None and len(data.series) > 0:
metric.series = data.series
if len(data.filters) > 0:
for s in metric.series:
s.filter.filters += data.filters
metric = schemas.CardSchema(**metric.model_dump(by_alias=True))
return metric
def get_sessions_by_card_id(project_id, user_id, metric_id, data: schemas.CardSessionsSchema):
card: dict = get_card(metric_id=metric_id, project_id=project_id, user_id=user_id, flatten=False)
if card is None:
return None
metric: schemas.CardSchema = schemas.CardSchema(**card)
metric: schemas.CardSchema = __merge_metric_with_data(metric=metric, data=data)
results = []
for s in metric.series:
results.append({"seriesId": s.series_id, "seriesName": s.name,
**sessions.search_sessions(data=s.filter, project_id=project_id, user_id=user_id)})
return results
def get_funnel_issues(project_id, user_id, metric_id, data: schemas.CardSessionsSchema):
raw_metric: dict = get_card(metric_id=metric_id, project_id=project_id, user_id=user_id, flatten=False)
if raw_metric is None:
return None
metric: schemas.CardSchema = schemas.CardSchema(**raw_metric)
metric: schemas.CardSchema = __merge_metric_with_data(metric=metric, data=data)
if metric is None:
return None
for s in metric.series:
return {"seriesId": s.series_id, "seriesName": s.name,
**funnels.get_issues_on_the_fly_widget(project_id=project_id, data=s.filter)}
def get_errors_list(project_id, user_id, metric_id, data: schemas.CardSessionsSchema):
raw_metric: dict = get_card(metric_id=metric_id, project_id=project_id, user_id=user_id, flatten=False)
if raw_metric is None:
return None
metric: schemas.CardSchema = schemas.CardSchema(**raw_metric)
metric: schemas.CardSchema = __merge_metric_with_data(metric=metric, data=data)
if metric is None:
return None
for s in metric.series:
return {"seriesId": s.series_id, "seriesName": s.name,
**errors.search(data=s.filter, project_id=project_id, user_id=user_id)}
def get_sessions(project_id, user_id, data: schemas.CardSessionsSchema):
results = []
if len(data.series) == 0:
return results
for s in data.series:
if len(data.filters) > 0:
s.filter.filters += data.filters
s.filter = schemas.SessionsSearchPayloadSchema(**s.filter.model_dump(by_alias=True))
results.append({"seriesId": None, "seriesName": s.name,
**sessions.search_sessions(data=s.filter, project_id=project_id, user_id=user_id)})
return results
def __get_funnel_issues(project_id: int, user_id: int, data: schemas.CardFunnel):
if len(data.series) == 0:
return {"data": []}
data.series[0].filter.startTimestamp = data.startTimestamp
data.series[0].filter.endTimestamp = data.endTimestamp
data = funnels.get_issues_on_the_fly_widget(project_id=project_id, data=data.series[0].filter)
return {"data": data}
def __get_path_analysis_issues(project_id: int, user_id: int, data: schemas.CardPathAnalysis):
if len(data.filters) > 0 or len(data.series) > 0:
filters = [f.model_dump(by_alias=True) for f in data.filters] \
+ [f.model_dump(by_alias=True) for f in data.series[0].filter.filters]
else:
return []
search_data = schemas.SessionsSearchPayloadSchema(
startTimestamp=data.startTimestamp,
endTimestamp=data.endTimestamp,
limit=data.limit,
page=data.page,
filters=filters
)
for s in data.excludes:
search_data.filters.append(schemas.SessionSearchEventSchema2(type=s.type,
operator=schemas.SearchEventOperator._not_on,
value=s.value))
result = sessions.search_table_of_individual_issues(project_id=project_id, data=search_data)
return result
def get_issues(project_id: int, user_id: int, data: schemas.CardSchema):
if data.is_predefined:
return not_supported()
if data.metric_of == schemas.MetricOfTable.issues:
return __get_table_of_issues(project_id=project_id, user_id=user_id, data=data)
supported = {
schemas.MetricType.timeseries: not_supported,
schemas.MetricType.table: not_supported,
schemas.MetricType.click_map: not_supported,
schemas.MetricType.funnel: __get_funnel_issues,
schemas.MetricType.insights: not_supported,
schemas.MetricType.pathAnalysis: __get_path_analysis_issues,
}
return supported.get(data.metric_type, not_supported)(project_id=project_id, data=data, user_id=user_id)
def __get_path_analysis_card_info(data: schemas.CardPathAnalysis):
r = {"start_point": [s.model_dump() for s in data.start_point],
"start_type": data.start_type,
"excludes": [e.model_dump() for e in data.excludes],
"hideExcess": data.hide_excess}
return r
def create_card(project_id, user_id, data: schemas.CardSchema, dashboard=False):
with pg_client.PostgresClient() as cur:
session_data = None
if data.metric_type == schemas.MetricType.click_map:
session_data = __get_click_map_chart(project_id=project_id, user_id=user_id,
data=data, include_mobs=False)
if session_data is not None:
session_data = json.dumps(session_data)
_data = {"session_data": session_data}
for i, s in enumerate(data.series):
for k in s.model_dump().keys():
_data[f"{k}_{i}"] = s.__getattribute__(k)
_data[f"index_{i}"] = i
_data[f"filter_{i}"] = s.filter.json()
series_len = len(data.series)
params = {"user_id": user_id, "project_id": project_id, **data.model_dump(), **_data}
params["default_config"] = json.dumps(data.default_config.model_dump())
params["card_info"] = None
if data.metric_type == schemas.MetricType.pathAnalysis:
params["card_info"] = json.dumps(__get_path_analysis_card_info(data=data))
query = """INSERT INTO metrics (project_id, user_id, name, is_public,
view_type, metric_type, metric_of, metric_value,
metric_format, default_config, thumbnail, data,
card_info)
VALUES (%(project_id)s, %(user_id)s, %(name)s, %(is_public)s,
%(view_type)s, %(metric_type)s, %(metric_of)s, %(metric_value)s,
%(metric_format)s, %(default_config)s, %(thumbnail)s, %(session_data)s,
%(card_info)s)
RETURNING metric_id"""
if len(data.series) > 0:
query = f"""WITH m AS ({query})
INSERT INTO metric_series(metric_id, index, name, filter)
VALUES {",".join([f"((SELECT metric_id FROM m), %(index_{i})s, %(name_{i})s, %(filter_{i})s::jsonb)"
for i in range(series_len)])}
RETURNING metric_id;"""
query = cur.mogrify(query, params)
cur.execute(query)
r = cur.fetchone()
if dashboard:
return r["metric_id"]
return {"data": get_card(metric_id=r["metric_id"], project_id=project_id, user_id=user_id)}
def update_card(metric_id, user_id, project_id, data: schemas.CardSchema):
metric: dict = get_card(metric_id=metric_id, project_id=project_id, user_id=user_id, flatten=False)
if metric is None:
return None
series_ids = [r["seriesId"] for r in metric["series"]]
n_series = []
d_series_ids = []
u_series = []
u_series_ids = []
params = {"metric_id": metric_id, "is_public": data.is_public, "name": data.name,
"user_id": user_id, "project_id": project_id, "view_type": data.view_type,
"metric_type": data.metric_type, "metric_of": data.metric_of,
"metric_value": data.metric_value, "metric_format": data.metric_format,
"config": json.dumps(data.default_config.model_dump()), "thumbnail": data.thumbnail}
for i, s in enumerate(data.series):
prefix = "u_"
if s.index is None:
s.index = i
if s.series_id is None or s.series_id not in series_ids:
n_series.append({"i": i, "s": s})
prefix = "n_"
else:
u_series.append({"i": i, "s": s})
u_series_ids.append(s.series_id)
ns = s.model_dump()
for k in ns.keys():
if k == "filter":
ns[k] = json.dumps(ns[k])
params[f"{prefix}{k}_{i}"] = ns[k]
for i in series_ids:
if i not in u_series_ids:
d_series_ids.append(i)
params["d_series_ids"] = tuple(d_series_ids)
params["card_info"] = None
if data.metric_type == schemas.MetricType.pathAnalysis:
params["card_info"] = json.dumps(__get_path_analysis_card_info(data=data))
with pg_client.PostgresClient() as cur:
sub_queries = []
if len(n_series) > 0:
sub_queries.append(f"""\
n AS (INSERT INTO metric_series (metric_id, index, name, filter)
VALUES {",".join([f"(%(metric_id)s, %(n_index_{s['i']})s, %(n_name_{s['i']})s, %(n_filter_{s['i']})s::jsonb)"
for s in n_series])}
RETURNING 1)""")
if len(u_series) > 0:
sub_queries.append(f"""\
u AS (UPDATE metric_series
SET name=series.name,
filter=series.filter,
index=series.index
FROM (VALUES {",".join([f"(%(u_series_id_{s['i']})s,%(u_index_{s['i']})s,%(u_name_{s['i']})s,%(u_filter_{s['i']})s::jsonb)"
for s in u_series])}) AS series(series_id, index, name, filter)
WHERE metric_series.metric_id =%(metric_id)s AND metric_series.series_id=series.series_id
RETURNING 1)""")
if len(d_series_ids) > 0:
sub_queries.append("""\
d AS (DELETE FROM metric_series WHERE metric_id =%(metric_id)s AND series_id IN %(d_series_ids)s
RETURNING 1)""")
query = cur.mogrify(f"""\
{"WITH " if len(sub_queries) > 0 else ""}{",".join(sub_queries)}
UPDATE metrics
SET name = %(name)s, is_public= %(is_public)s,
view_type= %(view_type)s, metric_type= %(metric_type)s,
metric_of= %(metric_of)s, metric_value= %(metric_value)s,
metric_format= %(metric_format)s,
edited_at = timezone('utc'::text, now()),
default_config = %(config)s,
thumbnail = %(thumbnail)s,
card_info = %(card_info)s
WHERE metric_id = %(metric_id)s
AND project_id = %(project_id)s
AND (user_id = %(user_id)s OR is_public)
RETURNING metric_id;""", params)
cur.execute(query)
return get_card(metric_id=metric_id, project_id=project_id, user_id=user_id)
def search_all(project_id, user_id, data: schemas.SearchCardsSchema, include_series=False):
constraints = ["metrics.project_id = %(project_id)s",
"metrics.deleted_at ISNULL"]
params = {"project_id": project_id, "user_id": user_id,
"offset": (data.page - 1) * data.limit,
"limit": data.limit, }
if data.mine_only:
constraints.append("user_id = %(user_id)s")
else:
constraints.append("(user_id = %(user_id)s OR metrics.is_public)")
if data.shared_only:
constraints.append("is_public")
if data.query is not None and len(data.query) > 0:
constraints.append("(name ILIKE %(query)s OR owner.owner_email ILIKE %(query)s)")
params["query"] = helper.values_for_operator(value=data.query,
op=schemas.SearchEventOperator._contains)
with pg_client.PostgresClient() as cur:
sub_join = ""
if include_series:
sub_join = """LEFT JOIN LATERAL (SELECT COALESCE(jsonb_agg(metric_series.* ORDER BY index),'[]'::jsonb) AS series
FROM metric_series
WHERE metric_series.metric_id = metrics.metric_id
AND metric_series.deleted_at ISNULL
) AS metric_series ON (TRUE)"""
query = cur.mogrify(
f"""SELECT metric_id, project_id, user_id, name, is_public, created_at, edited_at,
metric_type, metric_of, metric_format, metric_value, view_type, is_pinned,
dashboards, owner_email, default_config AS config, thumbnail
FROM metrics
{sub_join}
LEFT JOIN LATERAL (SELECT COALESCE(jsonb_agg(connected_dashboards.* ORDER BY is_public,name),'[]'::jsonb) AS dashboards
FROM (SELECT DISTINCT dashboard_id, name, is_public
FROM dashboards INNER JOIN dashboard_widgets USING (dashboard_id)
WHERE deleted_at ISNULL
AND dashboard_widgets.metric_id = metrics.metric_id
AND project_id = %(project_id)s
AND ((dashboards.user_id = %(user_id)s OR is_public))) AS connected_dashboards
) AS connected_dashboards ON (TRUE)
LEFT JOIN LATERAL (SELECT email AS owner_email
FROM users
WHERE deleted_at ISNULL
AND users.user_id = metrics.user_id
) AS owner ON (TRUE)
WHERE {" AND ".join(constraints)}
ORDER BY created_at {data.order.value}
LIMIT %(limit)s OFFSET %(offset)s;""", params)
cur.execute(query)
rows = cur.fetchall()
if include_series:
for r in rows:
for s in r["series"]:
s["filter"] = helper.old_search_payload_to_flat(s["filter"])
else:
for r in rows:
r["created_at"] = TimeUTC.datetime_to_timestamp(r["created_at"])
r["edited_at"] = TimeUTC.datetime_to_timestamp(r["edited_at"])
rows = helper.list_to_camel_case(rows)
return rows
def get_all(project_id, user_id):
default_search = schemas.SearchCardsSchema()
result = rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
while len(rows) == default_search.limit:
default_search.page += 1
rows = search_all(project_id=project_id, user_id=user_id, data=default_search)
result += rows
return result
def delete_card(project_id, metric_id, user_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
UPDATE public.metrics
SET deleted_at = timezone('utc'::text, now()), edited_at = timezone('utc'::text, now())
WHERE project_id = %(project_id)s
AND metric_id = %(metric_id)s
AND (user_id = %(user_id)s OR is_public);""",
{"metric_id": metric_id, "project_id": project_id, "user_id": user_id})
)
return {"state": "success"}
def __get_path_analysis_attributes(row):
card_info = row.pop("cardInfo")
row["excludes"] = card_info.get("excludes", [])
row["startPoint"] = card_info.get("startPoint", [])
row["startType"] = card_info.get("startType", "start")
row["hideExcess"] = card_info.get("hideExcess", False)
return row
def get_card(metric_id, project_id, user_id, flatten: bool = True, include_data: bool = False):
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
f"""SELECT metric_id, project_id, user_id, name, is_public, created_at, deleted_at, edited_at, metric_type,
view_type, metric_of, metric_value, metric_format, is_pinned, default_config,
default_config AS config,series, dashboards, owner_email, card_info
{',data' if include_data else ''}
FROM metrics
LEFT JOIN LATERAL (SELECT COALESCE(jsonb_agg(metric_series.* ORDER BY index),'[]'::jsonb) AS series
FROM metric_series
WHERE metric_series.metric_id = metrics.metric_id
AND metric_series.deleted_at ISNULL
) AS metric_series ON (TRUE)
LEFT JOIN LATERAL (SELECT COALESCE(jsonb_agg(connected_dashboards.* ORDER BY is_public,name),'[]'::jsonb) AS dashboards
FROM (SELECT dashboard_id, name, is_public
FROM dashboards INNER JOIN dashboard_widgets USING (dashboard_id)
WHERE deleted_at ISNULL
AND project_id = %(project_id)s
AND ((dashboards.user_id = %(user_id)s OR is_public))
AND metric_id = %(metric_id)s) AS connected_dashboards
) AS connected_dashboards ON (TRUE)
LEFT JOIN LATERAL (SELECT email AS owner_email
FROM users
WHERE deleted_at ISNULL
AND users.user_id = metrics.user_id
) AS owner ON (TRUE)
WHERE metrics.project_id = %(project_id)s
AND metrics.deleted_at ISNULL
AND (metrics.user_id = %(user_id)s OR metrics.is_public)
AND metrics.metric_id = %(metric_id)s
ORDER BY created_at;""",
{"metric_id": metric_id, "project_id": project_id, "user_id": user_id}
)
cur.execute(query)
row = cur.fetchone()
if row is None:
return None
row["created_at"] = TimeUTC.datetime_to_timestamp(row["created_at"])
row["edited_at"] = TimeUTC.datetime_to_timestamp(row["edited_at"])
if flatten:
for s in row["series"]:
s["filter"] = helper.old_search_payload_to_flat(s["filter"])
row = helper.dict_to_camel_case(row)
if row["metricType"] == schemas.MetricType.pathAnalysis:
row = __get_path_analysis_attributes(row=row)
return row
def get_series_for_alert(project_id, user_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(
"""SELECT series_id AS value,
metrics.name || '.' || (COALESCE(metric_series.name, 'series ' || index)) || '.count' AS name,
'count' AS unit,
FALSE AS predefined,
metric_id,
series_id
FROM metric_series
INNER JOIN metrics USING (metric_id)
WHERE metrics.deleted_at ISNULL
AND metrics.project_id = %(project_id)s
AND metrics.metric_type = 'timeseries'
AND (user_id = %(user_id)s OR is_public)
ORDER BY name;""",
{"project_id": project_id, "user_id": user_id}
)
)
rows = cur.fetchall()
return helper.list_to_camel_case(rows)
def change_state(project_id, metric_id, user_id, status):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
UPDATE public.metrics
SET active = %(status)s
WHERE metric_id = %(metric_id)s
AND (user_id = %(user_id)s OR is_public);""",
{"metric_id": metric_id, "status": status, "user_id": user_id})
)
return get_card(metric_id=metric_id, project_id=project_id, user_id=user_id)
def get_funnel_sessions_by_issue(user_id, project_id, metric_id, issue_id,
data: schemas.CardSessionsSchema
# , range_value=None, start_date=None, end_date=None
):
card: dict = get_card(metric_id=metric_id, project_id=project_id, user_id=user_id, flatten=False)
if card is None:
return None
metric: schemas.CardSchema = schemas.CardSchema(**card)
metric: schemas.CardSchema = __merge_metric_with_data(metric=metric, data=data)
if metric is None:
return None
for s in metric.series:
s.filter.startTimestamp = data.startTimestamp
s.filter.endTimestamp = data.endTimestamp
s.filter.limit = data.limit
s.filter.page = data.page
issues_list = funnels.get_issues_on_the_fly_widget(project_id=project_id, data=s.filter).get("issues", {})
issues_list = issues_list.get("significant", []) + issues_list.get("insignificant", [])
issue = None
for i in issues_list:
if i.get("issueId", "") == issue_id:
issue = i
break
if issue is None:
issue = issues.get(project_id=project_id, issue_id=issue_id)
if issue is not None:
issue = {**issue,
"affectedSessions": 0,
"affectedUsers": 0,
"conversionImpact": 0,
"lostConversions": 0,
"unaffectedSessions": 0}
return {"seriesId": s.series_id, "seriesName": s.name,
"sessions": sessions.search_sessions(user_id=user_id, project_id=project_id,
issue=issue, data=s.filter)
if issue is not None else {"total": 0, "sessions": []},
"issue": issue}
def make_chart_from_card(project_id, user_id, metric_id, data: schemas.CardSessionsSchema):
raw_metric: dict = get_card(metric_id=metric_id, project_id=project_id, user_id=user_id, include_data=True)
if raw_metric is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="card not found")
raw_metric["startTimestamp"] = data.startTimestamp
raw_metric["endTimestamp"] = data.endTimestamp
raw_metric["limit"] = data.limit
raw_metric["density"] = data.density
metric: schemas.CardSchema = schemas.CardSchema(**raw_metric)
if metric.is_predefined:
return custom_metrics_predefined.get_metric(key=metric.metric_of,
project_id=project_id,
data=data.model_dump())
elif metric.metric_type == schemas.MetricType.click_map:
if raw_metric["data"]:
keys = sessions_mobs. \
__get_mob_keys(project_id=project_id, session_id=raw_metric["data"]["sessionId"])
mob_exists = False
for k in keys:
if StorageClient.exists(bucket=config("sessions_bucket"), key=k):
mob_exists = True
break
if mob_exists:
raw_metric["data"]['domURL'] = sessions_mobs.get_urls(session_id=raw_metric["data"]["sessionId"],
project_id=project_id)
raw_metric["data"]['mobsUrl'] = sessions_mobs.get_urls_depercated(
session_id=raw_metric["data"]["sessionId"])
return raw_metric["data"]
return get_chart(project_id=project_id, data=metric, user_id=user_id)

View file

@ -1,61 +0,0 @@
import logging
from typing import Union
import logging
from typing import Union
import schemas
from chalicelib.core import metrics
logger = logging.getLogger(__name__)
def get_metric(key: Union[schemas.MetricOfWebVitals, schemas.MetricOfErrors, \
schemas.MetricOfPerformance, schemas.MetricOfResources], project_id: int, data: dict):
supported = {schemas.MetricOfWebVitals.count_sessions: metrics.get_processed_sessions,
schemas.MetricOfWebVitals.avg_image_load_time: metrics.get_application_activity_avg_image_load_time,
schemas.MetricOfWebVitals.avg_page_load_time: metrics.get_application_activity_avg_page_load_time,
schemas.MetricOfWebVitals.avg_request_load_time: metrics.get_application_activity_avg_request_load_time,
schemas.MetricOfWebVitals.avg_dom_content_load_start: metrics.get_page_metrics_avg_dom_content_load_start,
schemas.MetricOfWebVitals.avg_first_contentful_pixel: metrics.get_page_metrics_avg_first_contentful_pixel,
schemas.MetricOfWebVitals.avg_visited_pages: metrics.get_user_activity_avg_visited_pages,
schemas.MetricOfWebVitals.avg_session_duration: metrics.get_user_activity_avg_session_duration,
schemas.MetricOfWebVitals.avg_pages_dom_buildtime: metrics.get_pages_dom_build_time,
schemas.MetricOfWebVitals.avg_pages_response_time: metrics.get_pages_response_time,
schemas.MetricOfWebVitals.avg_response_time: metrics.get_top_metrics_avg_response_time,
schemas.MetricOfWebVitals.avg_first_paint: metrics.get_top_metrics_avg_first_paint,
schemas.MetricOfWebVitals.avg_dom_content_loaded: metrics.get_top_metrics_avg_dom_content_loaded,
schemas.MetricOfWebVitals.avg_till_first_byte: metrics.get_top_metrics_avg_till_first_bit,
schemas.MetricOfWebVitals.avg_time_to_interactive: metrics.get_top_metrics_avg_time_to_interactive,
schemas.MetricOfWebVitals.count_requests: metrics.get_top_metrics_count_requests,
schemas.MetricOfWebVitals.avg_time_to_render: metrics.get_time_to_render,
schemas.MetricOfWebVitals.avg_used_js_heap_size: metrics.get_memory_consumption,
schemas.MetricOfWebVitals.avg_cpu: metrics.get_avg_cpu,
schemas.MetricOfWebVitals.avg_fps: metrics.get_avg_fps,
schemas.MetricOfErrors.impacted_sessions_by_js_errors: metrics.get_impacted_sessions_by_js_errors,
schemas.MetricOfErrors.domains_errors_4xx: metrics.get_domains_errors_4xx,
schemas.MetricOfErrors.domains_errors_5xx: metrics.get_domains_errors_5xx,
schemas.MetricOfErrors.errors_per_domains: metrics.get_errors_per_domains,
schemas.MetricOfErrors.calls_errors: metrics.get_calls_errors,
schemas.MetricOfErrors.errors_per_type: metrics.get_errors_per_type,
schemas.MetricOfErrors.resources_by_party: metrics.get_resources_by_party,
schemas.MetricOfPerformance.speed_location: metrics.get_speed_index_location,
schemas.MetricOfPerformance.slowest_domains: metrics.get_slowest_domains,
schemas.MetricOfPerformance.sessions_per_browser: metrics.get_sessions_per_browser,
schemas.MetricOfPerformance.time_to_render: metrics.get_time_to_render,
schemas.MetricOfPerformance.impacted_sessions_by_slow_pages: metrics.get_impacted_sessions_by_slow_pages,
schemas.MetricOfPerformance.memory_consumption: metrics.get_memory_consumption,
schemas.MetricOfPerformance.cpu: metrics.get_avg_cpu,
schemas.MetricOfPerformance.fps: metrics.get_avg_fps,
schemas.MetricOfPerformance.crashes: metrics.get_crashes,
schemas.MetricOfPerformance.resources_vs_visually_complete: metrics.get_resources_vs_visually_complete,
schemas.MetricOfPerformance.pages_dom_buildtime: metrics.get_pages_dom_build_time,
schemas.MetricOfPerformance.pages_response_time: metrics.get_pages_response_time,
schemas.MetricOfPerformance.pages_response_time_distribution: metrics.get_pages_response_time_distribution,
schemas.MetricOfResources.missing_resources: metrics.get_missing_resources_trend,
schemas.MetricOfResources.slowest_resources: metrics.get_slowest_resources,
schemas.MetricOfResources.resources_loading_time: metrics.get_resources_loading_time,
schemas.MetricOfResources.resource_type_vs_response_end: metrics.resource_type_vs_response_end,
schemas.MetricOfResources.resources_count_by_type: metrics.get_resources_count_by_type, }
return supported.get(key, lambda *args: None)(project_id=project_id, **data)

View file

@ -1,5 +1,8 @@
import logging
from chalicelib.utils import helper, pg_client
from chalicelib.utils import pg_client
logger = logging.getLogger(__name__)
class DatabaseRequestHandler:
@ -90,7 +93,7 @@ class DatabaseRequestHandler:
if additional_clauses:
query += " " + additional_clauses
logging.info(f"Query: {query}")
logger.debug(f"Query: {query}")
return query
def execute_query(self, query, data=None):

View file

@ -1,711 +0,0 @@
import json
import schemas
from chalicelib.core import sourcemaps, sessions
from chalicelib.utils import errors_helper
from chalicelib.utils import pg_client, helper
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.utils.metrics_helper import __get_step_size
def get(error_id, family=False):
if family:
return get_batch([error_id])
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"SELECT * FROM events.errors AS e INNER JOIN public.errors AS re USING(error_id) WHERE error_id = %(error_id)s;",
{"error_id": error_id})
cur.execute(query=query)
result = cur.fetchone()
if result is not None:
result["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(result["stacktrace_parsed_at"])
return helper.dict_to_camel_case(result)
def get_batch(error_ids):
if len(error_ids) == 0:
return []
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""
WITH RECURSIVE error_family AS (
SELECT *
FROM public.errors
WHERE error_id IN %(error_ids)s
UNION
SELECT child_errors.*
FROM public.errors AS child_errors
INNER JOIN error_family ON error_family.error_id = child_errors.parent_error_id OR error_family.parent_error_id = child_errors.error_id
)
SELECT *
FROM error_family;""",
{"error_ids": tuple(error_ids)})
cur.execute(query=query)
errors = cur.fetchall()
for e in errors:
e["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(e["stacktrace_parsed_at"])
return helper.list_to_camel_case(errors)
def __flatten_sort_key_count_version(data, merge_nested=False):
if data is None:
return []
return sorted(
[
{
"name": f'{o["name"]}@{v["version"]}',
"count": v["count"]
} for o in data for v in o["partition"]
],
key=lambda o: o["count"], reverse=True) if merge_nested else \
[
{
"name": o["name"],
"count": o["count"],
} for o in data
]
def __process_tags(row):
return [
{"name": "browser", "partitions": __flatten_sort_key_count_version(data=row.get("browsers_partition"))},
{"name": "browser.ver",
"partitions": __flatten_sort_key_count_version(data=row.pop("browsers_partition"), merge_nested=True)},
{"name": "OS", "partitions": __flatten_sort_key_count_version(data=row.get("os_partition"))},
{"name": "OS.ver",
"partitions": __flatten_sort_key_count_version(data=row.pop("os_partition"), merge_nested=True)},
{"name": "device.family", "partitions": __flatten_sort_key_count_version(data=row.get("device_partition"))},
{"name": "device",
"partitions": __flatten_sort_key_count_version(data=row.pop("device_partition"), merge_nested=True)},
{"name": "country", "partitions": row.pop("country_partition")}
]
def get_details(project_id, error_id, user_id, **data):
pg_sub_query24 = __get_basic_constraints(time_constraint=False, chart=True, step_size_name="step_size24")
pg_sub_query24.append("error_id = %(error_id)s")
pg_sub_query30_session = __get_basic_constraints(time_constraint=True, chart=False,
startTime_arg_name="startDate30",
endTime_arg_name="endDate30", project_key="sessions.project_id")
pg_sub_query30_session.append("sessions.start_ts >= %(startDate30)s")
pg_sub_query30_session.append("sessions.start_ts <= %(endDate30)s")
pg_sub_query30_session.append("error_id = %(error_id)s")
pg_sub_query30_err = __get_basic_constraints(time_constraint=True, chart=False, startTime_arg_name="startDate30",
endTime_arg_name="endDate30", project_key="errors.project_id")
pg_sub_query30_err.append("sessions.project_id = %(project_id)s")
pg_sub_query30_err.append("sessions.start_ts >= %(startDate30)s")
pg_sub_query30_err.append("sessions.start_ts <= %(endDate30)s")
pg_sub_query30_err.append("error_id = %(error_id)s")
pg_sub_query30_err.append("source ='js_exception'")
pg_sub_query30 = __get_basic_constraints(time_constraint=False, chart=True, step_size_name="step_size30")
pg_sub_query30.append("error_id = %(error_id)s")
pg_basic_query = __get_basic_constraints(time_constraint=False)
pg_basic_query.append("error_id = %(error_id)s")
with pg_client.PostgresClient() as cur:
data["startDate24"] = TimeUTC.now(-1)
data["endDate24"] = TimeUTC.now()
data["startDate30"] = TimeUTC.now(-30)
data["endDate30"] = TimeUTC.now()
density24 = int(data.get("density24", 24))
step_size24 = __get_step_size(data["startDate24"], data["endDate24"], density24, factor=1)
density30 = int(data.get("density30", 30))
step_size30 = __get_step_size(data["startDate30"], data["endDate30"], density30, factor=1)
params = {
"startDate24": data['startDate24'],
"endDate24": data['endDate24'],
"startDate30": data['startDate30'],
"endDate30": data['endDate30'],
"project_id": project_id,
"userId": user_id,
"step_size24": step_size24,
"step_size30": step_size30,
"error_id": error_id}
main_pg_query = f"""\
SELECT error_id,
name,
message,
users,
sessions,
last_occurrence,
first_occurrence,
last_session_id,
browsers_partition,
os_partition,
device_partition,
country_partition,
chart24,
chart30,
custom_tags
FROM (SELECT error_id,
name,
message,
COUNT(DISTINCT user_id) AS users,
COUNT(DISTINCT session_id) AS sessions
FROM public.errors
INNER JOIN events.errors AS s_errors USING (error_id)
INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_err)}
GROUP BY error_id, name, message) AS details
INNER JOIN (SELECT MAX(timestamp) AS last_occurrence,
MIN(timestamp) AS first_occurrence
FROM events.errors
WHERE error_id = %(error_id)s
GROUP BY error_id) AS time_details ON (TRUE)
INNER JOIN (SELECT session_id AS last_session_id,
coalesce(custom_tags, '[]')::jsonb AS custom_tags
FROM events.errors
LEFT JOIN LATERAL (
SELECT jsonb_agg(jsonb_build_object(errors_tags.key, errors_tags.value)) AS custom_tags
FROM errors_tags
WHERE errors_tags.error_id = %(error_id)s
AND errors_tags.session_id = errors.session_id
AND errors_tags.message_id = errors.message_id) AS errors_tags ON (TRUE)
WHERE error_id = %(error_id)s
ORDER BY errors.timestamp DESC
LIMIT 1) AS last_session_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(browser_details) AS browsers_partition
FROM (SELECT *
FROM (SELECT user_browser AS name,
COUNT(session_id) AS count
FROM events.errors
INNER JOIN sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_browser
ORDER BY count DESC) AS count_per_browser_query
INNER JOIN LATERAL (SELECT JSONB_AGG(version_details) AS partition
FROM (SELECT user_browser_version AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
AND sessions.user_browser = count_per_browser_query.name
GROUP BY user_browser_version
ORDER BY count DESC) AS version_details
) AS browser_version_details ON (TRUE)) AS browser_details) AS browser_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(os_details) AS os_partition
FROM (SELECT *
FROM (SELECT user_os AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_os
ORDER BY count DESC) AS count_per_os_details
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_version_details) AS partition
FROM (SELECT COALESCE(user_os_version,'unknown') AS version, COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
AND sessions.user_os = count_per_os_details.name
GROUP BY user_os_version
ORDER BY count DESC) AS count_per_version_details
GROUP BY count_per_os_details.name ) AS os_version_details
ON (TRUE)) AS os_details) AS os_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(device_details) AS device_partition
FROM (SELECT *
FROM (SELECT user_device_type AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_device_type
ORDER BY count DESC) AS count_per_device_details
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_device_v_details) AS partition
FROM (SELECT CASE
WHEN user_device = '' OR user_device ISNULL
THEN 'unknown'
ELSE user_device END AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
AND sessions.user_device_type = count_per_device_details.name
GROUP BY user_device
ORDER BY count DESC) AS count_per_device_v_details
GROUP BY count_per_device_details.name ) AS device_version_details
ON (TRUE)) AS device_details) AS device_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(count_per_country_details) AS country_partition
FROM (SELECT user_country AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_country
ORDER BY count DESC) AS count_per_country_details) AS country_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(chart_details) AS chart24
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate24)s, %(endDate24)s, %(step_size24)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors
INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query24)}
) AS chart_details ON (TRUE)
GROUP BY generated_timestamp
ORDER BY generated_timestamp) AS chart_details) AS chart_details24 ON (TRUE)
INNER JOIN (SELECT jsonb_agg(chart_details) AS chart30
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate30)s, %(endDate30)s, %(step_size30)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30)}) AS chart_details
ON (TRUE)
GROUP BY timestamp
ORDER BY timestamp) AS chart_details) AS chart_details30 ON (TRUE);
"""
# print("--------------------")
# print(cur.mogrify(main_pg_query, params))
# print("--------------------")
cur.execute(cur.mogrify(main_pg_query, params))
row = cur.fetchone()
if row is None:
return {"errors": ["error not found"]}
row["tags"] = __process_tags(row)
query = cur.mogrify(
f"""SELECT error_id, status, session_id, start_ts,
parent_error_id,session_id, user_anonymous_id,
user_id, user_uuid, user_browser, user_browser_version,
user_os, user_os_version, user_device, payload,
FALSE AS favorite,
True AS viewed
FROM public.errors AS pe
INNER JOIN events.errors AS ee USING (error_id)
INNER JOIN public.sessions USING (session_id)
WHERE pe.project_id = %(project_id)s
AND error_id = %(error_id)s
ORDER BY start_ts DESC
LIMIT 1;""",
{"project_id": project_id, "error_id": error_id, "user_id": user_id})
cur.execute(query=query)
status = cur.fetchone()
if status is not None:
row["stack"] = errors_helper.format_first_stack_frame(status).pop("stack")
row["status"] = status.pop("status")
row["parent_error_id"] = status.pop("parent_error_id")
row["favorite"] = status.pop("favorite")
row["viewed"] = status.pop("viewed")
row["last_hydrated_session"] = status
else:
row["stack"] = []
row["last_hydrated_session"] = None
row["status"] = "untracked"
row["parent_error_id"] = None
row["favorite"] = False
row["viewed"] = False
return {"data": helper.dict_to_camel_case(row)}
def get_details_chart(project_id, error_id, user_id, **data):
pg_sub_query = __get_basic_constraints()
pg_sub_query.append("error_id = %(error_id)s")
pg_sub_query_chart = __get_basic_constraints(time_constraint=False, chart=True)
pg_sub_query_chart.append("error_id = %(error_id)s")
with pg_client.PostgresClient() as cur:
if data.get("startDate") is None:
data["startDate"] = TimeUTC.now(-7)
else:
data["startDate"] = int(data["startDate"])
if data.get("endDate") is None:
data["endDate"] = TimeUTC.now()
else:
data["endDate"] = int(data["endDate"])
density = int(data.get("density", 7))
step_size = __get_step_size(data["startDate"], data["endDate"], density, factor=1)
params = {
"startDate": data['startDate'],
"endDate": data['endDate'],
"project_id": project_id,
"userId": user_id,
"step_size": step_size,
"error_id": error_id}
main_pg_query = f"""\
SELECT %(error_id)s AS error_id,
browsers_partition,
os_partition,
device_partition,
country_partition,
chart
FROM (SELECT jsonb_agg(browser_details) AS browsers_partition
FROM (SELECT *
FROM (SELECT user_browser AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
GROUP BY user_browser
ORDER BY count DESC) AS count_per_browser_query
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_version_details) AS partition
FROM (SELECT user_browser_version AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
AND user_browser = count_per_browser_query.name
GROUP BY user_browser_version
ORDER BY count DESC) AS count_per_version_details) AS browesr_version_details
ON (TRUE)) AS browser_details) AS browser_details
INNER JOIN (SELECT jsonb_agg(os_details) AS os_partition
FROM (SELECT *
FROM (SELECT user_os AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
GROUP BY user_os
ORDER BY count DESC) AS count_per_os_details
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_version_query) AS partition
FROM (SELECT COALESCE(user_os_version, 'unknown') AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
AND user_os = count_per_os_details.name
GROUP BY user_os_version
ORDER BY count DESC) AS count_per_version_query
) AS os_version_query ON (TRUE)) AS os_details) AS os_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(device_details) AS device_partition
FROM (SELECT *
FROM (SELECT user_device_type AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
GROUP BY user_device_type
ORDER BY count DESC) AS count_per_device_details
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_device_details) AS partition
FROM (SELECT CASE
WHEN user_device = '' OR user_device ISNULL
THEN 'unknown'
ELSE user_device END AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
AND user_device_type = count_per_device_details.name
GROUP BY user_device_type, user_device
ORDER BY count DESC) AS count_per_device_details
) AS device_version_details ON (TRUE)) AS device_details) AS device_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(count_per_country_details) AS country_partition
FROM (SELECT user_country AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query)}
GROUP BY user_country
ORDER BY count DESC) AS count_per_country_details) AS country_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(chart_details) AS chart
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate)s, %(endDate)s, %(step_size)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors
INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query_chart)}
) AS chart_details ON (TRUE)
GROUP BY generated_timestamp
ORDER BY generated_timestamp) AS chart_details) AS chart_details ON (TRUE);"""
cur.execute(cur.mogrify(main_pg_query, params))
row = cur.fetchone()
if row is None:
return {"errors": ["error not found"]}
row["tags"] = __process_tags(row)
return {"data": helper.dict_to_camel_case(row)}
def __get_basic_constraints(platform=None, time_constraint=True, startTime_arg_name="startDate",
endTime_arg_name="endDate", chart=False, step_size_name="step_size",
project_key="project_id"):
if project_key is None:
ch_sub_query = []
else:
ch_sub_query = [f"{project_key} =%(project_id)s"]
if time_constraint:
ch_sub_query += [f"timestamp >= %({startTime_arg_name})s",
f"timestamp < %({endTime_arg_name})s"]
if chart:
ch_sub_query += [f"timestamp >= generated_timestamp",
f"timestamp < generated_timestamp + %({step_size_name})s"]
if platform == schemas.PlatformType.mobile:
ch_sub_query.append("user_device_type = 'mobile'")
elif platform == schemas.PlatformType.desktop:
ch_sub_query.append("user_device_type = 'desktop'")
return ch_sub_query
def __get_sort_key(key):
return {
schemas.ErrorSort.occurrence: "max_datetime",
schemas.ErrorSort.users_count: "users",
schemas.ErrorSort.sessions_count: "sessions"
}.get(key, 'max_datetime')
def search(data: schemas.SearchErrorsSchema, project_id, user_id):
empty_response = {
'total': 0,
'errors': []
}
platform = None
for f in data.filters:
if f.type == schemas.FilterType.platform and len(f.value) > 0:
platform = f.value[0]
pg_sub_query = __get_basic_constraints(platform, project_key="sessions.project_id")
pg_sub_query += ["sessions.start_ts>=%(startDate)s", "sessions.start_ts<%(endDate)s", "source ='js_exception'",
"pe.project_id=%(project_id)s"]
# To ignore Script error
pg_sub_query.append("pe.message!='Script error.'")
pg_sub_query_chart = __get_basic_constraints(platform, time_constraint=False, chart=True, project_key=None)
# pg_sub_query_chart.append("source ='js_exception'")
pg_sub_query_chart.append("errors.error_id =details.error_id")
statuses = []
error_ids = None
if data.startTimestamp is None:
data.startTimestamp = TimeUTC.now(-30)
if data.endTimestamp is None:
data.endTimestamp = TimeUTC.now(1)
if len(data.events) > 0 or len(data.filters) > 0:
print("-- searching for sessions before errors")
statuses = sessions.search_sessions(data=data, project_id=project_id, user_id=user_id, errors_only=True,
error_status=data.status)
if len(statuses) == 0:
return empty_response
error_ids = [e["errorId"] for e in statuses]
with pg_client.PostgresClient() as cur:
step_size = __get_step_size(data.startTimestamp, data.endTimestamp, data.density, factor=1)
sort = __get_sort_key('datetime')
if data.sort is not None:
sort = __get_sort_key(data.sort)
order = schemas.SortOrderType.desc
if data.order is not None:
order = data.order
extra_join = ""
params = {
"startDate": data.startTimestamp,
"endDate": data.endTimestamp,
"project_id": project_id,
"userId": user_id,
"step_size": step_size}
if data.status != schemas.ErrorStatus.all:
pg_sub_query.append("status = %(error_status)s")
params["error_status"] = data.status
if data.limit is not None and data.page is not None:
params["errors_offset"] = (data.page - 1) * data.limit
params["errors_limit"] = data.limit
else:
params["errors_offset"] = 0
params["errors_limit"] = 200
if error_ids is not None:
params["error_ids"] = tuple(error_ids)
pg_sub_query.append("error_id IN %(error_ids)s")
# if data.bookmarked:
# pg_sub_query.append("ufe.user_id = %(userId)s")
# extra_join += " INNER JOIN public.user_favorite_errors AS ufe USING (error_id)"
if data.query is not None and len(data.query) > 0:
pg_sub_query.append("(pe.name ILIKE %(error_query)s OR pe.message ILIKE %(error_query)s)")
params["error_query"] = helper.values_for_operator(value=data.query,
op=schemas.SearchEventOperator._contains)
main_pg_query = f"""SELECT full_count,
error_id,
name,
message,
users,
sessions,
last_occurrence,
first_occurrence,
chart
FROM (SELECT COUNT(details) OVER () AS full_count, details.*
FROM (SELECT error_id,
name,
message,
COUNT(DISTINCT COALESCE(user_id,user_uuid::text)) AS users,
COUNT(DISTINCT session_id) AS sessions,
MAX(timestamp) AS max_datetime,
MIN(timestamp) AS min_datetime
FROM events.errors
INNER JOIN public.errors AS pe USING (error_id)
INNER JOIN public.sessions USING (session_id)
{extra_join}
WHERE {" AND ".join(pg_sub_query)}
GROUP BY error_id, name, message
ORDER BY {sort} {order}) AS details
LIMIT %(errors_limit)s OFFSET %(errors_offset)s
) AS details
INNER JOIN LATERAL (SELECT MAX(timestamp) AS last_occurrence,
MIN(timestamp) AS first_occurrence
FROM events.errors
WHERE errors.error_id = details.error_id) AS time_details ON (TRUE)
INNER JOIN LATERAL (SELECT jsonb_agg(chart_details) AS chart
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate)s, %(endDate)s, %(step_size)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors
WHERE {" AND ".join(pg_sub_query_chart)}
) AS sessions ON (TRUE)
GROUP BY timestamp
ORDER BY timestamp) AS chart_details) AS chart_details ON (TRUE);"""
# print("--------------------")
# print(cur.mogrify(main_pg_query, params))
# print("--------------------")
cur.execute(cur.mogrify(main_pg_query, params))
rows = cur.fetchall()
total = 0 if len(rows) == 0 else rows[0]["full_count"]
if total == 0:
rows = []
else:
if len(statuses) == 0:
query = cur.mogrify(
"""SELECT error_id,
COALESCE((SELECT TRUE
FROM public.user_viewed_errors AS ve
WHERE errors.error_id = ve.error_id
AND ve.user_id = %(user_id)s LIMIT 1), FALSE) AS viewed
FROM public.errors
WHERE project_id = %(project_id)s AND error_id IN %(error_ids)s;""",
{"project_id": project_id, "error_ids": tuple([r["error_id"] for r in rows]),
"user_id": user_id})
cur.execute(query=query)
statuses = helper.list_to_camel_case(cur.fetchall())
statuses = {
s["errorId"]: s for s in statuses
}
for r in rows:
r.pop("full_count")
if r["error_id"] in statuses:
r["viewed"] = statuses[r["error_id"]]["viewed"]
else:
r["viewed"] = False
return {
'total': total,
'errors': helper.list_to_camel_case(rows)
}
def __save_stacktrace(error_id, data):
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""UPDATE public.errors
SET stacktrace=%(data)s::jsonb, stacktrace_parsed_at=timezone('utc'::text, now())
WHERE error_id = %(error_id)s;""",
{"error_id": error_id, "data": json.dumps(data)})
cur.execute(query=query)
def get_trace(project_id, error_id):
error = get(error_id=error_id, family=False)
if error is None:
return {"errors": ["error not found"]}
if error.get("source", "") != "js_exception":
return {"errors": ["this source of errors doesn't have a sourcemap"]}
if error.get("payload") is None:
return {"errors": ["null payload"]}
if error.get("stacktrace") is not None:
return {"sourcemapUploaded": True,
"trace": error.get("stacktrace"),
"preparsed": True}
trace, all_exists = sourcemaps.get_traces_group(project_id=project_id, payload=error["payload"])
if all_exists:
__save_stacktrace(error_id=error_id, data=trace)
return {"sourcemapUploaded": all_exists,
"trace": trace,
"preparsed": False}
def get_sessions(start_date, end_date, project_id, user_id, error_id):
extra_constraints = ["s.project_id = %(project_id)s",
"s.start_ts >= %(startDate)s",
"s.start_ts <= %(endDate)s",
"e.error_id = %(error_id)s"]
if start_date is None:
start_date = TimeUTC.now(-7)
if end_date is None:
end_date = TimeUTC.now()
params = {
"startDate": start_date,
"endDate": end_date,
"project_id": project_id,
"userId": user_id,
"error_id": error_id}
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
f"""SELECT s.project_id,
s.session_id::text AS session_id,
s.user_uuid,
s.user_id,
s.user_agent,
s.user_os,
s.user_browser,
s.user_device,
s.user_country,
s.start_ts,
s.duration,
s.events_count,
s.pages_count,
s.errors_count,
s.issue_types,
COALESCE((SELECT TRUE
FROM public.user_favorite_sessions AS fs
WHERE s.session_id = fs.session_id
AND fs.user_id = %(userId)s LIMIT 1), FALSE) AS favorite,
COALESCE((SELECT TRUE
FROM public.user_viewed_sessions AS fs
WHERE s.session_id = fs.session_id
AND fs.user_id = %(userId)s LIMIT 1), FALSE) AS viewed
FROM public.sessions AS s INNER JOIN events.errors AS e USING (session_id)
WHERE {" AND ".join(extra_constraints)}
ORDER BY s.start_ts DESC;""",
params)
cur.execute(query=query)
sessions_list = []
total = cur.rowcount
row = cur.fetchone()
while row is not None and len(sessions_list) < 100:
sessions_list.append(row)
row = cur.fetchone()
return {
'total': total,
'sessions': helper.list_to_camel_case(sessions_list)
}
ACTION_STATE = {
"unsolve": 'unresolved',
"solve": 'resolved',
"ignore": 'ignored'
}
def change_state(project_id, user_id, error_id, action):
errors = get(error_id, family=True)
print(len(errors))
status = ACTION_STATE.get(action)
if errors is None or len(errors) == 0:
return {"errors": ["error not found"]}
if errors[0]["status"] == status:
return {"errors": [f"error is already {status}"]}
if errors[0]["status"] == ACTION_STATE["solve"] and status == ACTION_STATE["ignore"]:
return {"errors": [f"state transition not permitted {errors[0]['status']} -> {status}"]}
params = {
"userId": user_id,
"error_ids": tuple([e["errorId"] for e in errors]),
"status": status}
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""UPDATE public.errors
SET status = %(status)s
WHERE error_id IN %(error_ids)s
RETURNING status""",
params)
cur.execute(query=query)
row = cur.fetchone()
if row is not None:
for e in errors:
e["status"] = row["status"]
return {"data": errors}

View file

@ -0,0 +1,13 @@
import logging
from decouple import config
logger = logging.getLogger(__name__)
from . import errors_pg as errors_legacy
if config("EXP_ERRORS_SEARCH", cast=bool, default=False):
logger.info(">>> Using experimental error search")
from . import errors_ch as errors
else:
from . import errors_pg as errors

View file

@ -0,0 +1,409 @@
import schemas
from chalicelib.core import metadata
from chalicelib.core.errors import errors_legacy
from chalicelib.core.errors.modules import errors_helper
from chalicelib.core.errors.modules import sessions
from chalicelib.utils import ch_client, exp_ch_helper
from chalicelib.utils import helper, metrics_helper
from chalicelib.utils.TimeUTC import TimeUTC
def _multiple_values(values, value_key="value"):
query_values = {}
if values is not None and isinstance(values, list):
for i in range(len(values)):
k = f"{value_key}_{i}"
query_values[k] = values[i]
return query_values
def __get_sql_operator(op: schemas.SearchEventOperator):
return {
schemas.SearchEventOperator.IS: "=",
schemas.SearchEventOperator.IS_ANY: "IN",
schemas.SearchEventOperator.ON: "=",
schemas.SearchEventOperator.ON_ANY: "IN",
schemas.SearchEventOperator.IS_NOT: "!=",
schemas.SearchEventOperator.NOT_ON: "!=",
schemas.SearchEventOperator.CONTAINS: "ILIKE",
schemas.SearchEventOperator.NOT_CONTAINS: "NOT ILIKE",
schemas.SearchEventOperator.STARTS_WITH: "ILIKE",
schemas.SearchEventOperator.ENDS_WITH: "ILIKE",
}.get(op, "=")
def _isAny_opreator(op: schemas.SearchEventOperator):
return op in [schemas.SearchEventOperator.ON_ANY, schemas.SearchEventOperator.IS_ANY]
def _isUndefined_operator(op: schemas.SearchEventOperator):
return op in [schemas.SearchEventOperator.IS_UNDEFINED]
def __is_negation_operator(op: schemas.SearchEventOperator):
return op in [schemas.SearchEventOperator.IS_NOT,
schemas.SearchEventOperator.NOT_ON,
schemas.SearchEventOperator.NOT_CONTAINS]
def _multiple_conditions(condition, values, value_key="value", is_not=False):
query = []
for i in range(len(values)):
k = f"{value_key}_{i}"
query.append(condition.replace(value_key, k))
return "(" + (" AND " if is_not else " OR ").join(query) + ")"
def get(error_id, family=False):
return errors_legacy.get(error_id=error_id, family=family)
def get_batch(error_ids):
return errors_legacy.get_batch(error_ids=error_ids)
def __get_basic_constraints_events(platform=None, time_constraint=True, startTime_arg_name="startDate",
endTime_arg_name="endDate", type_condition=True, project_key="project_id",
table_name=None):
ch_sub_query = [f"{project_key} =toUInt16(%(project_id)s)"]
if table_name is not None:
table_name = table_name + "."
else:
table_name = ""
if type_condition:
ch_sub_query.append(f"{table_name}`$event_name`='ERROR'")
if time_constraint:
ch_sub_query += [f"{table_name}created_at >= toDateTime(%({startTime_arg_name})s/1000)",
f"{table_name}created_at < toDateTime(%({endTime_arg_name})s/1000)"]
# if platform == schemas.PlatformType.MOBILE:
# ch_sub_query.append("user_device_type = 'mobile'")
# elif platform == schemas.PlatformType.DESKTOP:
# ch_sub_query.append("user_device_type = 'desktop'")
return ch_sub_query
def __get_sort_key(key):
return {
schemas.ErrorSort.OCCURRENCE: "max_datetime",
schemas.ErrorSort.USERS_COUNT: "users",
schemas.ErrorSort.SESSIONS_COUNT: "sessions"
}.get(key, 'max_datetime')
def search(data: schemas.SearchErrorsSchema, project: schemas.ProjectContext, user_id):
MAIN_EVENTS_TABLE = exp_ch_helper.get_main_events_table(data.startTimestamp)
MAIN_SESSIONS_TABLE = exp_ch_helper.get_main_sessions_table(data.startTimestamp)
platform = None
for f in data.filters:
if f.type == schemas.FilterType.PLATFORM and len(f.value) > 0:
platform = f.value[0]
ch_sessions_sub_query = errors_helper.__get_basic_constraints_ch(platform, type_condition=False)
# ignore platform for errors table
ch_sub_query = __get_basic_constraints_events(None, type_condition=True)
ch_sub_query.append("JSONExtractString(toString(`$properties`), 'source') = 'js_exception'")
# To ignore Script error
ch_sub_query.append("JSONExtractString(toString(`$properties`), 'message') != 'Script error.'")
error_ids = None
if data.startTimestamp is None:
data.startTimestamp = TimeUTC.now(-7)
if data.endTimestamp is None:
data.endTimestamp = TimeUTC.now(1)
subquery_part = ""
params = {}
if len(data.events) > 0:
errors_condition_count = 0
for i, e in enumerate(data.events):
if e.type == schemas.EventType.ERROR:
errors_condition_count += 1
is_any = _isAny_opreator(e.operator)
op = __get_sql_operator(e.operator)
e_k = f"e_value{i}"
params = {**params, **_multiple_values(e.value, value_key=e_k)}
if not is_any and len(e.value) > 0 and e.value[1] not in [None, "*", ""]:
ch_sub_query.append(
_multiple_conditions(f"(message {op} %({e_k})s OR name {op} %({e_k})s)",
e.value, value_key=e_k))
if len(data.events) > errors_condition_count:
subquery_part_args, subquery_part = sessions.search_query_parts_ch(data=data, error_status=data.status,
errors_only=True,
project_id=project.project_id,
user_id=user_id,
issue=None,
favorite_only=False)
subquery_part = f"INNER JOIN {subquery_part} USING(session_id)"
params = {**params, **subquery_part_args}
if len(data.filters) > 0:
meta_keys = None
# to reduce include a sub-query of sessions inside events query, in order to reduce the selected data
for i, f in enumerate(data.filters):
if not isinstance(f.value, list):
f.value = [f.value]
filter_type = f.type
f.value = helper.values_for_operator(value=f.value, op=f.operator)
f_k = f"f_value{i}"
params = {**params, f_k: f.value, **_multiple_values(f.value, value_key=f_k)}
op = __get_sql_operator(f.operator) \
if filter_type not in [schemas.FilterType.EVENTS_COUNT] else f.operator
is_any = _isAny_opreator(f.operator)
is_undefined = _isUndefined_operator(f.operator)
if not is_any and not is_undefined and len(f.value) == 0:
continue
is_not = False
if __is_negation_operator(f.operator):
is_not = True
if filter_type == schemas.FilterType.USER_BROWSER:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.user_browser)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.user_browser {op} %({f_k})s', f.value, is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.USER_OS, schemas.FilterType.USER_OS_MOBILE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.user_os)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.user_os {op} %({f_k})s', f.value, is_not=is_not, value_key=f_k))
elif filter_type in [schemas.FilterType.USER_DEVICE, schemas.FilterType.USER_DEVICE_MOBILE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.user_device)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.user_device {op} %({f_k})s', f.value, is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.USER_COUNTRY, schemas.FilterType.USER_COUNTRY_MOBILE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.user_country)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.user_country {op} %({f_k})s', f.value, is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.UTM_SOURCE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.utm_source)')
elif is_undefined:
ch_sessions_sub_query.append('isNull(s.utm_source)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.utm_source {op} toString(%({f_k})s)', f.value, is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.UTM_MEDIUM]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.utm_medium)')
elif is_undefined:
ch_sessions_sub_query.append('isNull(s.utm_medium)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.utm_medium {op} toString(%({f_k})s)', f.value, is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.UTM_CAMPAIGN]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.utm_campaign)')
elif is_undefined:
ch_sessions_sub_query.append('isNull(s.utm_campaign)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f's.utm_campaign {op} toString(%({f_k})s)', f.value, is_not=is_not,
value_key=f_k))
elif filter_type == schemas.FilterType.DURATION:
if len(f.value) > 0 and f.value[0] is not None:
ch_sessions_sub_query.append("s.duration >= %(minDuration)s")
params["minDuration"] = f.value[0]
if len(f.value) > 1 and f.value[1] is not None and int(f.value[1]) > 0:
ch_sessions_sub_query.append("s.duration <= %(maxDuration)s")
params["maxDuration"] = f.value[1]
elif filter_type == schemas.FilterType.REFERRER:
# extra_from += f"INNER JOIN {events.EventType.LOCATION.table} AS p USING(session_id)"
if is_any:
referrer_constraint = 'isNotNull(s.base_referrer)'
else:
referrer_constraint = _multiple_conditions(f"s.base_referrer {op} %({f_k})s", f.value,
is_not=is_not, value_key=f_k)
elif filter_type == schemas.FilterType.METADATA:
# get metadata list only if you need it
if meta_keys is None:
meta_keys = metadata.get(project_id=project.project_id)
meta_keys = {m["key"]: m["index"] for m in meta_keys}
if f.source in meta_keys.keys():
if is_any:
ch_sessions_sub_query.append(f"isNotNull(s.{metadata.index_to_colname(meta_keys[f.source])})")
elif is_undefined:
ch_sessions_sub_query.append(f"isNull(s.{metadata.index_to_colname(meta_keys[f.source])})")
else:
ch_sessions_sub_query.append(
_multiple_conditions(
f"s.{metadata.index_to_colname(meta_keys[f.source])} {op} toString(%({f_k})s)",
f.value, is_not=is_not, value_key=f_k))
elif filter_type in [schemas.FilterType.USER_ID, schemas.FilterType.USER_ID_MOBILE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.user_id)')
elif is_undefined:
ch_sessions_sub_query.append('isNull(s.user_id)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f"s.user_id {op} toString(%({f_k})s)", f.value, is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.USER_ANONYMOUS_ID,
schemas.FilterType.USER_ANONYMOUS_ID_MOBILE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.user_anonymous_id)')
elif is_undefined:
ch_sessions_sub_query.append('isNull(s.user_anonymous_id)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f"s.user_anonymous_id {op} toString(%({f_k})s)", f.value,
is_not=is_not,
value_key=f_k))
elif filter_type in [schemas.FilterType.REV_ID, schemas.FilterType.REV_ID_MOBILE]:
if is_any:
ch_sessions_sub_query.append('isNotNull(s.rev_id)')
elif is_undefined:
ch_sessions_sub_query.append('isNull(s.rev_id)')
else:
ch_sessions_sub_query.append(
_multiple_conditions(f"s.rev_id {op} toString(%({f_k})s)", f.value, is_not=is_not,
value_key=f_k))
elif filter_type == schemas.FilterType.PLATFORM:
# op = __get_sql_operator(f.operator)
ch_sessions_sub_query.append(
_multiple_conditions(f"s.user_device_type {op} %({f_k})s", f.value, is_not=is_not,
value_key=f_k))
# elif filter_type == schemas.FilterType.issue:
# if is_any:
# ch_sessions_sub_query.append("notEmpty(s.issue_types)")
# else:
# ch_sessions_sub_query.append(f"hasAny(s.issue_types,%({f_k})s)")
# # _multiple_conditions(f"%({f_k})s {op} ANY (s.issue_types)", f.value, is_not=is_not,
# # value_key=f_k))
#
# if is_not:
# extra_constraints[-1] = f"not({extra_constraints[-1]})"
# ss_constraints[-1] = f"not({ss_constraints[-1]})"
elif filter_type == schemas.FilterType.EVENTS_COUNT:
ch_sessions_sub_query.append(
_multiple_conditions(f"s.events_count {op} %({f_k})s", f.value, is_not=is_not,
value_key=f_k))
with ch_client.ClickHouseClient() as ch:
step_size = metrics_helper.get_step_size(data.startTimestamp, data.endTimestamp, data.density)
sort = __get_sort_key('datetime')
if data.sort is not None:
sort = __get_sort_key(data.sort)
order = "DESC"
if data.order is not None:
order = data.order
params = {
**params,
"startDate": data.startTimestamp,
"endDate": data.endTimestamp,
"project_id": project.project_id,
"userId": user_id,
"step_size": step_size}
if data.limit is not None and data.page is not None:
params["errors_offset"] = (data.page - 1) * data.limit
params["errors_limit"] = data.limit
else:
params["errors_offset"] = 0
params["errors_limit"] = 200
# if data.bookmarked:
# cur.execute(cur.mogrify(f"""SELECT error_id
# FROM public.user_favorite_errors
# WHERE user_id = %(userId)s
# {"" if error_ids is None else "AND error_id IN %(error_ids)s"}""",
# {"userId": user_id, "error_ids": tuple(error_ids or [])}))
# error_ids = cur.fetchall()
# if len(error_ids) == 0:
# return empty_response
# error_ids = [e["error_id"] for e in error_ids]
if error_ids is not None:
params["error_ids"] = tuple(error_ids)
ch_sub_query.append("error_id IN %(error_ids)s")
main_ch_query = f"""\
SELECT details.error_id as error_id,
name, message, users, total,
sessions, last_occurrence, first_occurrence, chart
FROM (SELECT error_id,
JSONExtractString(toString(`$properties`), 'name') AS name,
JSONExtractString(toString(`$properties`), 'message') AS message,
COUNT(DISTINCT user_id) AS users,
COUNT(DISTINCT events.session_id) AS sessions,
MAX(created_at) AS max_datetime,
MIN(created_at) AS min_datetime,
COUNT(DISTINCT error_id)
OVER() AS total
FROM {MAIN_EVENTS_TABLE} AS events
INNER JOIN (SELECT session_id, coalesce(user_id,toString(user_uuid)) AS user_id
FROM {MAIN_SESSIONS_TABLE} AS s
{subquery_part}
WHERE {" AND ".join(ch_sessions_sub_query)}) AS sessions
ON (events.session_id = sessions.session_id)
WHERE {" AND ".join(ch_sub_query)}
GROUP BY error_id, name, message
ORDER BY {sort} {order}
LIMIT %(errors_limit)s OFFSET %(errors_offset)s) AS details
INNER JOIN (SELECT error_id,
toUnixTimestamp(MAX(created_at))*1000 AS last_occurrence,
toUnixTimestamp(MIN(created_at))*1000 AS first_occurrence
FROM {MAIN_EVENTS_TABLE}
WHERE project_id=%(project_id)s
AND `$event_name`='ERROR'
GROUP BY error_id) AS time_details
ON details.error_id=time_details.error_id
INNER JOIN (SELECT error_id, groupArray([timestamp, count]) AS chart
FROM (SELECT error_id,
gs.generate_series AS timestamp,
COUNT(DISTINCT session_id) AS count
FROM generate_series(%(startDate)s, %(endDate)s, %(step_size)s) AS gs
LEFT JOIN {MAIN_EVENTS_TABLE} ON(TRUE)
WHERE {" AND ".join(ch_sub_query)}
AND created_at >= toDateTime(timestamp / 1000)
AND created_at < toDateTime((timestamp + %(step_size)s) / 1000)
GROUP BY error_id, timestamp
ORDER BY timestamp) AS sub_table
GROUP BY error_id) AS chart_details ON details.error_id=chart_details.error_id;"""
# print("------------")
# print(ch.format(main_ch_query, params))
# print("------------")
query = ch.format(query=main_ch_query, parameters=params)
rows = ch.execute(query=query)
total = rows[0]["total"] if len(rows) > 0 else 0
for r in rows:
r["chart"] = list(r["chart"])
for i in range(len(r["chart"])):
r["chart"][i] = {"timestamp": r["chart"][i][0], "count": r["chart"][i][1]}
return {
'total': total,
'errors': helper.list_to_camel_case(rows)
}
def get_trace(project_id, error_id):
return errors_legacy.get_trace(project_id=project_id, error_id=error_id)
def get_sessions(start_date, end_date, project_id, user_id, error_id):
return errors_legacy.get_sessions(start_date=start_date,
end_date=end_date,
project_id=project_id,
user_id=user_id,
error_id=error_id)

View file

@ -0,0 +1,248 @@
from chalicelib.core.errors.modules import errors_helper
from chalicelib.utils import pg_client, helper
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.utils.metrics_helper import get_step_size
def __flatten_sort_key_count_version(data, merge_nested=False):
if data is None:
return []
return sorted(
[
{
"name": f'{o["name"]}@{v["version"]}',
"count": v["count"]
} for o in data for v in o["partition"]
],
key=lambda o: o["count"], reverse=True) if merge_nested else \
[
{
"name": o["name"],
"count": o["count"],
} for o in data
]
def __process_tags(row):
return [
{"name": "browser", "partitions": __flatten_sort_key_count_version(data=row.get("browsers_partition"))},
{"name": "browser.ver",
"partitions": __flatten_sort_key_count_version(data=row.pop("browsers_partition"), merge_nested=True)},
{"name": "OS", "partitions": __flatten_sort_key_count_version(data=row.get("os_partition"))},
{"name": "OS.ver",
"partitions": __flatten_sort_key_count_version(data=row.pop("os_partition"), merge_nested=True)},
{"name": "device.family", "partitions": __flatten_sort_key_count_version(data=row.get("device_partition"))},
{"name": "device",
"partitions": __flatten_sort_key_count_version(data=row.pop("device_partition"), merge_nested=True)},
{"name": "country", "partitions": row.pop("country_partition")}
]
def get_details(project_id, error_id, user_id, **data):
pg_sub_query24 = errors_helper.__get_basic_constraints(time_constraint=False, chart=True,
step_size_name="step_size24")
pg_sub_query24.append("error_id = %(error_id)s")
pg_sub_query30_session = errors_helper.__get_basic_constraints(time_constraint=True, chart=False,
startTime_arg_name="startDate30",
endTime_arg_name="endDate30",
project_key="sessions.project_id")
pg_sub_query30_session.append("sessions.start_ts >= %(startDate30)s")
pg_sub_query30_session.append("sessions.start_ts <= %(endDate30)s")
pg_sub_query30_session.append("error_id = %(error_id)s")
pg_sub_query30_err = errors_helper.__get_basic_constraints(time_constraint=True, chart=False,
startTime_arg_name="startDate30",
endTime_arg_name="endDate30",
project_key="errors.project_id")
pg_sub_query30_err.append("sessions.project_id = %(project_id)s")
pg_sub_query30_err.append("sessions.start_ts >= %(startDate30)s")
pg_sub_query30_err.append("sessions.start_ts <= %(endDate30)s")
pg_sub_query30_err.append("error_id = %(error_id)s")
pg_sub_query30_err.append("source ='js_exception'")
pg_sub_query30 = errors_helper.__get_basic_constraints(time_constraint=False, chart=True,
step_size_name="step_size30")
pg_sub_query30.append("error_id = %(error_id)s")
pg_basic_query = errors_helper.__get_basic_constraints(time_constraint=False)
pg_basic_query.append("error_id = %(error_id)s")
with pg_client.PostgresClient() as cur:
data["startDate24"] = TimeUTC.now(-1)
data["endDate24"] = TimeUTC.now()
data["startDate30"] = TimeUTC.now(-30)
data["endDate30"] = TimeUTC.now()
density24 = int(data.get("density24", 24))
step_size24 = get_step_size(data["startDate24"], data["endDate24"], density24, factor=1)
density30 = int(data.get("density30", 30))
step_size30 = get_step_size(data["startDate30"], data["endDate30"], density30, factor=1)
params = {
"startDate24": data['startDate24'],
"endDate24": data['endDate24'],
"startDate30": data['startDate30'],
"endDate30": data['endDate30'],
"project_id": project_id,
"userId": user_id,
"step_size24": step_size24,
"step_size30": step_size30,
"error_id": error_id}
main_pg_query = f"""\
SELECT error_id,
name,
message,
users,
sessions,
last_occurrence,
first_occurrence,
last_session_id,
browsers_partition,
os_partition,
device_partition,
country_partition,
chart24,
chart30
FROM (SELECT error_id,
name,
message,
COUNT(DISTINCT user_id) AS users,
COUNT(DISTINCT session_id) AS sessions
FROM public.errors
INNER JOIN events.errors AS s_errors USING (error_id)
INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_err)}
GROUP BY error_id, name, message) AS details
INNER JOIN (SELECT MAX(timestamp) AS last_occurrence,
MIN(timestamp) AS first_occurrence
FROM events.errors
WHERE error_id = %(error_id)s) AS time_details ON (TRUE)
INNER JOIN (SELECT session_id AS last_session_id
FROM events.errors
WHERE error_id = %(error_id)s
ORDER BY errors.timestamp DESC
LIMIT 1) AS last_session_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(browser_details) AS browsers_partition
FROM (SELECT *
FROM (SELECT user_browser AS name,
COUNT(session_id) AS count
FROM events.errors
INNER JOIN sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_browser
ORDER BY count DESC) AS count_per_browser_query
INNER JOIN LATERAL (SELECT JSONB_AGG(version_details) AS partition
FROM (SELECT user_browser_version AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
AND sessions.user_browser = count_per_browser_query.name
GROUP BY user_browser_version
ORDER BY count DESC) AS version_details
) AS browser_version_details ON (TRUE)) AS browser_details) AS browser_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(os_details) AS os_partition
FROM (SELECT *
FROM (SELECT user_os AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_os
ORDER BY count DESC) AS count_per_os_details
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_version_details) AS partition
FROM (SELECT COALESCE(user_os_version,'unknown') AS version, COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
AND sessions.user_os = count_per_os_details.name
GROUP BY user_os_version
ORDER BY count DESC) AS count_per_version_details
GROUP BY count_per_os_details.name ) AS os_version_details
ON (TRUE)) AS os_details) AS os_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(device_details) AS device_partition
FROM (SELECT *
FROM (SELECT user_device_type AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_device_type
ORDER BY count DESC) AS count_per_device_details
INNER JOIN LATERAL (SELECT jsonb_agg(count_per_device_v_details) AS partition
FROM (SELECT CASE
WHEN user_device = '' OR user_device ISNULL
THEN 'unknown'
ELSE user_device END AS version,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
AND sessions.user_device_type = count_per_device_details.name
GROUP BY user_device
ORDER BY count DESC) AS count_per_device_v_details
GROUP BY count_per_device_details.name ) AS device_version_details
ON (TRUE)) AS device_details) AS device_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(count_per_country_details) AS country_partition
FROM (SELECT user_country AS name,
COUNT(session_id) AS count
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30_session)}
GROUP BY user_country
ORDER BY count DESC) AS count_per_country_details) AS country_details ON (TRUE)
INNER JOIN (SELECT jsonb_agg(chart_details) AS chart24
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate24)s, %(endDate24)s, %(step_size24)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors
INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query24)}
) AS chart_details ON (TRUE)
GROUP BY generated_timestamp
ORDER BY generated_timestamp) AS chart_details) AS chart_details24 ON (TRUE)
INNER JOIN (SELECT jsonb_agg(chart_details) AS chart30
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate30)s, %(endDate30)s, %(step_size30)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors INNER JOIN public.sessions USING (session_id)
WHERE {" AND ".join(pg_sub_query30)}) AS chart_details
ON (TRUE)
GROUP BY timestamp
ORDER BY timestamp) AS chart_details) AS chart_details30 ON (TRUE);
"""
# print("--------------------")
# print(cur.mogrify(main_pg_query, params))
# print("--------------------")
cur.execute(cur.mogrify(main_pg_query, params))
row = cur.fetchone()
if row is None:
return {"errors": ["error not found"]}
row["tags"] = __process_tags(row)
query = cur.mogrify(
f"""SELECT error_id, status, session_id, start_ts,
parent_error_id,session_id, user_anonymous_id,
user_id, user_uuid, user_browser, user_browser_version,
user_os, user_os_version, user_device, payload,
FALSE AS favorite,
True AS viewed
FROM public.errors AS pe
INNER JOIN events.errors AS ee USING (error_id)
INNER JOIN public.sessions USING (session_id)
WHERE pe.project_id = %(project_id)s
AND error_id = %(error_id)s
ORDER BY start_ts DESC
LIMIT 1;""",
{"project_id": project_id, "error_id": error_id, "user_id": user_id})
cur.execute(query=query)
status = cur.fetchone()
if status is not None:
row["stack"] = errors_helper.format_first_stack_frame(status).pop("stack")
row["status"] = status.pop("status")
row["parent_error_id"] = status.pop("parent_error_id")
row["favorite"] = status.pop("favorite")
row["viewed"] = status.pop("viewed")
row["last_hydrated_session"] = status
else:
row["stack"] = []
row["last_hydrated_session"] = None
row["status"] = "untracked"
row["parent_error_id"] = None
row["favorite"] = False
row["viewed"] = False
return {"data": helper.dict_to_camel_case(row)}

View file

@ -0,0 +1,294 @@
import json
from typing import List
import schemas
from chalicelib.core.errors.modules import errors_helper
from chalicelib.core.sessions import sessions_search
from chalicelib.core.sourcemaps import sourcemaps
from chalicelib.utils import pg_client, helper
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.utils.metrics_helper import get_step_size
def get(error_id, family=False) -> dict | List[dict]:
if family:
return get_batch([error_id])
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""SELECT *
FROM public.errors
WHERE error_id = %(error_id)s
LIMIT 1;""",
{"error_id": error_id})
cur.execute(query=query)
result = cur.fetchone()
if result is not None:
result["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(result["stacktrace_parsed_at"])
return helper.dict_to_camel_case(result)
def get_batch(error_ids):
if len(error_ids) == 0:
return []
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""
WITH RECURSIVE error_family AS (
SELECT *
FROM public.errors
WHERE error_id IN %(error_ids)s
UNION
SELECT child_errors.*
FROM public.errors AS child_errors
INNER JOIN error_family ON error_family.error_id = child_errors.parent_error_id OR error_family.parent_error_id = child_errors.error_id
)
SELECT *
FROM error_family;""",
{"error_ids": tuple(error_ids)})
cur.execute(query=query)
errors = cur.fetchall()
for e in errors:
e["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(e["stacktrace_parsed_at"])
return helper.list_to_camel_case(errors)
def __get_sort_key(key):
return {
schemas.ErrorSort.OCCURRENCE: "max_datetime",
schemas.ErrorSort.USERS_COUNT: "users",
schemas.ErrorSort.SESSIONS_COUNT: "sessions"
}.get(key, 'max_datetime')
def search(data: schemas.SearchErrorsSchema, project: schemas.ProjectContext, user_id):
empty_response = {
'total': 0,
'errors': []
}
platform = None
for f in data.filters:
if f.type == schemas.FilterType.PLATFORM and len(f.value) > 0:
platform = f.value[0]
pg_sub_query = errors_helper.__get_basic_constraints(platform, project_key="sessions.project_id")
pg_sub_query += ["sessions.start_ts>=%(startDate)s", "sessions.start_ts<%(endDate)s", "source ='js_exception'",
"pe.project_id=%(project_id)s"]
# To ignore Script error
pg_sub_query.append("pe.message!='Script error.'")
pg_sub_query_chart = errors_helper.__get_basic_constraints(platform, time_constraint=False, chart=True,
project_key=None)
if platform:
pg_sub_query_chart += ["start_ts>=%(startDate)s", "start_ts<%(endDate)s", "project_id=%(project_id)s"]
pg_sub_query_chart.append("errors.error_id =details.error_id")
statuses = []
error_ids = None
if data.startTimestamp is None:
data.startTimestamp = TimeUTC.now(-30)
if data.endTimestamp is None:
data.endTimestamp = TimeUTC.now(1)
if len(data.events) > 0 or len(data.filters) > 0:
print("-- searching for sessions before errors")
statuses = sessions_search.search_sessions(data=data, project=project, user_id=user_id, errors_only=True,
error_status=data.status)
if len(statuses) == 0:
return empty_response
error_ids = [e["errorId"] for e in statuses]
with pg_client.PostgresClient() as cur:
step_size = get_step_size(data.startTimestamp, data.endTimestamp, data.density, factor=1)
sort = __get_sort_key('datetime')
if data.sort is not None:
sort = __get_sort_key(data.sort)
order = schemas.SortOrderType.DESC
if data.order is not None:
order = data.order
extra_join = ""
params = {
"startDate": data.startTimestamp,
"endDate": data.endTimestamp,
"project_id": project.project_id,
"userId": user_id,
"step_size": step_size}
if data.status != schemas.ErrorStatus.ALL:
pg_sub_query.append("status = %(error_status)s")
params["error_status"] = data.status
if data.limit is not None and data.page is not None:
params["errors_offset"] = (data.page - 1) * data.limit
params["errors_limit"] = data.limit
else:
params["errors_offset"] = 0
params["errors_limit"] = 200
if error_ids is not None:
params["error_ids"] = tuple(error_ids)
pg_sub_query.append("error_id IN %(error_ids)s")
# if data.bookmarked:
# pg_sub_query.append("ufe.user_id = %(userId)s")
# extra_join += " INNER JOIN public.user_favorite_errors AS ufe USING (error_id)"
if data.query is not None and len(data.query) > 0:
pg_sub_query.append("(pe.name ILIKE %(error_query)s OR pe.message ILIKE %(error_query)s)")
params["error_query"] = helper.values_for_operator(value=data.query,
op=schemas.SearchEventOperator.CONTAINS)
main_pg_query = f"""SELECT full_count,
error_id,
name,
message,
users,
sessions,
last_occurrence,
first_occurrence,
chart
FROM (SELECT COUNT(details) OVER () AS full_count, details.*
FROM (SELECT error_id,
name,
message,
COUNT(DISTINCT COALESCE(user_id,user_uuid::text)) AS users,
COUNT(DISTINCT session_id) AS sessions,
MAX(timestamp) AS max_datetime,
MIN(timestamp) AS min_datetime
FROM events.errors
INNER JOIN public.errors AS pe USING (error_id)
INNER JOIN public.sessions USING (session_id)
{extra_join}
WHERE {" AND ".join(pg_sub_query)}
GROUP BY error_id, name, message
ORDER BY {sort} {order}) AS details
LIMIT %(errors_limit)s OFFSET %(errors_offset)s
) AS details
INNER JOIN LATERAL (SELECT MAX(timestamp) AS last_occurrence,
MIN(timestamp) AS first_occurrence
FROM events.errors
WHERE errors.error_id = details.error_id) AS time_details ON (TRUE)
INNER JOIN LATERAL (SELECT jsonb_agg(chart_details) AS chart
FROM (SELECT generated_timestamp AS timestamp,
COUNT(session_id) AS count
FROM generate_series(%(startDate)s, %(endDate)s, %(step_size)s) AS generated_timestamp
LEFT JOIN LATERAL (SELECT DISTINCT session_id
FROM events.errors
{"INNER JOIN public.sessions USING(session_id)" if platform else ""}
WHERE {" AND ".join(pg_sub_query_chart)}
) AS sessions ON (TRUE)
GROUP BY timestamp
ORDER BY timestamp) AS chart_details) AS chart_details ON (TRUE);"""
# print("--------------------")
# print(cur.mogrify(main_pg_query, params))
# print("--------------------")
cur.execute(cur.mogrify(main_pg_query, params))
rows = cur.fetchall()
total = 0 if len(rows) == 0 else rows[0]["full_count"]
if total == 0:
rows = []
else:
if len(statuses) == 0:
query = cur.mogrify(
"""SELECT error_id
FROM public.errors
WHERE project_id = %(project_id)s AND error_id IN %(error_ids)s;""",
{"project_id": project.project_id, "error_ids": tuple([r["error_id"] for r in rows]),
"user_id": user_id})
cur.execute(query=query)
statuses = helper.list_to_camel_case(cur.fetchall())
statuses = {
s["errorId"]: s for s in statuses
}
for r in rows:
r.pop("full_count")
return {
'total': total,
'errors': helper.list_to_camel_case(rows)
}
def __save_stacktrace(error_id, data):
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""UPDATE public.errors
SET stacktrace=%(data)s::jsonb, stacktrace_parsed_at=timezone('utc'::text, now())
WHERE error_id = %(error_id)s;""",
{"error_id": error_id, "data": json.dumps(data)})
cur.execute(query=query)
def get_trace(project_id, error_id):
error = get(error_id=error_id, family=False)
if error is None:
return {"errors": ["error not found"]}
if error.get("source", "") != "js_exception":
return {"errors": ["this source of errors doesn't have a sourcemap"]}
if error.get("payload") is None:
return {"errors": ["null payload"]}
if error.get("stacktrace") is not None:
return {"sourcemapUploaded": True,
"trace": error.get("stacktrace"),
"preparsed": True}
trace, all_exists = sourcemaps.get_traces_group(project_id=project_id, payload=error["payload"])
if all_exists:
__save_stacktrace(error_id=error_id, data=trace)
return {"sourcemapUploaded": all_exists,
"trace": trace,
"preparsed": False}
def get_sessions(start_date, end_date, project_id, user_id, error_id):
extra_constraints = ["s.project_id = %(project_id)s",
"s.start_ts >= %(startDate)s",
"s.start_ts <= %(endDate)s",
"e.error_id = %(error_id)s"]
if start_date is None:
start_date = TimeUTC.now(-7)
if end_date is None:
end_date = TimeUTC.now()
params = {
"startDate": start_date,
"endDate": end_date,
"project_id": project_id,
"userId": user_id,
"error_id": error_id}
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
f"""SELECT s.project_id,
s.session_id::text AS session_id,
s.user_uuid,
s.user_id,
s.user_agent,
s.user_os,
s.user_browser,
s.user_device,
s.user_country,
s.start_ts,
s.duration,
s.events_count,
s.pages_count,
s.errors_count,
s.issue_types,
COALESCE((SELECT TRUE
FROM public.user_favorite_sessions AS fs
WHERE s.session_id = fs.session_id
AND fs.user_id = %(userId)s LIMIT 1), FALSE) AS favorite,
COALESCE((SELECT TRUE
FROM public.user_viewed_sessions AS fs
WHERE s.session_id = fs.session_id
AND fs.user_id = %(userId)s LIMIT 1), FALSE) AS viewed
FROM public.sessions AS s INNER JOIN events.errors AS e USING (session_id)
WHERE {" AND ".join(extra_constraints)}
ORDER BY s.start_ts DESC;""",
params)
cur.execute(query=query)
sessions_list = []
total = cur.rowcount
row = cur.fetchone()
while row is not None and len(sessions_list) < 100:
sessions_list.append(row)
row = cur.fetchone()
return {
'total': total,
'sessions': helper.list_to_camel_case(sessions_list)
}

View file

@ -0,0 +1,11 @@
import logging
from decouple import config
logger = logging.getLogger(__name__)
from . import helper as errors_helper
if config("EXP_ERRORS_SEARCH", cast=bool, default=False):
import chalicelib.core.sessions.sessions_ch as sessions
else:
import chalicelib.core.sessions.sessions_pg as sessions

View file

@ -0,0 +1,58 @@
from typing import Optional
import schemas
from chalicelib.core.sourcemaps import sourcemaps
def __get_basic_constraints(platform: Optional[schemas.PlatformType] = None, time_constraint: bool = True,
startTime_arg_name: str = "startDate", endTime_arg_name: str = "endDate",
chart: bool = False, step_size_name: str = "step_size",
project_key: Optional[str] = "project_id"):
if project_key is None:
ch_sub_query = []
else:
ch_sub_query = [f"{project_key} =%(project_id)s"]
if time_constraint:
ch_sub_query += [f"timestamp >= %({startTime_arg_name})s",
f"timestamp < %({endTime_arg_name})s"]
if chart:
ch_sub_query += [f"timestamp >= generated_timestamp",
f"timestamp < generated_timestamp + %({step_size_name})s"]
if platform == schemas.PlatformType.MOBILE:
ch_sub_query.append("user_device_type = 'mobile'")
elif platform == schemas.PlatformType.DESKTOP:
ch_sub_query.append("user_device_type = 'desktop'")
return ch_sub_query
def __get_basic_constraints_ch(platform=None, time_constraint=True, startTime_arg_name="startDate",
endTime_arg_name="endDate", type_condition=True, project_key="project_id",
table_name=None):
ch_sub_query = [f"{project_key} =toUInt16(%(project_id)s)"]
if table_name is not None:
table_name = table_name + "."
else:
table_name = ""
if type_condition:
ch_sub_query.append(f"{table_name}`$event_name`='ERROR'")
if time_constraint:
ch_sub_query += [f"{table_name}datetime >= toDateTime(%({startTime_arg_name})s/1000)",
f"{table_name}datetime < toDateTime(%({endTime_arg_name})s/1000)"]
if platform == schemas.PlatformType.MOBILE:
ch_sub_query.append("user_device_type = 'mobile'")
elif platform == schemas.PlatformType.DESKTOP:
ch_sub_query.append("user_device_type = 'desktop'")
return ch_sub_query
def format_first_stack_frame(error):
error["stack"] = sourcemaps.format_payload(error.pop("payload"), truncate_to_first=True)
for s in error["stack"]:
for c in s.get("context", []):
for sci, sc in enumerate(c):
if isinstance(sc, str) and len(sc) > 1000:
c[sci] = sc[:1000]
# convert bytes to string:
if isinstance(s["filename"], bytes):
s["filename"] = s["filename"].decode("utf-8")
return error

View file

@ -1,48 +0,0 @@
from chalicelib.utils import pg_client
def add_favorite_error(project_id, user_id, error_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""INSERT INTO public.user_favorite_errors(user_id, error_id)
VALUES (%(userId)s,%(error_id)s);""",
{"userId": user_id, "error_id": error_id})
)
return {"errorId": error_id, "favorite": True}
def remove_favorite_error(project_id, user_id, error_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""DELETE FROM public.user_favorite_errors
WHERE
user_id = %(userId)s
AND error_id = %(error_id)s;""",
{"userId": user_id, "error_id": error_id})
)
return {"errorId": error_id, "favorite": False}
def favorite_error(project_id, user_id, error_id):
exists, favorite = error_exists_and_favorite(user_id=user_id, error_id=error_id)
if not exists:
return {"errors": ["cannot bookmark non-rehydrated errors"]}
if favorite:
return remove_favorite_error(project_id=project_id, user_id=user_id, error_id=error_id)
return add_favorite_error(project_id=project_id, user_id=user_id, error_id=error_id)
def error_exists_and_favorite(user_id, error_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(
"""SELECT errors.error_id AS exists, ufe.error_id AS favorite
FROM public.errors
LEFT JOIN (SELECT error_id FROM public.user_favorite_errors WHERE user_id = %(userId)s) AS ufe USING (error_id)
WHERE error_id = %(error_id)s;""",
{"userId": user_id, "error_id": error_id})
)
r = cur.fetchone()
if r is None:
return False, False
return True, r.get("favorite") is not None

View file

@ -1,37 +0,0 @@
from chalicelib.utils import pg_client
def add_viewed_error(project_id, user_id, error_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""INSERT INTO public.user_viewed_errors(user_id, error_id)
VALUES (%(userId)s,%(error_id)s);""",
{"userId": user_id, "error_id": error_id})
)
def viewed_error_exists(user_id, error_id):
with pg_client.PostgresClient() as cur:
query = cur.mogrify(
"""SELECT
errors.error_id AS hydrated,
COALESCE((SELECT TRUE
FROM public.user_viewed_errors AS ve
WHERE ve.error_id = %(error_id)s
AND ve.user_id = %(userId)s LIMIT 1), FALSE) AS viewed
FROM public.errors
WHERE error_id = %(error_id)s""",
{"userId": user_id, "error_id": error_id})
cur.execute(
query=query
)
r = cur.fetchone()
if r:
return r.get("viewed")
return True
def viewed_error(project_id, user_id, error_id):
if viewed_error_exists(user_id=user_id, error_id=error_id):
return None
return add_viewed_error(project_id=project_id, user_id=user_id, error_id=error_id)

View file

@ -1,9 +1,10 @@
from functools import cache
from typing import Optional
import schemas
from chalicelib.core import autocomplete
from chalicelib.core import issues
from chalicelib.core import sessions_metas
from chalicelib.core.autocomplete import autocomplete
from chalicelib.core.sessions import sessions_metas
from chalicelib.utils import pg_client, helper
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.utils.event_filter_definition import SupportedFilter, Event
@ -55,7 +56,7 @@ def __get_grouped_clickrage(rows, session_id, project_id):
def get_by_session_id(session_id, project_id, group_clickrage=False, event_type: Optional[schemas.EventType] = None):
with pg_client.PostgresClient() as cur:
rows = []
if event_type is None or event_type == schemas.EventType.click:
if event_type is None or event_type == schemas.EventType.CLICK:
cur.execute(cur.mogrify("""\
SELECT
c.*,
@ -69,7 +70,7 @@ def get_by_session_id(session_id, project_id, group_clickrage=False, event_type:
rows += cur.fetchall()
if group_clickrage:
rows = __get_grouped_clickrage(rows=rows, session_id=session_id, project_id=project_id)
if event_type is None or event_type == schemas.EventType.input:
if event_type is None or event_type == schemas.EventType.INPUT:
cur.execute(cur.mogrify("""
SELECT
i.*,
@ -81,7 +82,7 @@ def get_by_session_id(session_id, project_id, group_clickrage=False, event_type:
{"project_id": project_id, "session_id": session_id})
)
rows += cur.fetchall()
if event_type is None or event_type == schemas.EventType.location:
if event_type is None or event_type == schemas.EventType.LOCATION:
cur.execute(cur.mogrify("""\
SELECT
l.*,
@ -102,7 +103,7 @@ def _search_tags(project_id, value, key=None, source=None):
with pg_client.PostgresClient() as cur:
query = f"""
SELECT public.tags.name
'{events.EventType.TAG.ui_type}' AS type
'TAG' AS type
FROM public.tags
WHERE public.tags.project_id = %(project_id)s
ORDER BY SIMILARITY(public.tags.name, %(value)s) DESC
@ -115,71 +116,79 @@ def _search_tags(project_id, value, key=None, source=None):
class EventType:
CLICK = Event(ui_type=schemas.EventType.click, table="events.clicks", column="label")
INPUT = Event(ui_type=schemas.EventType.input, table="events.inputs", column="label")
LOCATION = Event(ui_type=schemas.EventType.location, table="events.pages", column="path")
CUSTOM = Event(ui_type=schemas.EventType.custom, table="events_common.customs", column="name")
REQUEST = Event(ui_type=schemas.EventType.request, table="events_common.requests", column="path")
GRAPHQL = Event(ui_type=schemas.EventType.graphql, table="events.graphql", column="name")
STATEACTION = Event(ui_type=schemas.EventType.state_action, table="events.state_actions", column="name")
TAG = Event(ui_type=schemas.EventType.tag, table="events.tags", column="tag_id")
ERROR = Event(ui_type=schemas.EventType.error, table="events.errors",
CLICK = Event(ui_type=schemas.EventType.CLICK, table="events.clicks", column="label")
INPUT = Event(ui_type=schemas.EventType.INPUT, table="events.inputs", column="label")
LOCATION = Event(ui_type=schemas.EventType.LOCATION, table="events.pages", column="path")
CUSTOM = Event(ui_type=schemas.EventType.CUSTOM, table="events_common.customs", column="name")
REQUEST = Event(ui_type=schemas.EventType.REQUEST, table="events_common.requests", column="path")
GRAPHQL = Event(ui_type=schemas.EventType.GRAPHQL, table="events.graphql", column="name")
STATEACTION = Event(ui_type=schemas.EventType.STATE_ACTION, table="events.state_actions", column="name")
TAG = Event(ui_type=schemas.EventType.TAG, table="events.tags", column="tag_id")
ERROR = Event(ui_type=schemas.EventType.ERROR, table="events.errors",
column=None) # column=None because errors are searched by name or message
METADATA = Event(ui_type=schemas.FilterType.metadata, table="public.sessions", column=None)
# IOS
CLICK_IOS = Event(ui_type=schemas.EventType.click_ios, table="events_ios.taps", column="label")
INPUT_IOS = Event(ui_type=schemas.EventType.input_ios, table="events_ios.inputs", column="label")
VIEW_IOS = Event(ui_type=schemas.EventType.view_ios, table="events_ios.views", column="name")
SWIPE_IOS = Event(ui_type=schemas.EventType.swipe_ios, table="events_ios.swipes", column="label")
CUSTOM_IOS = Event(ui_type=schemas.EventType.custom_ios, table="events_common.customs", column="name")
REQUEST_IOS = Event(ui_type=schemas.EventType.request_ios, table="events_common.requests", column="path")
CRASH_IOS = Event(ui_type=schemas.EventType.error_ios, table="events_common.crashes",
column=None) # column=None because errors are searched by name or message
METADATA = Event(ui_type=schemas.FilterType.METADATA, table="public.sessions", column=None)
# MOBILE
CLICK_MOBILE = Event(ui_type=schemas.EventType.CLICK_MOBILE, table="events_ios.taps", column="label")
INPUT_MOBILE = Event(ui_type=schemas.EventType.INPUT_MOBILE, table="events_ios.inputs", column="label")
VIEW_MOBILE = Event(ui_type=schemas.EventType.VIEW_MOBILE, table="events_ios.views", column="name")
SWIPE_MOBILE = Event(ui_type=schemas.EventType.SWIPE_MOBILE, table="events_ios.swipes", column="label")
CUSTOM_MOBILE = Event(ui_type=schemas.EventType.CUSTOM_MOBILE, table="events_common.customs", column="name")
REQUEST_MOBILE = Event(ui_type=schemas.EventType.REQUEST_MOBILE, table="events_common.requests", column="path")
CRASH_MOBILE = Event(ui_type=schemas.EventType.ERROR_MOBILE, table="events_common.crashes",
column=None) # column=None because errors are searched by name or message
SUPPORTED_TYPES = {
EventType.CLICK.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CLICK),
query=autocomplete.__generic_query(typename=EventType.CLICK.ui_type)),
EventType.INPUT.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.INPUT),
query=autocomplete.__generic_query(typename=EventType.INPUT.ui_type)),
EventType.LOCATION.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.LOCATION),
query=autocomplete.__generic_query(
typename=EventType.LOCATION.ui_type)),
EventType.CUSTOM.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CUSTOM),
query=autocomplete.__generic_query(typename=EventType.CUSTOM.ui_type)),
EventType.REQUEST.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.REQUEST),
query=autocomplete.__generic_query(
typename=EventType.REQUEST.ui_type)),
EventType.GRAPHQL.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.GRAPHQL),
query=autocomplete.__generic_query(
typename=EventType.GRAPHQL.ui_type)),
EventType.STATEACTION.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.STATEACTION),
query=autocomplete.__generic_query(
typename=EventType.STATEACTION.ui_type)),
EventType.TAG.ui_type: SupportedFilter(get=_search_tags, query=None),
EventType.ERROR.ui_type: SupportedFilter(get=autocomplete.__search_errors,
query=None),
EventType.METADATA.ui_type: SupportedFilter(get=autocomplete.__search_metadata,
query=None),
# IOS
EventType.CLICK_IOS.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CLICK_IOS),
query=autocomplete.__generic_query(
typename=EventType.CLICK_IOS.ui_type)),
EventType.INPUT_IOS.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.INPUT_IOS),
query=autocomplete.__generic_query(
typename=EventType.INPUT_IOS.ui_type)),
EventType.VIEW_IOS.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.VIEW_IOS),
query=autocomplete.__generic_query(
typename=EventType.VIEW_IOS.ui_type)),
EventType.CUSTOM_IOS.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CUSTOM_IOS),
@cache
def supported_types():
return {
EventType.CLICK.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CLICK),
query=autocomplete.__generic_query(typename=EventType.CLICK.ui_type)),
EventType.INPUT.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.INPUT),
query=autocomplete.__generic_query(typename=EventType.INPUT.ui_type)),
EventType.LOCATION.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.LOCATION),
query=autocomplete.__generic_query(
typename=EventType.LOCATION.ui_type)),
EventType.CUSTOM.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CUSTOM),
query=autocomplete.__generic_query(
typename=EventType.CUSTOM_IOS.ui_type)),
EventType.REQUEST_IOS.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.REQUEST_IOS),
typename=EventType.CUSTOM.ui_type)),
EventType.REQUEST.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.REQUEST),
query=autocomplete.__generic_query(
typename=EventType.REQUEST_IOS.ui_type)),
EventType.CRASH_IOS.ui_type: SupportedFilter(get=autocomplete.__search_errors_ios,
typename=EventType.REQUEST.ui_type)),
EventType.GRAPHQL.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.GRAPHQL),
query=autocomplete.__generic_query(
typename=EventType.GRAPHQL.ui_type)),
EventType.STATEACTION.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.STATEACTION),
query=autocomplete.__generic_query(
typename=EventType.STATEACTION.ui_type)),
EventType.TAG.ui_type: SupportedFilter(get=_search_tags, query=None),
EventType.ERROR.ui_type: SupportedFilter(get=autocomplete.__search_errors,
query=None),
}
EventType.METADATA.ui_type: SupportedFilter(get=autocomplete.__search_metadata,
query=None),
# MOBILE
EventType.CLICK_MOBILE.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.CLICK_MOBILE),
query=autocomplete.__generic_query(
typename=EventType.CLICK_MOBILE.ui_type)),
EventType.SWIPE_MOBILE.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.SWIPE_MOBILE),
query=autocomplete.__generic_query(
typename=EventType.SWIPE_MOBILE.ui_type)),
EventType.INPUT_MOBILE.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.INPUT_MOBILE),
query=autocomplete.__generic_query(
typename=EventType.INPUT_MOBILE.ui_type)),
EventType.VIEW_MOBILE.ui_type: SupportedFilter(get=autocomplete.__generic_autocomplete(EventType.VIEW_MOBILE),
query=autocomplete.__generic_query(
typename=EventType.VIEW_MOBILE.ui_type)),
EventType.CUSTOM_MOBILE.ui_type: SupportedFilter(
get=autocomplete.__generic_autocomplete(EventType.CUSTOM_MOBILE),
query=autocomplete.__generic_query(
typename=EventType.CUSTOM_MOBILE.ui_type)),
EventType.REQUEST_MOBILE.ui_type: SupportedFilter(
get=autocomplete.__generic_autocomplete(EventType.REQUEST_MOBILE),
query=autocomplete.__generic_query(
typename=EventType.REQUEST_MOBILE.ui_type)),
EventType.CRASH_MOBILE.ui_type: SupportedFilter(get=autocomplete.__search_errors_mobile,
query=None),
}
def get_errors_by_session_id(session_id, project_id):
@ -199,17 +208,17 @@ def search(text, event_type, project_id, source, key):
if not event_type:
return {"data": autocomplete.__get_autocomplete_table(text, project_id)}
if event_type in SUPPORTED_TYPES.keys():
rows = SUPPORTED_TYPES[event_type].get(project_id=project_id, value=text, key=key, source=source)
# for IOS events autocomplete
# if event_type + "_IOS" in SUPPORTED_TYPES.keys():
# rows += SUPPORTED_TYPES[event_type + "_IOS"].get(project_id=project_id, value=text, key=key,source=source)
elif event_type + "_IOS" in SUPPORTED_TYPES.keys():
rows = SUPPORTED_TYPES[event_type + "_IOS"].get(project_id=project_id, value=text, key=key, source=source)
elif event_type in sessions_metas.SUPPORTED_TYPES.keys():
if event_type in supported_types().keys():
rows = supported_types()[event_type].get(project_id=project_id, value=text, key=key, source=source)
elif event_type + "_MOBILE" in supported_types().keys():
rows = supported_types()[event_type + "_MOBILE"].get(project_id=project_id, value=text, key=key, source=source)
elif event_type in sessions_metas.supported_types().keys():
return sessions_metas.search(text, event_type, project_id)
elif event_type.endswith("_IOS") \
and event_type[:-len("_IOS")] in sessions_metas.SUPPORTED_TYPES.keys():
and event_type[:-len("_IOS")] in sessions_metas.supported_types().keys():
return sessions_metas.search(text, event_type, project_id)
elif event_type.endswith("_MOBILE") \
and event_type[:-len("_MOBILE")] in sessions_metas.supported_types().keys():
return sessions_metas.search(text, event_type, project_id)
else:
return {"errors": ["unsupported event"]}

View file

@ -1,68 +0,0 @@
from chalicelib.utils import pg_client, helper
from chalicelib.core import events
def get_customs_by_session_id(session_id, project_id):
return events.get_customs_by_session_id(session_id=session_id, project_id=project_id)
def get_by_sessionId(session_id, project_id):
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""
SELECT
c.*,
'TAP' AS type
FROM events_ios.taps AS c
WHERE
c.session_id = %(session_id)s
ORDER BY c.timestamp;""",
{"project_id": project_id, "session_id": session_id})
)
rows = cur.fetchall()
cur.execute(cur.mogrify(f"""
SELECT
i.*,
'INPUT' AS type
FROM events_ios.inputs AS i
WHERE
i.session_id = %(session_id)s
ORDER BY i.timestamp;""",
{"project_id": project_id, "session_id": session_id})
)
rows += cur.fetchall()
cur.execute(cur.mogrify(f"""
SELECT
v.*,
'VIEW' AS type
FROM events_ios.views AS v
WHERE
v.session_id = %(session_id)s
ORDER BY v.timestamp;""", {"project_id": project_id, "session_id": session_id}))
rows += cur.fetchall()
cur.execute(cur.mogrify(f"""
SELECT
s.*,
'SWIPE' AS type
FROM events_ios.swipes AS s
WHERE
s.session_id = %(session_id)s
ORDER BY s.timestamp;""", {"project_id": project_id, "session_id": session_id}))
rows += cur.fetchall()
rows = helper.list_to_camel_case(rows)
rows = sorted(rows, key=lambda k: k["timestamp"])
return rows
def get_crashes_by_session_id(session_id):
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""
SELECT cr.*,uc.*, cr.timestamp - s.start_ts AS time
FROM {events.EventType.CRASH_IOS.table} AS cr
INNER JOIN public.crashes_ios AS uc USING (crash_ios_id)
INNER JOIN public.sessions AS s USING (session_id)
WHERE
cr.session_id = %(session_id)s
ORDER BY timestamp;""", {"session_id": session_id}))
errors = cur.fetchall()
return helper.list_to_camel_case(errors)

View file

@ -0,0 +1,68 @@
from chalicelib.utils import pg_client, helper
from chalicelib.core import events
def get_customs_by_session_id(session_id, project_id):
return events.get_customs_by_session_id(session_id=session_id, project_id=project_id)
def get_by_sessionId(session_id, project_id):
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""
SELECT
c.*,
'TAP' AS type
FROM events_ios.taps AS c
WHERE
c.session_id = %(session_id)s
ORDER BY c.timestamp;""",
{"project_id": project_id, "session_id": session_id})
)
rows = cur.fetchall()
cur.execute(cur.mogrify(f"""
SELECT
i.*,
'INPUT' AS type
FROM events_ios.inputs AS i
WHERE
i.session_id = %(session_id)s
ORDER BY i.timestamp;""",
{"project_id": project_id, "session_id": session_id})
)
rows += cur.fetchall()
cur.execute(cur.mogrify(f"""
SELECT
v.*,
'VIEW' AS type
FROM events_ios.views AS v
WHERE
v.session_id = %(session_id)s
ORDER BY v.timestamp;""", {"project_id": project_id, "session_id": session_id}))
rows += cur.fetchall()
cur.execute(cur.mogrify(f"""
SELECT
s.*,
'SWIPE' AS type
FROM events_ios.swipes AS s
WHERE
s.session_id = %(session_id)s
ORDER BY s.timestamp;""", {"project_id": project_id, "session_id": session_id}))
rows += cur.fetchall()
rows = helper.list_to_camel_case(rows)
rows = sorted(rows, key=lambda k: k["timestamp"])
return rows
def get_crashes_by_session_id(session_id):
with pg_client.PostgresClient() as cur:
cur.execute(cur.mogrify(f"""
SELECT cr.*,uc.*, cr.timestamp - s.start_ts AS time
FROM {events.EventType.CRASH_MOBILE.table} AS cr
INNER JOIN public.crashes_ios AS uc USING (crash_ios_id)
INNER JOIN public.sessions AS s USING (session_id)
WHERE
cr.session_id = %(session_id)s
ORDER BY timestamp;""", {"session_id": session_id}))
errors = cur.fetchall()
return helper.list_to_camel_case(errors)

View file

@ -1,11 +1,14 @@
import json
import logging
from typing import Any, List, Dict, Optional
import schemas
from chalicelib.utils import helper
from chalicelib.utils import pg_client
from chalicelib.utils.TimeUTC import TimeUTC
from typing import Any, List, Dict, Optional
from fastapi import HTTPException, status
import json
import logging
logger = logging.getLogger(__name__)
feature_flag_columns = (
"feature_flag_id",
@ -48,7 +51,7 @@ def update_feature_flag_status(project_id: int, feature_flag_id: int, is_active:
return {"is_active": cur.fetchone()["is_active"]}
except Exception as e:
logging.error(f"Failed to update feature flag status: {e}")
logger.error(f"Failed to update feature flag status: {e}")
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Failed to update feature flag status")
@ -106,12 +109,12 @@ def prepare_constraints_params_to_search(data, project_id, user_id):
if data.query is not None and len(data.query) > 0:
constraints.append("flag_key ILIKE %(query)s")
params["query"] = helper.values_for_operator(value=data.query,
op=schemas.SearchEventOperator._contains)
op=schemas.SearchEventOperator.CONTAINS)
return constraints, params
def create_feature_flag(project_id: int, user_id: int, feature_flag_data: schemas.FeatureFlagSchema) -> Optional[int]:
if feature_flag_data.flag_type == schemas.FeatureFlagType.multi_variant and len(feature_flag_data.variants) == 0:
if feature_flag_data.flag_type == schemas.FeatureFlagType.MULTI_VARIANT and len(feature_flag_data.variants) == 0:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail="Variants are required for multi variant flag")
@ -193,7 +196,7 @@ def validate_unique_flag_key(feature_flag_data, project_id, exclude_id=None):
def validate_multi_variant_flag(feature_flag_data):
if feature_flag_data.flag_type == schemas.FeatureFlagType.multi_variant:
if feature_flag_data.flag_type == schemas.FeatureFlagType.MULTI_VARIANT:
if sum([v.rollout_percentage for v in feature_flag_data.variants]) > 100:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST,
detail=f"Sum of rollout percentage for variants cannot be greater than 100.")
@ -299,7 +302,8 @@ def create_conditions(feature_flag_id: int, conditions: List[schemas.FeatureFlag
with pg_client.PostgresClient() as cur:
params = [
(feature_flag_id, c.name, c.rollout_percentage, json.dumps([filter_.model_dump() for filter_ in c.filters]))
(feature_flag_id, c.name, c.rollout_percentage,
json.dumps([filter_.model_dump() for filter_ in c.filters]))
for c in conditions]
query = cur.mogrify(sql, params)
cur.execute(query)
@ -455,7 +459,8 @@ def create_variants(feature_flag_id: int, variants: List[schemas.FeatureFlagVari
"""
with pg_client.PostgresClient() as cur:
params = [(feature_flag_id, v.value, v.description, json.dumps(v.payload), v.rollout_percentage) for v in variants]
params = [(feature_flag_id, v.value, v.description, json.dumps(v.payload), v.rollout_percentage) for v in
variants]
query = cur.mogrify(sql, params)
cur.execute(query)
rows = cur.fetchall()

View file

@ -1,68 +0,0 @@
from typing import List
import schemas
from chalicelib.core import significance
from chalicelib.utils import helper
from chalicelib.utils import sql_helper as sh
def filter_stages(stages: List[schemas.SessionSearchEventSchema2]):
ALLOW_TYPES = [schemas.EventType.click, schemas.EventType.input,
schemas.EventType.location, schemas.EventType.custom,
schemas.EventType.click_ios, schemas.EventType.input_ios,
schemas.EventType.view_ios, schemas.EventType.custom_ios, ]
return [s for s in stages if s.type in ALLOW_TYPES and s.value is not None]
def __parse_events(f_events: List[dict]):
return [schemas.SessionSearchEventSchema2.parse_obj(e) for e in f_events]
def __fix_stages(f_events: List[schemas.SessionSearchEventSchema2]):
if f_events is None:
return
events = []
for e in f_events:
if e.operator is None:
e.operator = schemas.SearchEventOperator._is
if not isinstance(e.value, list):
e.value = [e.value]
is_any = sh.isAny_opreator(e.operator)
if not is_any and isinstance(e.value, list) and len(e.value) == 0:
continue
events.append(e)
return events
# def get_top_insights_on_the_fly_widget(project_id, data: schemas.FunnelInsightsPayloadSchema):
def get_top_insights_on_the_fly_widget(project_id, data: schemas.CardSeriesFilterSchema):
data.events = filter_stages(__parse_events(data.events))
data.events = __fix_stages(data.events)
if len(data.events) == 0:
return {"stages": [], "totalDropDueToIssues": 0}
insights, total_drop_due_to_issues = significance.get_top_insights(filter_d=data, project_id=project_id)
insights = helper.list_to_camel_case(insights)
if len(insights) > 0:
# TODO: check if this correct
if total_drop_due_to_issues > insights[0]["sessionsCount"]:
if len(insights) == 0:
total_drop_due_to_issues = 0
else:
total_drop_due_to_issues = insights[0]["sessionsCount"] - insights[-1]["sessionsCount"]
insights[-1]["dropDueToIssues"] = total_drop_due_to_issues
return {"stages": insights,
"totalDropDueToIssues": total_drop_due_to_issues}
# def get_issues_on_the_fly_widget(project_id, data: schemas.FunnelSearchPayloadSchema):
def get_issues_on_the_fly_widget(project_id, data: schemas.CardSeriesFilterSchema):
data.events = filter_stages(data.events)
data.events = __fix_stages(data.events)
if len(data.events) < 0:
return {"issues": []}
return {
"issues": helper.dict_to_camel_case(
significance.get_issues_list(filter_d=data, project_id=project_id, first_stage=1,
last_stage=len(data.events)))}

View file

@ -1,4 +1,4 @@
from urllib.parse import urlparse
import logging
import redis
import requests
@ -7,11 +7,13 @@ from decouple import config
from chalicelib.utils import pg_client
from chalicelib.utils.TimeUTC import TimeUTC
logger = logging.getLogger(__name__)
def app_connection_string(name, port, path):
namespace = config("POD_NAMESPACE", default="app")
conn_string = config("CLUSTER_URL", default="svc.cluster.local")
return f"http://{'.'.join(filter(None,[name,namespace,conn_string]))}:{port}/{path}"
return f"http://{name}.{namespace}.{conn_string}:{port}/{path}"
HEALTH_ENDPOINTS = {
@ -25,7 +27,6 @@ HEALTH_ENDPOINTS = {
"http": app_connection_string("http-openreplay", 8888, "metrics"),
"ingress-nginx": app_connection_string("ingress-nginx-openreplay", 80, "healthz"),
"integrations": app_connection_string("integrations-openreplay", 8888, "metrics"),
"peers": app_connection_string("peers-openreplay", 8888, "health"),
"sink": app_connection_string("sink-openreplay", 8888, "metrics"),
"sourcemapreader": app_connection_string(
"sourcemapreader-openreplay", 8888, "health"
@ -37,78 +38,66 @@ HEALTH_ENDPOINTS = {
def __check_database_pg(*_):
fail_response = {
"health": False,
"details": {
"errors": ["Postgres health-check failed"]
}
"details": {"errors": ["Postgres health-check failed"]},
}
with pg_client.PostgresClient() as cur:
try:
cur.execute("SHOW server_version;")
server_version = cur.fetchone()
# server_version = cur.fetchone()
except Exception as e:
print("!! health failed: postgres not responding")
print(str(e))
logger.error("!! health failed: postgres not responding")
logger.exception(e)
return fail_response
try:
cur.execute("SELECT openreplay_version() AS version;")
schema_version = cur.fetchone()
# schema_version = cur.fetchone()
except Exception as e:
print("!! health failed: openreplay_version not defined")
print(str(e))
logger.error("!! health failed: openreplay_version not defined")
logger.exception(e)
return fail_response
return {
"health": True,
"details": {
# "version": server_version["server_version"],
# "schema": schema_version["version"]
}
},
}
def __not_supported(*_):
return {"errors": ["not supported"]}
def __always_healthy(*_):
return {
"health": True,
"details": {}
}
return {"health": True, "details": {}}
def __check_be_service(service_name):
def fn(*_):
fail_response = {
"health": False,
"details": {
"errors": ["server health-check failed"]
}
"details": {"errors": ["server health-check failed"]},
}
try:
results = requests.get(HEALTH_ENDPOINTS.get(service_name), timeout=2)
if results.status_code != 200:
print(f"!! issue with the {service_name}-health code:{results.status_code}")
print(results.text)
logger.error(
f"!! issue with the {service_name}-health code:{results.status_code}"
)
logger.error(results.text)
# fail_response["details"]["errors"].append(results.text)
return fail_response
except requests.exceptions.Timeout:
print(f"!! Timeout getting {service_name}-health")
logger.error(f"!! Timeout getting {service_name}-health")
# fail_response["details"]["errors"].append("timeout")
return fail_response
except Exception as e:
print(f"!! Issue getting {service_name}-health response")
print(str(e))
logger.error(f"!! Issue getting {service_name}-health response")
logger.exception(e)
try:
print(results.text)
logger.error(results.text)
# fail_response["details"]["errors"].append(results.text)
except Exception:
print("couldn't get response")
logger.error("couldn't get response")
# fail_response["details"]["errors"].append(str(e))
return fail_response
return {
"health": True,
"details": {}
}
return {"health": True, "details": {}}
return fn
@ -116,18 +105,18 @@ def __check_be_service(service_name):
def __check_redis(*_):
fail_response = {
"health": False,
"details": {"errors": ["server health-check failed"]}
"details": {"errors": ["server health-check failed"]},
}
if config("REDIS_STRING", default=None) is None:
# fail_response["details"]["errors"].append("REDIS_STRING not defined in env-vars")
return fail_response
try:
r = redis.from_url(config("REDIS_STRING"))
r = redis.from_url(config("REDIS_STRING"), socket_timeout=2)
r.ping()
except Exception as e:
print("!! Issue getting redis-health response")
print(str(e))
logger.error("!! Issue getting redis-health response")
logger.exception(e)
# fail_response["details"]["errors"].append(str(e))
return fail_response
@ -135,53 +124,43 @@ def __check_redis(*_):
"health": True,
"details": {
# "version": r.execute_command('INFO')['redis_version']
}
},
}
def __check_SSL(*_):
fail_response = {
"health": False,
"details": {
"errors": ["SSL Certificate health-check failed"]
}
"details": {"errors": ["SSL Certificate health-check failed"]},
}
try:
requests.get(config("SITE_URL"), verify=True, allow_redirects=True)
except Exception as e:
print("!! health failed: SSL Certificate")
print(str(e))
logger.error("!! health failed: SSL Certificate")
logger.exception(e)
return fail_response
return {
"health": True,
"details": {}
}
return {"health": True, "details": {}}
def __get_sessions_stats(*_):
with pg_client.PostgresClient() as cur:
constraints = ["projects.deleted_at IS NULL"]
query = cur.mogrify(f"""SELECT COALESCE(SUM(sessions_count),0) AS s_c,
query = cur.mogrify(
f"""SELECT COALESCE(SUM(sessions_count),0) AS s_c,
COALESCE(SUM(events_count),0) AS e_c
FROM public.projects_stats
INNER JOIN public.projects USING(project_id)
WHERE {" AND ".join(constraints)};""")
WHERE {" AND ".join(constraints)};"""
)
cur.execute(query)
row = cur.fetchone()
return {
"numberOfSessionsCaptured": row["s_c"],
"numberOfEventCaptured": row["e_c"]
}
return {"numberOfSessionsCaptured": row["s_c"], "numberOfEventCaptured": row["e_c"]}
def get_health():
def get_health(tenant_id=None):
health_map = {
"databases": {
"postgres": __check_database_pg
},
"ingestionPipeline": {
"redis": __check_redis
},
"databases": {"postgres": __check_database_pg},
"ingestionPipeline": {"redis": __check_redis},
"backendServices": {
"alerts": __check_be_service("alerts"),
"assets": __check_be_service("assets"),
@ -194,13 +173,12 @@ def get_health():
"http": __check_be_service("http"),
"ingress-nginx": __always_healthy,
"integrations": __check_be_service("integrations"),
"peers": __check_be_service("peers"),
"sink": __check_be_service("sink"),
"sourcemapreader": __check_be_service("sourcemapreader"),
"storage": __check_be_service("storage")
"storage": __check_be_service("storage"),
},
"details": __get_sessions_stats,
"ssl": __check_SSL
"ssl": __check_SSL,
}
return __process_health(health_map=health_map)
@ -212,10 +190,16 @@ def __process_health(health_map):
response.pop(parent_key)
elif isinstance(health_map[parent_key], dict):
for element_key in health_map[parent_key]:
if config(f"SKIP_H_{parent_key.upper()}_{element_key.upper()}", cast=bool, default=False):
if config(
f"SKIP_H_{parent_key.upper()}_{element_key.upper()}",
cast=bool,
default=False,
):
response[parent_key].pop(element_key)
else:
response[parent_key][element_key] = health_map[parent_key][element_key]()
response[parent_key][element_key] = health_map[parent_key][
element_key
]()
else:
response[parent_key] = health_map[parent_key]()
return response
@ -223,7 +207,8 @@ def __process_health(health_map):
def cron():
with pg_client.PostgresClient() as cur:
query = cur.mogrify("""SELECT projects.project_id,
query = cur.mogrify(
"""SELECT projects.project_id,
projects.created_at,
projects.sessions_last_check_at,
projects.first_recorded_session_at,
@ -231,7 +216,8 @@ def cron():
FROM public.projects
LEFT JOIN public.projects_stats USING (project_id)
WHERE projects.deleted_at IS NULL
ORDER BY project_id;""")
ORDER BY project_id;"""
)
cur.execute(query)
rows = cur.fetchall()
for r in rows:
@ -252,20 +238,24 @@ def cron():
count_start_from = r["last_update_at"]
count_start_from = TimeUTC.datetime_to_timestamp(count_start_from)
params = {"project_id": r["project_id"],
"start_ts": count_start_from,
"end_ts": TimeUTC.now(),
"sessions_count": 0,
"events_count": 0}
params = {
"project_id": r["project_id"],
"start_ts": count_start_from,
"end_ts": TimeUTC.now(),
"sessions_count": 0,
"events_count": 0,
}
query = cur.mogrify("""SELECT COUNT(1) AS sessions_count,
query = cur.mogrify(
"""SELECT COUNT(1) AS sessions_count,
COALESCE(SUM(events_count),0) AS events_count
FROM public.sessions
WHERE project_id=%(project_id)s
AND start_ts>=%(start_ts)s
AND start_ts<=%(end_ts)s
AND duration IS NOT NULL;""",
params)
params,
)
cur.execute(query)
row = cur.fetchone()
if row is not None:
@ -273,56 +263,68 @@ def cron():
params["events_count"] = row["events_count"]
if insert:
query = cur.mogrify("""INSERT INTO public.projects_stats(project_id, sessions_count, events_count, last_update_at)
query = cur.mogrify(
"""INSERT INTO public.projects_stats(project_id, sessions_count, events_count, last_update_at)
VALUES (%(project_id)s, %(sessions_count)s, %(events_count)s, (now() AT TIME ZONE 'utc'::text));""",
params)
params,
)
else:
query = cur.mogrify("""UPDATE public.projects_stats
query = cur.mogrify(
"""UPDATE public.projects_stats
SET sessions_count=sessions_count+%(sessions_count)s,
events_count=events_count+%(events_count)s,
last_update_at=(now() AT TIME ZONE 'utc'::text)
WHERE project_id=%(project_id)s;""",
params)
params,
)
cur.execute(query)
# this cron is used to correct the sessions&events count every week
def weekly_cron():
with pg_client.PostgresClient(long_query=True) as cur:
query = cur.mogrify("""SELECT project_id,
query = cur.mogrify(
"""SELECT project_id,
projects_stats.last_update_at
FROM public.projects
LEFT JOIN public.projects_stats USING (project_id)
WHERE projects.deleted_at IS NULL
ORDER BY project_id;""")
ORDER BY project_id;"""
)
cur.execute(query)
rows = cur.fetchall()
for r in rows:
if r["last_update_at"] is None:
continue
params = {"project_id": r["project_id"],
"end_ts": TimeUTC.now(),
"sessions_count": 0,
"events_count": 0}
params = {
"project_id": r["project_id"],
"end_ts": TimeUTC.now(),
"sessions_count": 0,
"events_count": 0,
}
query = cur.mogrify("""SELECT COUNT(1) AS sessions_count,
query = cur.mogrify(
"""SELECT COUNT(1) AS sessions_count,
COALESCE(SUM(events_count),0) AS events_count
FROM public.sessions
WHERE project_id=%(project_id)s
AND start_ts<=%(end_ts)s
AND duration IS NOT NULL;""",
params)
params,
)
cur.execute(query)
row = cur.fetchone()
if row is not None:
params["sessions_count"] = row["sessions_count"]
params["events_count"] = row["events_count"]
query = cur.mogrify("""UPDATE public.projects_stats
query = cur.mogrify(
"""UPDATE public.projects_stats
SET sessions_count=%(sessions_count)s,
events_count=%(events_count)s,
last_update_at=(now() AT TIME ZONE 'utc'::text)
WHERE project_id=%(project_id)s;""",
params)
params,
)
cur.execute(query)

View file

@ -1,74 +0,0 @@
from chalicelib.utils import sql_helper as sh
import schemas
from chalicelib.utils import helper, pg_client
def get_by_url(project_id, data: schemas.GetHeatmapPayloadSchema):
args = {"startDate": data.startTimestamp, "endDate": data.endTimestamp,
"project_id": project_id, "url": data.url}
constraints = ["sessions.project_id = %(project_id)s",
"(url = %(url)s OR path= %(url)s)",
"clicks.timestamp >= %(startDate)s",
"clicks.timestamp <= %(endDate)s",
"start_ts >= %(startDate)s",
"start_ts <= %(endDate)s",
"duration IS NOT NULL"]
query_from = "events.clicks INNER JOIN sessions USING (session_id)"
q_count = "count(1) AS count"
has_click_rage_filter = False
if len(data.filters) > 0:
for i, f in enumerate(data.filters):
if f.type == schemas.FilterType.issue and len(f.value) > 0:
has_click_rage_filter = True
q_count = "max(real_count) AS count,TRUE AS click_rage"
query_from += """INNER JOIN events_common.issues USING (timestamp, session_id)
INNER JOIN issues AS mis USING (issue_id)
INNER JOIN LATERAL (
SELECT COUNT(1) AS real_count
FROM events.clicks AS sc
INNER JOIN sessions as ss USING (session_id)
WHERE ss.project_id = 2
AND (sc.url = %(url)s OR sc.path = %(url)s)
AND sc.timestamp >= %(startDate)s
AND sc.timestamp <= %(endDate)s
AND ss.start_ts >= %(startDate)s
AND ss.start_ts <= %(endDate)s
AND sc.selector = clicks.selector) AS r_clicks ON (TRUE)"""
constraints += ["mis.project_id = %(project_id)s",
"issues.timestamp >= %(startDate)s",
"issues.timestamp <= %(endDate)s"]
f_k = f"issue_value{i}"
args = {**args, **sh.multi_values(f.value, value_key=f_k)}
constraints.append(sh.multi_conditions(f"%({f_k})s = ANY (issue_types)",
f.value, value_key=f_k))
constraints.append(sh.multi_conditions(f"mis.type = %({f_k})s",
f.value, value_key=f_k))
if data.click_rage and not has_click_rage_filter:
constraints.append("""(issues.session_id IS NULL
OR (issues.timestamp >= %(startDate)s
AND issues.timestamp <= %(endDate)s
AND mis.project_id = %(project_id)s))""")
q_count += ",COALESCE(bool_or(mis.type = 'click_rage'), FALSE) AS click_rage"
query_from += """LEFT JOIN events_common.issues USING (timestamp, session_id)
LEFT JOIN issues AS mis USING (issue_id)"""
with pg_client.PostgresClient() as cur:
query = cur.mogrify(f"""SELECT selector, {q_count}
FROM {query_from}
WHERE {" AND ".join(constraints)}
GROUP BY selector
LIMIT 500;""", args)
# print("---------")
# print(query.decode('UTF-8'))
# print("---------")
try:
cur.execute(query)
except Exception as err:
print("--------- HEATMAP SEARCH QUERY EXCEPTION -----------")
print(query.decode('UTF-8'))
print("--------- PAYLOAD -----------")
print(data)
print("--------------------")
raise err
rows = cur.fetchall()
return helper.list_to_camel_case(rows)

View file

@ -1,86 +0,0 @@
import schemas
from chalicelib.core import integration_base
from chalicelib.core.integration_github_issue import GithubIntegrationIssue
from chalicelib.utils import pg_client, helper
PROVIDER = schemas.IntegrationType.github
class GitHubIntegration(integration_base.BaseIntegration):
def __init__(self, tenant_id, user_id):
self.__tenant_id = tenant_id
super(GitHubIntegration, self).__init__(user_id=user_id, ISSUE_CLASS=GithubIntegrationIssue)
@property
def provider(self):
return PROVIDER
@property
def issue_handler(self):
return self._issue_handler
def get_obfuscated(self):
integration = self.get()
if integration is None:
return None
return {"token": helper.obfuscate(text=integration["token"]), "provider": self.provider.lower()}
def update(self, changes, obfuscate=False):
with pg_client.PostgresClient() as cur:
sub_query = [f"{helper.key_to_snake_case(k)} = %({k})s" for k in changes.keys()]
cur.execute(
cur.mogrify(f"""\
UPDATE public.oauth_authentication
SET {','.join(sub_query)}
WHERE user_id=%(user_id)s
RETURNING token;""",
{"user_id": self._user_id,
**changes})
)
w = helper.dict_to_camel_case(cur.fetchone())
if w and w.get("token") and obfuscate:
w["token"] = helper.obfuscate(w["token"])
return w
def _add(self, data):
pass
def add(self, token, obfuscate=False):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
INSERT INTO public.oauth_authentication(user_id, provider, provider_user_id, token)
VALUES(%(user_id)s, 'github', '', %(token)s)
RETURNING token;""",
{"user_id": self._user_id,
"token": token})
)
w = helper.dict_to_camel_case(cur.fetchone())
if w and w.get("token") and obfuscate:
w["token"] = helper.obfuscate(w["token"])
return w
# TODO: make a revoke token call
def delete(self):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
DELETE FROM public.oauth_authentication
WHERE user_id=%(user_id)s AND provider=%(provider)s;""",
{"user_id": self._user_id, "provider": self.provider.lower()})
)
return {"state": "success"}
def add_edit(self, data: schemas.IssueTrackingGithubSchema):
s = self.get()
if s is not None:
return self.update(
changes={
"token": data.token if len(data.token) > 0 and data.token.find("***") == -1 \
else s.token
},
obfuscate=True
)
else:
return self.add(token=data.token, obfuscate=True)

View file

@ -1,100 +0,0 @@
from chalicelib.core.integration_base_issue import BaseIntegrationIssue
from chalicelib.utils import github_client_v3
from chalicelib.utils.github_client_v3 import github_formatters as formatter
class GithubIntegrationIssue(BaseIntegrationIssue):
def __init__(self, integration_token):
self.__client = github_client_v3.githubV3Request(integration_token)
super(GithubIntegrationIssue, self).__init__("GITHUB", integration_token)
def get_current_user(self):
return formatter.user(self.__client.get("/user"))
def get_meta(self, repoId):
current_user = self.get_current_user()
try:
users = self.__client.get(f"/repositories/{repoId}/collaborators")
except Exception as e:
users = []
users = [formatter.user(u) for u in users]
if current_user not in users:
users.insert(0, current_user)
meta = {
'users': users,
'issueTypes': [formatter.label(l) for l in
self.__client.get(f"/repositories/{repoId}/labels")]
}
return meta
def create_new_assignment(self, integration_project_id, title, description, assignee,
issue_type):
repoId = integration_project_id
assignees = [assignee]
labels = [str(issue_type)]
metas = self.get_meta(repoId)
real_assignees = []
for a in assignees:
for u in metas["users"]:
if a == str(u["id"]):
real_assignees.append(u["name"])
break
real_labels = ["OpenReplay"]
for l in labels:
found = False
for ll in metas["issueTypes"]:
if l == str(ll["id"]):
real_labels.append(ll["name"])
found = True
break
if not found:
real_labels.append(l)
issue = self.__client.post(f"/repositories/{repoId}/issues", body={"title": title, "body": description,
"assignees": real_assignees,
"labels": real_labels})
return formatter.issue(issue)
def get_by_ids(self, saved_issues):
results = []
for i in saved_issues:
results.append(self.get(integration_project_id=i["integrationProjectId"], assignment_id=i["id"]))
return {"issues": results}
def get(self, integration_project_id, assignment_id):
repoId = integration_project_id
issueNumber = assignment_id
issue = self.__client.get(f"/repositories/{repoId}/issues/{issueNumber}")
issue = formatter.issue(issue)
if issue["commentsCount"] > 0:
issue["comments"] = [formatter.comment(c) for c in
self.__client.get(f"/repositories/{repoId}/issues/{issueNumber}/comments")]
return issue
def comment(self, integration_project_id, assignment_id, comment):
repoId = integration_project_id
issueNumber = assignment_id
commentCreated = self.__client.post(f"/repositories/{repoId}/issues/{issueNumber}/comments",
body={"body": comment})
return formatter.comment(commentCreated)
def get_metas(self, integration_project_id):
current_user = self.get_current_user()
try:
users = self.__client.get(f"/repositories/{integration_project_id}/collaborators")
except Exception as e:
users = []
users = [formatter.user(u) for u in users]
if current_user not in users:
users.insert(0, current_user)
return {"provider": self.provider.lower(),
'users': users,
'issueTypes': [formatter.label(l) for l in
self.__client.get(f"/repositories/{integration_project_id}/labels")]
}
def get_projects(self):
repos = self.__client.get("/user/repos")
return [formatter.repo(r) for r in repos]

View file

@ -1,132 +0,0 @@
import schemas
from chalicelib.core import integration_base
from chalicelib.core.integration_jira_cloud_issue import JIRACloudIntegrationIssue
from chalicelib.utils import pg_client, helper
PROVIDER = schemas.IntegrationType.jira
def obfuscate_string(string):
return "*" * (len(string) - 4) + string[-4:]
class JIRAIntegration(integration_base.BaseIntegration):
def __init__(self, tenant_id, user_id):
self.__tenant_id = tenant_id
# TODO: enable super-constructor when OAuth is done
# super(JIRAIntegration, self).__init__(jwt, user_id, JIRACloudIntegrationProxy)
self._issue_handler = None
self._user_id = user_id
self.integration = self.get()
if self.integration is None:
return
self.integration["valid"] = True
if not self.integration["url"].endswith('atlassian.net'):
self.integration["valid"] = False
@property
def provider(self):
return PROVIDER
@property
def issue_handler(self):
if self.integration["url"].endswith('atlassian.net') and self._issue_handler is None:
try:
self._issue_handler = JIRACloudIntegrationIssue(token=self.integration["token"],
username=self.integration["username"],
url=self.integration["url"])
except Exception as e:
self._issue_handler = None
self.integration["valid"] = False
return self._issue_handler
# TODO: remove this once jira-oauth is done
def get(self):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(
"""SELECT username, token, url
FROM public.jira_cloud
WHERE user_id=%(user_id)s;""",
{"user_id": self._user_id})
)
data = helper.dict_to_camel_case(cur.fetchone())
if data is None:
return
data["valid"] = True
if not data["url"].endswith('atlassian.net'):
data["valid"] = False
return data
def get_obfuscated(self):
if self.integration is None:
return None
integration = dict(self.integration)
integration["token"] = obfuscate_string(self.integration["token"])
integration["provider"] = self.provider.lower()
return integration
def update(self, changes, obfuscate=False):
with pg_client.PostgresClient() as cur:
sub_query = [f"{helper.key_to_snake_case(k)} = %({k})s" for k in changes.keys()]
cur.execute(
cur.mogrify(f"""\
UPDATE public.jira_cloud
SET {','.join(sub_query)}
WHERE user_id=%(user_id)s
RETURNING username, token, url;""",
{"user_id": self._user_id,
**changes})
)
w = helper.dict_to_camel_case(cur.fetchone())
if obfuscate:
w["token"] = obfuscate_string(w["token"])
return self.get()
# TODO: make this generic for all issue tracking integrations
def _add(self, data):
print("a pretty defined abstract method")
return
def add(self, username, token, url):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
INSERT INTO public.jira_cloud(username, token, user_id,url)
VALUES (%(username)s, %(token)s, %(user_id)s,%(url)s)
RETURNING username, token, url;""",
{"user_id": self._user_id, "username": username,
"token": token, "url": url})
)
w = helper.dict_to_camel_case(cur.fetchone())
return self.get()
def delete(self):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
DELETE FROM public.jira_cloud
WHERE user_id=%(user_id)s;""",
{"user_id": self._user_id})
)
return {"state": "success"}
def add_edit(self, data: schemas.IssueTrackingJiraSchema):
if self.integration is not None:
return self.update(
changes={
"username": data.username,
"token": data.token if len(data.token) > 0 and data.token.find("***") == -1 \
else self.integration.token,
"url": data.url
},
obfuscate=True
)
else:
return self.add(
username=data.username,
token=data.token,
url=str(data.url)
)

View file

@ -1,56 +0,0 @@
from chalicelib.utils import jira_client
from chalicelib.core.integration_base_issue import BaseIntegrationIssue
class JIRACloudIntegrationIssue(BaseIntegrationIssue):
def __init__(self, token, username, url):
self.username = username
self.url = url
self._client = jira_client.JiraManager(self.url, self.username, token, None)
super(JIRACloudIntegrationIssue, self).__init__("JIRA", token)
def create_new_assignment(self, integration_project_id, title, description, assignee, issue_type):
self._client.set_jira_project_id(integration_project_id)
data = {
'summary': title,
'description': description,
'issuetype': {'id': issue_type},
'assignee': {"id": assignee},
"labels": ["OpenReplay"]
}
return self._client.create_issue(data)
def get_by_ids(self, saved_issues):
projects_map = {}
for i in saved_issues:
if i["integrationProjectId"] not in projects_map.keys():
projects_map[i["integrationProjectId"]] = []
projects_map[i["integrationProjectId"]].append(i["id"])
results = []
for integration_project_id in projects_map:
self._client.set_jira_project_id(integration_project_id)
jql = 'labels = OpenReplay'
if len(projects_map[integration_project_id]) > 0:
jql += f" AND ID IN ({','.join(projects_map[integration_project_id])})"
issues = self._client.get_issues(jql, offset=0)
results += issues
return {"issues": results}
def get(self, integration_project_id, assignment_id):
self._client.set_jira_project_id(integration_project_id)
return self._client.get_issue_v3(assignment_id)
def comment(self, integration_project_id, assignment_id, comment):
self._client.set_jira_project_id(integration_project_id)
return self._client.add_comment_v3(assignment_id, comment)
def get_metas(self, integration_project_id):
meta = {}
self._client.set_jira_project_id(integration_project_id)
meta['issueTypes'] = self._client.get_issue_types()
meta['users'] = self._client.get_assignable_users()
return {"provider": self.provider.lower(), **meta}
def get_projects(self):
return self._client.get_projects()

View file

@ -1,64 +0,0 @@
import schemas
from chalicelib.utils import pg_client
def get_global_integrations_status(tenant_id, user_id, project_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""\
SELECT EXISTS((SELECT 1
FROM public.oauth_authentication
WHERE user_id = %(user_id)s
AND provider = 'github')) AS {schemas.IntegrationType.github.value},
EXISTS((SELECT 1
FROM public.jira_cloud
WHERE user_id = %(user_id)s)) AS {schemas.IntegrationType.jira.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='bugsnag')) AS {schemas.IntegrationType.bugsnag.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='cloudwatch')) AS {schemas.IntegrationType.cloudwatch.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='datadog')) AS {schemas.IntegrationType.datadog.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='newrelic')) AS {schemas.IntegrationType.newrelic.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='rollbar')) AS {schemas.IntegrationType.rollbar.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='sentry')) AS {schemas.IntegrationType.sentry.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='stackdriver')) AS {schemas.IntegrationType.stackdriver.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='sumologic')) AS {schemas.IntegrationType.sumologic.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='elasticsearch')) AS {schemas.IntegrationType.elasticsearch.value},
EXISTS((SELECT 1
FROM public.webhooks
WHERE type='slack' AND deleted_at ISNULL)) AS {schemas.IntegrationType.slack.value},
EXISTS((SELECT 1
FROM public.webhooks
WHERE type='msteams' AND deleted_at ISNULL)) AS {schemas.IntegrationType.ms_teams.value};""",
{"user_id": user_id, "tenant_id": tenant_id, "project_id": project_id})
)
current_integrations = cur.fetchone()
result = []
for k in current_integrations.keys():
result.append({"name": k, "integrated": current_integrations[k]})
return result

View file

@ -1,45 +0,0 @@
from chalicelib.core import integration_github, integration_jira_cloud
from chalicelib.utils import pg_client
SUPPORTED_TOOLS = [integration_github.PROVIDER, integration_jira_cloud.PROVIDER]
def get_available_integrations(user_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""\
SELECT EXISTS((SELECT 1
FROM public.oauth_authentication
WHERE user_id = %(user_id)s
AND provider = 'github')) AS github,
EXISTS((SELECT 1
FROM public.jira_cloud
WHERE user_id = %(user_id)s)) AS jira;""",
{"user_id": user_id})
)
current_integrations = cur.fetchone()
return dict(current_integrations)
def __get_default_integration(user_id):
current_integrations = get_available_integrations(user_id)
return integration_github.PROVIDER if current_integrations["github"] else integration_jira_cloud.PROVIDER if \
current_integrations["jira"] else None
def get_integration(tenant_id, user_id, tool=None, for_delete=False):
if tool is None:
tool = __get_default_integration(user_id=user_id)
if tool is None:
return {"errors": [f"no issue tracking tool found"]}, None
tool = tool.upper()
if tool not in SUPPORTED_TOOLS:
return {"errors": [f"issue tracking tool not supported yet, available: {SUPPORTED_TOOLS}"]}, None
if tool == integration_jira_cloud.PROVIDER:
integration = integration_jira_cloud.JIRAIntegration(tenant_id=tenant_id, user_id=user_id)
if not for_delete and integration.integration is not None and not integration.integration.get("valid", True):
return {"errors": ["JIRA: connexion issue/unauthorized"]}, integration
return None, integration
elif tool == integration_github.PROVIDER:
return None, integration_github.GitHubIntegration(tenant_id=tenant_id, user_id=user_id)
return {"errors": ["lost integration"]}, None

View file

@ -0,0 +1,86 @@
import schemas
from chalicelib.core.issue_tracking import base
from chalicelib.core.issue_tracking.github_issue import GithubIntegrationIssue
from chalicelib.utils import pg_client, helper
PROVIDER = schemas.IntegrationType.GITHUB
class GitHubIntegration(base.BaseIntegration):
def __init__(self, tenant_id, user_id):
self.__tenant_id = tenant_id
super(GitHubIntegration, self).__init__(user_id=user_id, ISSUE_CLASS=GithubIntegrationIssue)
@property
def provider(self):
return PROVIDER
@property
def issue_handler(self):
return self._issue_handler
def get_obfuscated(self):
integration = self.get()
if integration is None:
return None
return {"token": helper.obfuscate(text=integration["token"]), "provider": self.provider.lower()}
def update(self, changes, obfuscate=False):
with pg_client.PostgresClient() as cur:
sub_query = [f"{helper.key_to_snake_case(k)} = %({k})s" for k in changes.keys()]
cur.execute(
cur.mogrify(f"""\
UPDATE public.oauth_authentication
SET {','.join(sub_query)}
WHERE user_id=%(user_id)s
RETURNING token;""",
{"user_id": self._user_id,
**changes})
)
w = helper.dict_to_camel_case(cur.fetchone())
if w and w.get("token") and obfuscate:
w["token"] = helper.obfuscate(w["token"])
return w
def _add(self, data):
pass
def add(self, token, obfuscate=False):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
INSERT INTO public.oauth_authentication(user_id, provider, provider_user_id, token)
VALUES(%(user_id)s, 'github', '', %(token)s)
RETURNING token;""",
{"user_id": self._user_id,
"token": token})
)
w = helper.dict_to_camel_case(cur.fetchone())
if w and w.get("token") and obfuscate:
w["token"] = helper.obfuscate(w["token"])
return w
# TODO: make a revoke token call
def delete(self):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify("""\
DELETE FROM public.oauth_authentication
WHERE user_id=%(user_id)s AND provider=%(provider)s;""",
{"user_id": self._user_id, "provider": self.provider.lower()})
)
return {"state": "success"}
def add_edit(self, data: schemas.IssueTrackingGithubSchema):
s = self.get()
if s is not None:
return self.update(
changes={
"token": data.token if len(data.token) > 0 and data.token.find("***") == -1 \
else s.token
},
obfuscate=True
)
else:
return self.add(token=data.token, obfuscate=True)

View file

@ -0,0 +1,100 @@
from chalicelib.core.issue_tracking.base_issue import BaseIntegrationIssue
from chalicelib.utils import github_client_v3
from chalicelib.utils.github_client_v3 import github_formatters as formatter
class GithubIntegrationIssue(BaseIntegrationIssue):
def __init__(self, token):
self.__client = github_client_v3.githubV3Request(token)
super(GithubIntegrationIssue, self).__init__("GITHUB", token)
def get_current_user(self):
return formatter.user(self.__client.get("/user"))
def get_meta(self, repoId):
current_user = self.get_current_user()
try:
users = self.__client.get(f"/repositories/{repoId}/collaborators")
except Exception as e:
users = []
users = [formatter.user(u) for u in users]
if current_user not in users:
users.insert(0, current_user)
meta = {
'users': users,
'issueTypes': [formatter.label(l) for l in
self.__client.get(f"/repositories/{repoId}/labels")]
}
return meta
def create_new_assignment(self, project_id, title, description, assignee,
issue_type):
repoId = project_id
assignees = [assignee]
labels = [str(issue_type)]
metas = self.get_meta(repoId)
real_assignees = []
for a in assignees:
for u in metas["users"]:
if a == str(u["id"]):
real_assignees.append(u["name"])
break
real_labels = ["OpenReplay"]
for l in labels:
found = False
for ll in metas["issueTypes"]:
if l == str(ll["id"]):
real_labels.append(ll["name"])
found = True
break
if not found:
real_labels.append(l)
issue = self.__client.post(f"/repositories/{repoId}/issues", body={"title": title, "body": description,
"assignees": real_assignees,
"labels": real_labels})
return formatter.issue(issue)
def get_by_ids(self, saved_issues):
results = []
for i in saved_issues:
results.append(self.get(project_id=i["integrationProjectId"], assignment_id=i["id"]))
return {"issues": results}
def get(self, project_id, assignment_id):
repoId = project_id
issueNumber = assignment_id
issue = self.__client.get(f"/repositories/{repoId}/issues/{issueNumber}")
issue = formatter.issue(issue)
if issue["commentsCount"] > 0:
issue["comments"] = [formatter.comment(c) for c in
self.__client.get(f"/repositories/{repoId}/issues/{issueNumber}/comments")]
return issue
def comment(self, project_id, assignment_id, comment):
repoId = project_id
issueNumber = assignment_id
commentCreated = self.__client.post(f"/repositories/{repoId}/issues/{issueNumber}/comments",
body={"body": comment})
return formatter.comment(commentCreated)
def get_metas(self, project_id):
current_user = self.get_current_user()
try:
users = self.__client.get(f"/repositories/{project_id}/collaborators")
except Exception as e:
users = []
users = [formatter.user(u) for u in users]
if current_user not in users:
users.insert(0, current_user)
return {"provider": self.provider.lower(),
'users': users,
'issueTypes': [formatter.label(l) for l in
self.__client.get(f"/repositories/{project_id}/labels")]
}
def get_projects(self):
repos = self.__client.get("/user/repos")
return [formatter.repo(r) for r in repos]

View file

@ -0,0 +1,68 @@
import schemas
from chalicelib.core.modules import TENANT_CONDITION
from chalicelib.utils import pg_client
def get_global_integrations_status(tenant_id, user_id, project_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""\
SELECT EXISTS((SELECT 1
FROM public.oauth_authentication
WHERE user_id = %(user_id)s
AND provider = 'github')) AS {schemas.IntegrationType.GITHUB.value},
EXISTS((SELECT 1
FROM public.jira_cloud
WHERE user_id = %(user_id)s)) AS {schemas.IntegrationType.JIRA.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='bugsnag')) AS {schemas.IntegrationType.BUGSNAG.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='cloudwatch')) AS {schemas.IntegrationType.CLOUDWATCH.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='datadog')) AS {schemas.IntegrationType.DATADOG.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='newrelic')) AS {schemas.IntegrationType.NEWRELIC.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='rollbar')) AS {schemas.IntegrationType.ROLLBAR.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='sentry')) AS {schemas.IntegrationType.SENTRY.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='stackdriver')) AS {schemas.IntegrationType.STACKDRIVER.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='sumologic')) AS {schemas.IntegrationType.SUMOLOGIC.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s
AND provider='elasticsearch')) AS {schemas.IntegrationType.ELASTICSEARCH.value},
EXISTS((SELECT 1
FROM public.webhooks
WHERE type='slack' AND deleted_at ISNULL AND {TENANT_CONDITION})) AS {schemas.IntegrationType.SLACK.value},
EXISTS((SELECT 1
FROM public.webhooks
WHERE type='msteams' AND deleted_at ISNULL AND {TENANT_CONDITION})) AS {schemas.IntegrationType.MS_TEAMS.value},
EXISTS((SELECT 1
FROM public.integrations
WHERE project_id=%(project_id)s AND provider='dynatrace')) AS {schemas.IntegrationType.DYNATRACE.value};""",
{"user_id": user_id, "tenant_id": tenant_id, "project_id": project_id})
)
current_integrations = cur.fetchone()
result = []
for k in current_integrations.keys():
result.append({"name": k, "integrated": current_integrations[k]})
return result

View file

@ -0,0 +1,45 @@
from chalicelib.core.issue_tracking import github, jira_cloud
from chalicelib.utils import pg_client
SUPPORTED_TOOLS = [github.PROVIDER, jira_cloud.PROVIDER]
def get_available_integrations(user_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""\
SELECT EXISTS((SELECT 1
FROM public.oauth_authentication
WHERE user_id = %(user_id)s
AND provider = 'github')) AS github,
EXISTS((SELECT 1
FROM public.jira_cloud
WHERE user_id = %(user_id)s)) AS jira;""",
{"user_id": user_id})
)
current_integrations = cur.fetchone()
return dict(current_integrations)
def __get_default_integration(user_id):
current_integrations = get_available_integrations(user_id)
return github.PROVIDER if current_integrations["github"] else jira_cloud.PROVIDER if \
current_integrations["jira"] else None
def get_integration(tenant_id, user_id, tool=None, for_delete=False):
if tool is None:
tool = __get_default_integration(user_id=user_id)
if tool is None:
return {"errors": [f"no issue tracking tool found"]}, None
tool = tool.upper()
if tool not in SUPPORTED_TOOLS:
return {"errors": [f"issue tracking tool not supported yet, available: {SUPPORTED_TOOLS}"]}, None
if tool == jira_cloud.PROVIDER:
integration = jira_cloud.JIRAIntegration(tenant_id=tenant_id, user_id=user_id)
if not for_delete and integration.integration is not None and not integration.integration.get("valid", True):
return {"errors": ["JIRA: connexion issue/unauthorized"]}, integration
return None, integration
elif tool == github.PROVIDER:
return None, github.GitHubIntegration(tenant_id=tenant_id, user_id=user_id)
return {"errors": ["lost integration"]}, None

View file

@ -0,0 +1,139 @@
import schemas
from chalicelib.core.issue_tracking import base
from chalicelib.core.issue_tracking.jira_cloud_issue import JIRACloudIntegrationIssue
from chalicelib.utils import pg_client, helper
PROVIDER = schemas.IntegrationType.JIRA
def obfuscate_string(string):
return "*" * (len(string) - 4) + string[-4:]
class JIRAIntegration(base.BaseIntegration):
def __init__(self, tenant_id, user_id):
self.__tenant_id = tenant_id
# TODO: enable super-constructor when OAuth is done
# super(JIRAIntegration, self).__init__(jwt, user_id, JIRACloudIntegrationProxy)
self._issue_handler = None
self._user_id = user_id
self.integration = self.get()
@staticmethod
def __validate(data):
data["valid"] = JIRAIntegration.__is_valid_url(data["url"])
@staticmethod
def __is_valid_url(url):
return url.endswith('atlassian.net') or url.endswith('atlassian.net/')
@property
def provider(self):
return PROVIDER
@property
def issue_handler(self):
if JIRAIntegration.__is_valid_url(self.integration["url"]) and self._issue_handler is None:
try:
self._issue_handler = JIRACloudIntegrationIssue(token=self.integration["token"],
username=self.integration["username"],
url=self.integration["url"])
except Exception as e:
self._issue_handler = None
self.integration["valid"] = False
return {"errors": ["Something went wrong, please check your JIRA credentials."]}
return self._issue_handler
# TODO: remove this once jira-oauth is done
def get(self):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(
"""SELECT username, token, url
FROM public.jira_cloud
WHERE user_id = %(user_id)s;""",
{"user_id": self._user_id})
)
data = helper.dict_to_camel_case(cur.fetchone())
if data is None:
return
JIRAIntegration.__validate(data)
return data
def get_obfuscated(self):
if self.integration is None:
return None
integration = dict(self.integration)
integration["token"] = obfuscate_string(self.integration["token"])
integration["provider"] = self.provider.lower()
return integration
def update(self, changes, obfuscate=False):
with pg_client.PostgresClient() as cur:
sub_query = [f"{helper.key_to_snake_case(k)} = %({k})s" for k in changes.keys()]
cur.execute(
cur.mogrify(f"""\
UPDATE public.jira_cloud
SET {','.join(sub_query)}
WHERE user_id=%(user_id)s
RETURNING username, token, url;""",
{"user_id": self._user_id,
**changes})
)
w = helper.dict_to_camel_case(cur.fetchone())
JIRAIntegration.__validate(w)
if obfuscate:
w["token"] = obfuscate_string(w["token"])
return w
# TODO: make this generic for all issue tracking integrations
def _add(self, data):
print("a pretty defined abstract method")
return
def add(self, username, token, url, obfuscate=False):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(""" \
INSERT INTO public.jira_cloud(username, token, user_id, url)
VALUES (%(username)s, %(token)s, %(user_id)s, %(url)s) RETURNING username, token, url;""",
{"user_id": self._user_id, "username": username,
"token": token, "url": url})
)
w = helper.dict_to_camel_case(cur.fetchone())
JIRAIntegration.__validate(w)
if obfuscate:
w["token"] = obfuscate_string(w["token"])
return w
def delete(self):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(""" \
DELETE
FROM public.jira_cloud
WHERE user_id = %(user_id)s;""",
{"user_id": self._user_id})
)
return {"state": "success"}
def add_edit(self, data: schemas.IssueTrackingJiraSchema):
if self.integration is not None:
return self.update(
changes={
"username": data.username,
"token": data.token if len(data.token) > 0 and data.token.find("***") == -1 \
else self.integration["token"],
"url": str(data.url)
},
obfuscate=True
)
else:
return self.add(
username=data.username,
token=data.token,
url=str(data.url),
obfuscate=True
)

View file

@ -0,0 +1,56 @@
from chalicelib.utils import jira_client
from chalicelib.core.issue_tracking.base_issue import BaseIntegrationIssue
class JIRACloudIntegrationIssue(BaseIntegrationIssue):
def __init__(self, token, username, url):
self.username = username
self.url = url
self._client = jira_client.JiraManager(self.url, self.username, token, None)
super(JIRACloudIntegrationIssue, self).__init__("JIRA", token)
def create_new_assignment(self, project_id, title, description, assignee, issue_type):
self._client.set_jira_project_id(project_id)
data = {
'summary': title,
'description': description,
'issuetype': {'id': issue_type},
'assignee': {"id": assignee},
"labels": ["OpenReplay"]
}
return self._client.create_issue(data)
def get_by_ids(self, saved_issues):
projects_map = {}
for i in saved_issues:
if i["integrationProjectId"] not in projects_map.keys():
projects_map[i["integrationProjectId"]] = []
projects_map[i["integrationProjectId"]].append(i["id"])
results = []
for project_id in projects_map:
self._client.set_jira_project_id(project_id)
jql = 'labels = OpenReplay'
if len(projects_map[project_id]) > 0:
jql += f" AND ID IN ({','.join(projects_map[project_id])})"
issues = self._client.get_issues(jql, offset=0)
results += issues
return {"issues": results}
def get(self, project_id, assignment_id):
self._client.set_jira_project_id(project_id)
return self._client.get_issue_v3(assignment_id)
def comment(self, project_id, assignment_id, comment):
self._client.set_jira_project_id(project_id)
return self._client.add_comment_v3(assignment_id, comment)
def get_metas(self, project_id):
meta = {}
self._client.set_jira_project_id(project_id)
meta['issueTypes'] = self._client.get_issue_types()
meta['users'] = self._client.get_assignable_users()
return {"provider": self.provider.lower(), **meta}
def get_projects(self):
return self._client.get_projects()

View file

@ -1,32 +1,5 @@
from chalicelib.utils import pg_client, helper
ISSUE_TYPES = ['click_rage', 'dead_click', 'excessive_scrolling', 'bad_request', 'missing_resource', 'memory', 'cpu',
'slow_resource', 'slow_page_load', 'crash', 'ml_cpu', 'ml_memory', 'ml_dead_click', 'ml_click_rage',
'ml_mouse_thrashing', 'ml_excessive_scrolling', 'ml_slow_resources', 'custom', 'js_exception',
'custom_event_error', 'js_error']
ORDER_QUERY = """\
(CASE WHEN type = 'js_exception' THEN 0
WHEN type = 'bad_request' THEN 1
WHEN type = 'missing_resource' THEN 2
WHEN type = 'click_rage' THEN 3
WHEN type = 'dead_click' THEN 4
WHEN type = 'memory' THEN 5
WHEN type = 'cpu' THEN 6
WHEN type = 'crash' THEN 7
ELSE -1 END)::INTEGER
"""
NAME_QUERY = """\
(CASE WHEN type = 'js_exception' THEN 'Errors'
WHEN type = 'bad_request' THEN 'Bad Requests'
WHEN type = 'missing_resource' THEN 'Missing Images'
WHEN type = 'click_rage' THEN 'Click Rage'
WHEN type = 'dead_click' THEN 'Dead Clicks'
WHEN type = 'memory' THEN 'High Memory'
WHEN type = 'cpu' THEN 'High CPU'
WHEN type = 'crash' THEN 'Crashes'
ELSE type::text END)::text
"""
def get(project_id, issue_id):
with pg_client.PostgresClient() as cur:
@ -62,20 +35,6 @@ def get_by_session_id(session_id, project_id, issue_type=None):
return helper.list_to_camel_case(cur.fetchall())
def get_types_by_project(project_id):
with pg_client.PostgresClient() as cur:
cur.execute(
cur.mogrify(f"""SELECT type,
{ORDER_QUERY}>=0 AS visible,
{ORDER_QUERY} AS order,
{NAME_QUERY} AS name
FROM (SELECT DISTINCT type
FROM public.issues
WHERE project_id = %(project_id)s) AS types
ORDER BY "order";""", {"project_id": project_id}))
return helper.list_to_camel_case(cur.fetchall())
def get_all_types():
return [
{

View file

@ -1,6 +1,10 @@
import logging
from chalicelib.core.sessions import sessions_mobs, sessions_devtool
from chalicelib.utils import pg_client, helper
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.core import sessions_mobs, sessions_devtool
logger = logging.getLogger(__name__)
class Actions:
@ -150,23 +154,23 @@ def get_scheduled_jobs():
def execute_jobs():
jobs = get_scheduled_jobs()
for job in jobs:
print(f"Executing jobId:{job['jobId']}")
logger.info(f"Executing jobId:{job['jobId']}")
try:
if job["action"] == Actions.DELETE_USER_DATA:
session_ids = __get_session_ids_by_user_ids(project_id=job["projectId"],
user_ids=[job["referenceId"]])
if len(session_ids) > 0:
print(f"Deleting {len(session_ids)} sessions")
logger.info(f"Deleting {len(session_ids)} sessions")
__delete_sessions_by_session_ids(session_ids=session_ids)
__delete_session_mobs_by_session_ids(session_ids=session_ids, project_id=job["projectId"])
else:
raise Exception(f"The action '{job['action']}' not supported.")
job["status"] = JobStatus.COMPLETED
print(f"Job completed {job['jobId']}")
logger.info(f"Job completed {job['jobId']}")
except Exception as e:
job["status"] = JobStatus.FAILED
job["errors"] = str(e)
print(f"Job failed {job['jobId']}")
logger.error(f"Job failed {job['jobId']}")
update(job["jobId"], job)

View file

@ -1,75 +0,0 @@
from chalicelib.core import log_tools
import requests
from schemas import schemas
IN_TY = "bugsnag"
def list_projects(auth_token):
r = requests.get(url="https://api.bugsnag.com/user/organizations",
params={"per_page": "100"},
headers={"Authorization": "token " + auth_token, "X-Version": "2"})
if r.status_code != 200:
print("=======> bugsnag get organizations: something went wrong")
print(r)
print(r.status_code)
print(r.text)
return []
orgs = []
for i in r.json():
pr = requests.get(url="https://api.bugsnag.com/organizations/%s/projects" % i["id"],
params={"per_page": "100"},
headers={"Authorization": "token " + auth_token, "X-Version": "2"})
if pr.status_code != 200:
print("=======> bugsnag get projects: something went wrong")
print(pr)
print(r.status_code)
print(r.text)
continue
orgs.append({"name": i["name"], "projects": [{"name": p["name"], "id": p["id"]} for p in pr.json()]})
return orgs
def get_all(tenant_id):
return log_tools.get_all_by_tenant(tenant_id=tenant_id, integration=IN_TY)
def get(project_id):
return log_tools.get(project_id=project_id, integration=IN_TY)
def update(tenant_id, project_id, changes):
options = {}
if "authorizationToken" in changes:
options["authorizationToken"] = changes.pop("authorizationToken")
if "bugsnagProjectId" in changes:
options["bugsnagProjectId"] = changes.pop("bugsnagProjectId")
return log_tools.edit(project_id=project_id, integration=IN_TY, changes=options)
def add(tenant_id, project_id, authorization_token, bugsnag_project_id):
options = {
"bugsnagProjectId": bugsnag_project_id,
"authorizationToken": authorization_token,
}
return log_tools.add(project_id=project_id, integration=IN_TY, options=options)
def delete(tenant_id, project_id):
return log_tools.delete(project_id=project_id, integration=IN_TY)
def add_edit(tenant_id, project_id, data:schemas.IntegrationBugsnagSchema ):
s = get(project_id)
if s is not None:
return update(tenant_id=tenant_id, project_id=project_id,
changes={"authorizationToken": data.authorization_token,
"bugsnagProjectId": data.bugsnag_project_id})
else:
return add(tenant_id=tenant_id,
project_id=project_id,
authorization_token=data.authorization_token,
bugsnag_project_id=data.bugsnag_project_id)

Some files were not shown because too many files have changed in this diff Show more