void;
}
function GridView(props: Props) {
- const { siteId, list, selectedList, toggleSelection } = props;
+ const { siteId, list, selectedList, history } = props;
+
+ const onItemClick = (metricId: number) => {
+ const path = withSiteId(`/metrics/${metricId}`, siteId);
+ history.push(path);
+ };
return (
{list.map((metric: any) => (
@@ -17,9 +22,9 @@ function GridView(props: Props) {
key={metric.metricId}
widget={metric}
active={selectedList.includes(metric.metricId)}
- // isTemplate={true}
+ isTemplate={true}
isWidget={metric.metricType === 'predefined'}
- // onClick={() => toggleSelection(parseInt(metric.metricId))}
+ onClick={() => onItemClick(parseInt(metric.metricId))}
/>
))}
@@ -27,4 +32,4 @@ function GridView(props: Props) {
);
}
-export default GridView;
+export default withRouter(GridView);
diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx
index 29e1785e8..59a1b619a 100644
--- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx
+++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx
@@ -148,7 +148,7 @@ function WidgetForm(props: Props) {
{metric.metricType === INSIGHTS && (
<>
- issue category
+ of
)}
-
- {addOverlay && }
-
- {!props.hideName ? (
-
- ) : null}
- {isWidget && (
-
- {!isPredefined && isTimeSeries && (
- <>
-
-
- >
- )}
- {!isTemplate && (
-
- )}
-
- )}
-
-
-
-
-
+ {addOverlay &&
}
+
+ {!props.hideName ? (
+
+
-
-
+ ) : null}
+ {isWidget && (
+
+ {!isPredefined && isTimeSeries && (
+ <>
+
+
+ >
+ )}
+
+ {!isTemplate && (
+
+ )}
+
+ )}
+
+
+
+
+
+
+
);
}
diff --git a/frontend/app/components/shared/CustomDropdownOption/CustomDropdownOption.tsx b/frontend/app/components/shared/CustomDropdownOption/CustomDropdownOption.tsx
index ce25bb996..b6afe9b94 100644
--- a/frontend/app/components/shared/CustomDropdownOption/CustomDropdownOption.tsx
+++ b/frontend/app/components/shared/CustomDropdownOption/CustomDropdownOption.tsx
@@ -16,7 +16,7 @@ function CustomDropdownOption(props: Props) {
diff --git a/frontend/app/components/shared/SessionItem/SessionItem.tsx b/frontend/app/components/shared/SessionItem/SessionItem.tsx
index a59f8e5aa..1c9d756a3 100644
--- a/frontend/app/components/shared/SessionItem/SessionItem.tsx
+++ b/frontend/app/components/shared/SessionItem/SessionItem.tsx
@@ -12,6 +12,7 @@ import PlayLink from './PlayLink';
import ErrorBars from './ErrorBars';
import { assist as assistRoute, liveSession, sessions as sessionsRoute, isRoute } from 'App/routes';
import { capitalize } from 'App/utils';
+import { Duration } from 'luxon';
const ASSIST_ROUTE = assistRoute();
const ASSIST_LIVE_SESSION = liveSession();
@@ -27,7 +28,7 @@ interface Props {
userDisplayName: string;
userCountry: string;
startedAt: number;
- duration: string;
+ duration: Duration;
eventsCount: number;
errorsCount: number;
pagesCount: number;
@@ -98,8 +99,9 @@ function SessionItem(props: RouteComponentProps & Props) {
const hasUserId = userId || userAnonymousId;
const isSessions = isRoute(SESSIONS_ROUTE, location.pathname);
const isAssist =
- isRoute(ASSIST_ROUTE, location.pathname) || isRoute(ASSIST_LIVE_SESSION, location.pathname)
- || location.pathname.includes('multiview');
+ isRoute(ASSIST_ROUTE, location.pathname) ||
+ isRoute(ASSIST_LIVE_SESSION, location.pathname) ||
+ location.pathname.includes('multiview');
const isLastPlayed = lastPlayedSessionId === sessionId;
const _metaList = Object.keys(metadata)
@@ -213,7 +215,7 @@ function SessionItem(props: RouteComponentProps & Props) {
id="play-button"
data-viewed={viewed}
>
- {live && session.isCallActive && session.agentIds.length > 0 ? (
+ {live && session.isCallActive && session.agentIds!.length > 0 ? (