From e53301d18ec8b24a2cf80ed626a244219050ca9f Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 7 Mar 2025 16:39:38 +0100 Subject: [PATCH 01/20] fix(chalice): debug refresh token --- api/routers/core_dynamic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/routers/core_dynamic.py b/api/routers/core_dynamic.py index a784488c6..2409c388e 100644 --- a/api/routers/core_dynamic.py +++ b/api/routers/core_dynamic.py @@ -68,6 +68,8 @@ def __process_authentication_response(response: JSONResponse, data: dict) -> dic max_age=refresh_token_max_age, secure=True, httponly=True) response.set_cookie(key="spotRefreshToken", value=spot_refresh_token, path=spot.COOKIE_PATH, max_age=spot_refresh_token_max_age, secure=True, httponly=True) + logger.warning("cookie refreshToken: %s", refresh_token) + logger.warning("cookie spotRefreshToken: %s", spot_refresh_token) return data From 87e7acecde20837942702fc98f2846fc63969f52 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 7 Mar 2025 16:39:38 +0100 Subject: [PATCH 02/20] fix(chalice): debug refresh token --- api/chalicelib/core/authorizers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/chalicelib/core/authorizers.py b/api/chalicelib/core/authorizers.py index 4f21f0433..e96fca0d5 100644 --- a/api/chalicelib/core/authorizers.py +++ b/api/chalicelib/core/authorizers.py @@ -105,6 +105,10 @@ def generate_jwt_refresh(user_id, tenant_id, iat, aud, jwt_jti, for_spot=False): key=config("JWT_REFRESH_SECRET") if not for_spot else config("JWT_SPOT_REFRESH_SECRET"), algorithm=config("JWT_ALGORITHM") ) + logger.warning("Generated JWT REF token: %s", token) + logger.warning("For spot REF: %s", for_spot) + logger.warning("Using: %s", config("JWT_REFRESH_SECRET") if not for_spot else config("JWT_SPOT_REFRESH_SECRET")) + logger.warning(aud) return token From b8d365de3dc9eeb18d669c8fbca4e1ee759b9612 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 7 Mar 2025 17:06:20 +0100 Subject: [PATCH 03/20] fix(chalice): debug refresh token --- api/routers/core_dynamic.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/routers/core_dynamic.py b/api/routers/core_dynamic.py index 2409c388e..4ab135035 100644 --- a/api/routers/core_dynamic.py +++ b/api/routers/core_dynamic.py @@ -75,11 +75,11 @@ def __process_authentication_response(response: JSONResponse, data: dict) -> dic @public_app.post('/login', tags=["authentication"]) def login_user(response: JSONResponse, data: schemas.UserLoginSchema = Body(...)): - if data.email != 'tahay@asayer.io': - raise HTTPException( - status_code=status.HTTP_401_UNAUTHORIZED, - detail="Enforced testing mode is active." - ) + # if data.email != 'tahay@asayer.io': + # raise HTTPException( + # status_code=status.HTTP_401_UNAUTHORIZED, + # detail="Enforced testing mode is active." + # ) if helper.allow_captcha() and not captcha.is_valid(data.g_recaptcha_response): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, From 90bc6bc83ed16122f32df5457e641bccedbdef2e Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 7 Mar 2025 17:12:41 +0100 Subject: [PATCH 04/20] ui: restrict meta list to 1 --- .../shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx | 4 ++-- frontend/app/components/shared/SessionItem/SessionItem.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx b/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx index b5fa32c74..c94f67310 100644 --- a/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx +++ b/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx @@ -15,7 +15,7 @@ export default function MetaMoreButton(props: Props) { (
{list.slice(maxLength).map(({ label, value }, index) => ( @@ -26,7 +26,7 @@ export default function MetaMoreButton(props: Props) { placement="bottom" >
-
{_metaList.length > 0 && ( - + )} )} From 41178ba8419f8ed32a5dc16fb89a93e67a87f59a Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 7 Mar 2025 17:50:32 +0100 Subject: [PATCH 05/20] change(ui): webpack config to use env vars --- frontend/webpack.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/webpack.config.ts b/frontend/webpack.config.ts index b54b11c7b..0eb1e86ca 100644 --- a/frontend/webpack.config.ts +++ b/frontend/webpack.config.ts @@ -8,8 +8,8 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import CompressionPlugin from "compression-webpack-plugin"; import { EsbuildPlugin } from 'esbuild-loader'; -const dotenv = require('dotenv').config({ path: __dirname + '/.env' }) const isDevelopment = process.env.NODE_ENV !== 'production' +const dotenv = require('dotenv').config({ path: __dirname + (isDevelopment ? '/.env' : '/.env.production') }); const stylesHandler = MiniCssExtractPlugin.loader; const ENV_VARIABLES = JSON.stringify(dotenv.parsed); import pathAlias from './path-alias'; From 6852d63cdb1516d29a3f3355314e4aff7e237aa4 Mon Sep 17 00:00:00 2001 From: Andrey Babushkin <55714097+reyand43@users.noreply.github.com> Date: Fri, 7 Mar 2025 17:58:00 +0100 Subject: [PATCH 06/20] fix localised errors (#3117) --- .../Client/Integrations/GithubForm.tsx | 2 +- .../Tracker/GraphQLDoc/GraphQLDoc.tsx | 2 +- .../app/components/Client/Sites/Sites.tsx | 2 +- .../CustomMetricsWidgets/AreaChart.tsx | 4 +++- .../WidgetSubDetailsView.tsx | 4 +++- .../Header/SettingsMenu/SettingsMenu.tsx | 20 ++++++++++-------- ...tCodeSnippet.js => ProjectCodeSnippet.tsx} | 10 ++++----- ...tCodeSnippet.js => ProjectCodeSnippet.tsx} | 0 frontend/app/locales/en.json | 5 ++++- frontend/app/locales/es.json | 5 ++++- frontend/app/locales/fr.json | 5 ++++- frontend/app/locales/ru.json | 7 ++++-- frontend/app/locales/zh.json | 5 ++++- tracker/tracker-assist/.yarn/install-state.gz | Bin 543451 -> 516193 bytes tracker/tracker/.yarn/install-state.gz | Bin 554860 -> 520749 bytes 15 files changed, 46 insertions(+), 25 deletions(-) rename frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/{ProjectCodeSnippet.js => ProjectCodeSnippet.tsx} (95%) rename frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/{ProjectCodeSnippet.js => ProjectCodeSnippet.tsx} (100%) diff --git a/frontend/app/components/Client/Integrations/GithubForm.tsx b/frontend/app/components/Client/Integrations/GithubForm.tsx index d8d1f4d4c..03b69cd91 100644 --- a/frontend/app/components/Client/Integrations/GithubForm.tsx +++ b/frontend/app/components/Client/Integrations/GithubForm.tsx @@ -27,7 +27,7 @@ function GithubForm(props) {
diff --git a/frontend/app/components/Client/Integrations/Tracker/GraphQLDoc/GraphQLDoc.tsx b/frontend/app/components/Client/Integrations/Tracker/GraphQLDoc/GraphQLDoc.tsx index e47ab0c4a..dd704b0bf 100644 --- a/frontend/app/components/Client/Integrations/Tracker/GraphQLDoc/GraphQLDoc.tsx +++ b/frontend/app/components/Client/Integrations/Tracker/GraphQLDoc/GraphQLDoc.tsx @@ -78,7 +78,7 @@ export const recordGraphQL = tracker.use(trackerGraphQL());`; diff --git a/frontend/app/components/Client/Sites/Sites.tsx b/frontend/app/components/Client/Sites/Sites.tsx index 4fc871d07..e540d409a 100644 --- a/frontend/app/components/Client/Sites/Sites.tsx +++ b/frontend/app/components/Client/Sites/Sites.tsx @@ -155,7 +155,7 @@ function Sites() { } /> diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/AreaChart.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/AreaChart.tsx index bebb3f905..a320e6279 100644 --- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/AreaChart.tsx +++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/AreaChart.tsx @@ -11,6 +11,7 @@ import { } from 'recharts'; import CustomTooltip from './CustomChartTooltip'; import { Styles } from '../common'; +import { useTranslation } from 'react-i18next'; interface Props { data: { chart: any[]; namesMap: string[] }; @@ -23,6 +24,7 @@ interface Props { } function CustomAreaChart(props: Props) { + const { t } = useTranslation(); const { data = { chart: [], namesMap: [] }, colors, @@ -85,7 +87,7 @@ function CustomAreaChart(props: Props) { tickFormatter={(val) => Styles.tickFormatter(val)} label={{ ...Styles.axisLabelLeft, - value: label || 'Number of Sessions', + value: label || t('Number of Sessions'), }} /> ) { + const { t } = useTranslation(); const { history, account, className }: any = props; const isAdmin = account.admin || account.superAdmin; const isEnterprise = account.edition === 'ee'; @@ -40,33 +42,33 @@ function SettingsMenu(props: RouteComponentProps) {
navigateTo('sessions-listing')} - label="Sessions Listing" + label={t('Sessions Listing')} icon="folder2" /> navigateTo('integrations')} - label="Integrations" + label={t('Integrations')} icon="puzzle" /> navigateTo('metadata')} - label="Metadata" + label={t('Metadata')} icon="tags" /> navigateTo('webhooks')} - label="Webhooks" + label={t('Webhooks')} icon="link-45deg" /> navigateTo('projects')} - label="Projects" + label={t('Projects')} icon="folder2" /> {isAdmin && ( navigateTo('team')} - label="Team" + label={t('Team')} icon="users" /> )} @@ -74,19 +76,19 @@ function SettingsMenu(props: RouteComponentProps) { <> navigateTo('roles')} - label="Roles & Access" + label={t('Roles & Access')} icon="diagram-3" /> navigateTo('audit')} - label="Audit" + label={t('Audit')} icon="list-ul" /> )} navigateTo('notifications')} - label="Notifications" + label={t('Notifications')} icon="bell-slash" />
diff --git a/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js b/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.tsx similarity index 95% rename from frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js rename to frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.tsx index e39da3259..8d7e52701 100644 --- a/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.js +++ b/frontend/app/components/Onboarding/components/OnboardingTabs/ProjectCodeSnippet/ProjectCodeSnippet.tsx @@ -10,10 +10,10 @@ import stl from './projectCodeSnippet.module.css'; import CircleNumber from '../../CircleNumber'; import { useTranslation } from 'react-i18next'; -const inputModeOptions = (t) => [ - { label: t('Record all inputs'), value: 'plain' }, - { label: t('Ignore all inputs'), value: 'obscured' }, - { label: t('Obscure all inputs'), value: 'hidden' }, +const inputModeOptions = [ + { label: 'Record all inputs', value: 'plain' }, + { label: 'Ignore all inputs', value: 'obscured' }, + { label: 'Obscure all inputs', value: 'hidden' }, ]; const inputModeOptionsMap = {}; @@ -74,7 +74,7 @@ function ProjectCodeSnippet() {