diff --git a/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx b/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx
index 97a6b78d6..30f58630a 100644
--- a/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx
+++ b/frontend/app/components/shared/SessionSettings/components/CaptureRate.tsx
@@ -26,8 +26,8 @@ function CaptureRate(props: Props) {
sessionSettings: {
captureRate,
changeCaptureRate,
- captureAll,
- changeCaptureAll,
+ conditionalCapture,
+ changeConditionalCapture,
captureConditions,
},
loadingCaptureRate,
@@ -52,8 +52,8 @@ function CaptureRate(props: Props) {
const toggleRate = () => {
setChanged(true);
- const newValue = !captureAll;
- changeCaptureAll(newValue);
+ const newValue = !conditionalCapture;
+ changeConditionalCapture(newValue);
if (newValue) {
changeCaptureRate('100');
}
@@ -62,12 +62,12 @@ function CaptureRate(props: Props) {
const onUpdate = () => {
updateCaptureConditions(projectId!, {
rate: parseInt(captureRate, 10),
- captureAll,
+ conditionalCapture: conditionalCapture,
conditions: conditions.map((c) => c.toCaptureCondition()),
}).finally(() => setChanged(false));
};
- const updateDisabled = !changed || !isAdmin || (captureAll && conditions.length === 0);
+ const updateDisabled = !changed || !isAdmin || (conditionalCapture && conditions.length === 0);
return (
- {!captureAll ? (
+ {!conditionalCapture ? (
) => {
@@ -118,7 +118,7 @@ function CaptureRate(props: Props) {
}}
value={captureRate.toString()}
style={{ height: '38px', width: '70px' }}
- disabled={captureAll}
+ disabled={conditionalCapture}
min={0}
max={100}
/>
@@ -131,7 +131,7 @@ function CaptureRate(props: Props) {
) : null}
- {captureAll && isEnterprise ? (
+ {conditionalCapture && isEnterprise ? (
{
this.sessionSettings.merge({
captureRate: data.rate,
- captureAll: data.captureAll,
+ conditionalCapture: data.conditionalCapture,
});
toast.success('Settings updated successfully');
})
@@ -58,7 +58,7 @@ export default class SettingsStore {
.then((data) => {
this.sessionSettings.merge({
captureRate: data.rate,
- captureAll: data.captureAll,
+ conditionalCapture: data.conditionalCapture,
});
this.captureRateFetched = true;
})
@@ -74,7 +74,7 @@ export default class SettingsStore {
.then((data) => {
this.sessionSettings.merge({
captureRate: data.rate,
- captureAll: data.captureAll,
+ conditionalCapture: data.conditionalCapture,
captureConditions: data.conditions,
});
})
@@ -91,7 +91,7 @@ export default class SettingsStore {
.then(({ data }) => {
this.sessionSettings.merge({
captureRate: data.rate,
- captureAll: data.captureAll,
+ conditionalCapture: data.conditionalCapture,
captureConditions: data.conditions,
});
toast.success('Settings updated successfully');
diff --git a/frontend/app/mstore/types/filterItem.ts b/frontend/app/mstore/types/filterItem.ts
index 1b00fb070..34c2560cb 100644
--- a/frontend/app/mstore/types/filterItem.ts
+++ b/frontend/app/mstore/types/filterItem.ts
@@ -60,7 +60,6 @@ export default class FilterItem {
fromJson(json: any, mainFilterKey = '') {
const isMetadata = json.type === FilterKey.METADATA;
let _filter: any = (isMetadata ? filtersMap['_' + json.source] : filtersMap[json.type]) || {};
- console.log(_filter, json);
if (this.isConditional) {
_filter = conditionalFiltersMap[json.type] || conditionalFiltersMap[json.source];
}
diff --git a/frontend/app/mstore/types/sessionSettings.ts b/frontend/app/mstore/types/sessionSettings.ts
index c31b361c8..e914e658b 100644
--- a/frontend/app/mstore/types/sessionSettings.ts
+++ b/frontend/app/mstore/types/sessionSettings.ts
@@ -70,7 +70,7 @@ export default class SessionSettings {
localStorage.getItem(DURATION_FILTER) || JSON.stringify(defaultDurationFilter)
);
captureRate: string = '0';
- captureAll: boolean = false;
+ conditionalCapture: boolean = false;
captureConditions: { name: string; captureRate: number; filters: any[] }[] = [];
mouseTrail: boolean = localStorage.getItem(MOUSE_TRAIL) !== 'false';
shownTimezone: 'user' | 'local';
@@ -108,8 +108,8 @@ export default class SessionSettings {
if (parseInt(rate, 10) <= 100) this.captureRate = `${parseInt(rate, 10)}`;
};
- changeCaptureAll = (all: boolean) => {
- this.captureAll = all;
+ changeConditionalCapture = (all: boolean) => {
+ this.conditionalCapture = all;
};
timezoneFix(defaultTimezone: Record) {
diff --git a/frontend/app/services/SessionService.ts b/frontend/app/services/SessionService.ts
index 7cbe165fc..854f84ddc 100644
--- a/frontend/app/services/SessionService.ts
+++ b/frontend/app/services/SessionService.ts
@@ -27,7 +27,7 @@ export default class SettingsService {
fetchCaptureConditions(
projectId: number
- ): Promise<{ rate: number; captureAll: boolean; conditions: any[] }> {
+ ): Promise<{ rate: number; conditionalCapture: boolean; conditions: any[] }> {
return this.client
.get(`/${projectId}/conditions`)
.then((response) => response.json())