diff --git a/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx b/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx index 8ed5df9f4..3bbc1c022 100644 --- a/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx +++ b/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx @@ -22,23 +22,12 @@ function WidgetPreview(props: Props) { const metric: any = metricStore.instance; const isTimeSeries = metric.metricType === TIMESERIES; const isTable = metric.metricType === TABLE; - const drillDownFilter = dashboardStore.drillDownFilter; const disableVisualization = metric.metricOf === FilterKey.SESSIONS || metric.metricOf === FilterKey.ERRORS; - // const period = dashboardStore.drillDownPeriod; - const chagneViewType = (e, { name, value }: any) => { + const changeViewType = (_, { name, value }: any) => { metric.update({ [ name ]: value }); } - // const onChangePeriod = (period: any) => { - // dashboardStore.setDrillDownPeriod(period); - // const periodTimestamps = period.toTimestamps(); - // drillDownFilter.merge({ - // startTimestamp: periodTimestamps.startTimestamp, - // endTimestamp: periodTimestamps.endTimestamp, - // }) - // } - const canAddToDashboard = metric.exists() && dashboards.length > 0; return ( @@ -57,7 +46,7 @@ function WidgetPreview(props: Props) { className="my-3" primary icons={true} - onSelect={ chagneViewType } + onSelect={ changeViewType } value={{ value: metric.viewType }} list={ [ { value: 'lineChart', name: 'Chart', icon: 'graph-up-arrow' }, @@ -75,7 +64,7 @@ function WidgetPreview(props: Props) { className="my-3" primary={true} icons={true} - onSelect={ chagneViewType } + onSelect={ changeViewType } value={{ value: metric.viewType }} list={[ { value: 'table', name: 'Table', icon: 'table' }, diff --git a/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx b/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx index 316bb55e9..ebb07b49c 100644 --- a/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx +++ b/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx @@ -90,15 +90,13 @@ function WidgetSessions(props: Props) { } }, [filter.startTimestamp, filter.endTimestamp, filter.filters, depsString, metricStore.sessionsPage, metricStore.clickMapSearch]); - - return (

{metricStore.clickMapSearch ? 'Clicks' : 'Sessions'}

- {metricStore.clickMapLabel ? `"${metricStore.clickMapLabel}" ` : null} + {metricStore.clickMapLabel ? `on "${metricStore.clickMapLabel}" ` : null} between {startTime} and{' '} {endTime}{' '}
diff --git a/frontend/app/duck/user.js b/frontend/app/duck/user.js index 36c7dd778..ebb374674 100644 --- a/frontend/app/duck/user.js +++ b/frontend/app/duck/user.js @@ -132,7 +132,7 @@ export function fetchTenants() { export const fetchUserInfo = () => ({ types: FETCH_ACCOUNT.toArray(), call: client => client.get('/account'), - }); +}); export function logout() { return {