),
width: '16.67%',
dataIndex: 'isPublic',
render: (isPublic: boolean) => (
-
}>
{isPublic ? 'Team' : 'Private'}
),
},
];
+
+ const emptyDescription = dashboardsSearch !== '' ? (
+
+ );
+
+ const emptyImage = dashboardsSearch !== '' ? ICONS.NO_RESULTS : ICONS.NO_DASHBOARDS;
+ const imageDimensions = dashboardsSearch !== '' ? searchImageDimensions : defaultImageDimensions;
+
return (
list.length === 0 && !dashboardStore.filter.showMine ? (
+
)
+ />
+ )
);
-
+
}
export default connect((state: any) => ({
diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx
index e0ad2048c..219145c18 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardSearch.tsx
@@ -29,7 +29,7 @@ function DashboardSearch() {
allowClear
name="dashboardsSearch"
className="w-full"
- placeholder="Filter by title or description"
+ placeholder="Filter by dashboard title"
onChange={write}
onSearch={(value) => dashboardStore.updateKey('filter', { ...dashboardStore.filter, query: value })}
/>
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx
index 887b82299..e000bd2d8 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx
@@ -52,7 +52,7 @@ function CardsLibrary(props: Props) {
onItemClick(metric.metricId)}>
-
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx
index 5ab52b1cc..777f02175 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx
@@ -1,761 +1,739 @@
-import ExampleFunnel from "./Examples/Funnel";
-import ExamplePath from "./Examples/Path";
-import ExampleTrend from "./Examples/Trend";
-import Trend from "./Examples/Trend";
-import PerfBreakdown from "./Examples/PerfBreakdown";
-import ByBrowser from "./Examples/SessionsBy/ByBrowser";
-import BySystem from "./Examples/SessionsBy/BySystem";
-import ByCountry from "./Examples/SessionsBy/ByCountry";
-import ByUrl from "./Examples/SessionsBy/ByUrl";
-import {ERRORS, FUNNEL, INSIGHTS, PERFORMANCE, TABLE, TIMESERIES, USER_PATH, WEB_VITALS} from "App/constants/card";
-import {FilterKey} from "Types/filter/filterType";
-import {Activity, BarChart, TableCellsMerge, TrendingUp} from "lucide-react";
-import WebVital from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/WebVital";
-import Bars from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/Bars";
-import ByIssues from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByIssues";
-import InsightsExample from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/InsightsExample";
-import ByUser from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUser";
-import BarChartCard from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/BarChart";
-import AreaChartCard from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard";
+import ExampleFunnel from './Examples/Funnel';
+import ExamplePath from './Examples/Path';
+import ExampleTrend from './Examples/Trend';
+import Trend from './Examples/Trend';
+import PerfBreakdown from './Examples/PerfBreakdown';
+import ByBrowser from './Examples/SessionsBy/ByBrowser';
+import BySystem from './Examples/SessionsBy/BySystem';
+import ByCountry from './Examples/SessionsBy/ByCountry';
+import ByUrl from './Examples/SessionsBy/ByUrl';
+import { ERRORS, FUNNEL, INSIGHTS, PERFORMANCE, TABLE, TIMESERIES, USER_PATH, WEB_VITALS } from 'App/constants/card';
+import { FilterKey } from 'Types/filter/filterType';
+import { Activity, BarChart, TableCellsMerge, TrendingUp } from 'lucide-react';
+import WebVital from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/WebVital';
+import Bars from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/Bars';
+import ByIssues from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByIssues';
+import InsightsExample from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/InsightsExample';
+import ByUser from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUser';
+import BarChartCard from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/BarChart';
+import AreaChartCard from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard';
import CallsWithErrorsExample
- from "Components/Dashboard/components/DashboardList/NewDashModal/Examples/CallsWithErrorsExample";
+ from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/CallsWithErrorsExample';
+import SessionsPerBrowserExample
+ from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsPerBrowserExample';
+import SlowestDomains
+ from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/SlowestDomains';
+import SpeedIndexByLocationExample
+ from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/SpeedIndexByLocationExample';
export const CARD_CATEGORY = {
- PRODUCT_ANALYTICS: 'product-analytics',
- PERFORMANCE_MONITORING: 'performance-monitoring',
- WEB_ANALYTICS: 'web-analytics',
- ERROR_TRACKING: 'error-tracking',
- WEB_VITALS: 'web-vitals',
-}
+ PRODUCT_ANALYTICS: 'product-analytics',
+ PERFORMANCE_MONITORING: 'performance-monitoring',
+ WEB_ANALYTICS: 'web-analytics',
+ ERROR_TRACKING: 'error-tracking',
+ WEB_VITALS: 'web-vitals'
+};
export const CARD_CATEGORIES = [
- {key: CARD_CATEGORY.PRODUCT_ANALYTICS, label: 'Product Analytics', icon: TrendingUp, types: [USER_PATH, ERRORS]},
- {key: CARD_CATEGORY.PERFORMANCE_MONITORING, label: 'Performance Monitoring', icon: Activity, types: [TIMESERIES]},
- {key: CARD_CATEGORY.WEB_ANALYTICS, label: 'Web Analytics', icon: BarChart, types: [TABLE]},
- {key: CARD_CATEGORY.ERROR_TRACKING, label: 'Errors Tracking', icon: TableCellsMerge, types: [WEB_VITALS]},
- {key: CARD_CATEGORY.WEB_VITALS, label: 'Web Vitals', icon: TableCellsMerge, types: [WEB_VITALS]}
+ { key: CARD_CATEGORY.PRODUCT_ANALYTICS, label: 'Product Analytics', icon: TrendingUp, types: [USER_PATH, ERRORS] },
+ { key: CARD_CATEGORY.PERFORMANCE_MONITORING, label: 'Performance Monitoring', icon: Activity, types: [TIMESERIES] },
+ { key: CARD_CATEGORY.WEB_ANALYTICS, label: 'Web Analytics', icon: BarChart, types: [TABLE] },
+ { key: CARD_CATEGORY.ERROR_TRACKING, label: 'Errors Tracking', icon: TableCellsMerge, types: [WEB_VITALS] },
+ { key: CARD_CATEGORY.WEB_VITALS, label: 'Web Vitals', icon: TableCellsMerge, types: [WEB_VITALS] }
];
export interface CardType {
- title: string;
- key: string;
- cardType: string;
- category: string;
- example: any;
- metricOf?: string;
- width?: number;
- data?: any;
- height?: number;
+ title: string;
+ key: string;
+ cardType: string;
+ category: string;
+ example: any;
+ metricOf?: string;
+ width?: number;
+ data?: any;
+ height?: number;
+ isEnterprise?: boolean;
}
export const CARD_LIST: CardType[] = [
- {
- title: 'Funnel',
- key: FUNNEL,
- cardType: FUNNEL,
- category: CARD_CATEGORIES[0].key,
- example: ExampleFunnel,
- width: 4,
- height: 356,
- data: {
- stages: [
- {
- "value": [
- "/sessions"
- ],
- "type": "location",
- "operator": "contains",
- "sessionsCount": 1586,
- "dropPct": null,
- "usersCount": 470,
- "dropDueToIssues": 0
- },
- {
- "value": [],
- "type": "click",
- "operator": "onAny",
- "sessionsCount": 1292,
- "dropPct": 18,
- "usersCount": 450,
- "dropDueToIssues": 294
- }
- ],
- totalDropDueToIssues: 294
+ {
+ title: 'Funnel',
+ key: FUNNEL,
+ cardType: FUNNEL,
+ category: CARD_CATEGORIES[0].key,
+ example: ExampleFunnel,
+ width: 4,
+ height: 356,
+ data: {
+ stages: [
+ {
+ 'value': [
+ '/sessions'
+ ],
+ 'type': 'location',
+ 'operator': 'contains',
+ 'sessionsCount': 1586,
+ 'dropPct': null,
+ 'usersCount': 470,
+ 'dropDueToIssues': 0
+ },
+ {
+ 'value': [],
+ 'type': 'click',
+ 'operator': 'onAny',
+ 'sessionsCount': 1292,
+ 'dropPct': 18,
+ 'usersCount': 450,
+ 'dropDueToIssues': 294
}
+ ],
+ totalDropDueToIssues: 294
+ }
+ },
+ {
+ title: 'Path Finder',
+ key: USER_PATH,
+ cardType: USER_PATH,
+ category: CARD_CATEGORIES[0].key,
+ example: ExamplePath
+ },
+ {
+ title: 'Sessions Trend',
+ key: TIMESERIES,
+ cardType: TIMESERIES,
+ metricOf: 'sessionCount',
+ category: CARD_CATEGORIES[0].key,
+ data: {
+ chart: generateTimeSeriesData(),
+ label: 'Number of Sessions',
+ namesMap: [
+ 'Series 1'
+ ]
},
- {
- title: 'Path Finder',
- key: USER_PATH,
- cardType: USER_PATH,
- category: CARD_CATEGORIES[0].key,
- example: ExamplePath,
+ example: ExampleTrend
+ },
+
+ {
+ title: 'Sessions by Issues',
+ key: FilterKey.ISSUE,
+ cardType: TABLE,
+ metricOf: FilterKey.ISSUE,
+ category: CARD_CATEGORIES[0].key,
+ example: ByIssues
+ },
+
+ {
+ title: 'Insights',
+ key: INSIGHTS,
+ cardType: INSIGHTS,
+ metricOf: 'issueCategories',
+ category: CARD_CATEGORIES[0].key,
+ width: 4,
+ isEnterprise: true,
+ example: InsightsExample
+ },
+
+ // Performance Monitoring
+ {
+ title: 'CPU Load',
+ key: FilterKey.CPU,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.CPU,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'CPU Load (%)',
+ namesMap: [
+ 'Series 1'
+ ]
},
- {
- title: 'Sessions Trend',
- key: TIMESERIES,
- cardType: TIMESERIES,
- metricOf: 'sessionCount',
- category: CARD_CATEGORIES[0].key,
- data: {
- chart: generateTimeSeriesData(),
- label: "Number of Sessions",
- namesMap: [
- "Series 1"
- ]
+ example: AreaChartCard
+ },
+
+ {
+ title: 'Crashes',
+ key: FilterKey.CRASHES,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.CRASHES,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+ {
+ title: 'Framerate',
+ key: FilterKey.FPS,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.FPS,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'Frames Per Second',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+ {
+ title: 'DOM Building Time',
+ key: FilterKey.PAGES_DOM_BUILD_TIME,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.PAGES_DOM_BUILD_TIME,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'DOM Build Time (ms)',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+ {
+ title: 'Memory Consumption',
+ key: FilterKey.MEMORY_CONSUMPTION,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.MEMORY_CONSUMPTION,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'JS Heap Size (MB)',
+ unit: 'mb',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+ {
+ title: 'Page Response Time',
+ key: FilterKey.PAGES_RESPONSE_TIME,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.PAGES_RESPONSE_TIME,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'Page Response Time (ms)',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+ {
+ title: 'Page Response Time Distribution',
+ key: FilterKey.PAGES_RESPONSE_TIME_DISTRIBUTION,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.PAGES_RESPONSE_TIME_DISTRIBUTION,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateBarChartData(),
+ label: 'Number of Calls',
+ unit: 'ms',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: BarChartCard
+ },
+
+ {
+ title: 'Resources vs Visually Completed',
+ key: FilterKey.RESOURCES_VS_VISUALLY_COMPLETE,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.RESOURCES_VS_VISUALLY_COMPLETE,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateBarChartData(),
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: BarChartCard
+ },
+
+ {
+ title: 'Sessions by Browser & Version',
+ key: FilterKey.SESSIONS_PER_BROWSER,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.SESSIONS_PER_BROWSER,
+ category: CARD_CATEGORIES[1].key,
+ data: generateRandomBarsData(),
+ example: SessionsPerBrowserExample
+ },
+
+ {
+ title: 'Slowest Domains',
+ key: FilterKey.SLOWEST_DOMAINS,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.SLOWEST_DOMAINS,
+ category: CARD_CATEGORIES[1].key,
+ // data: generateRandomBarsData(),
+ example: SlowestDomains
+ },
+
+ {
+ title: 'Speed Index by Location',
+ key: FilterKey.SPEED_LOCATION,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.SPEED_LOCATION,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: SpeedIndexByLocationExample
+ },
+
+ {
+ title: 'Time to Render',
+ key: FilterKey.TIME_TO_RENDER,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.TIME_TO_RENDER,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'Time to Render (ms)',
+ unit: 'ms',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+ {
+ title: 'Sessions Impacted by Slow Pages',
+ key: FilterKey.IMPACTED_SESSIONS_BY_SLOW_PAGES,
+ cardType: PERFORMANCE,
+ metricOf: FilterKey.IMPACTED_SESSIONS_BY_SLOW_PAGES,
+ category: CARD_CATEGORIES[1].key,
+ data: {
+ chart: generateAreaData(),
+ label: 'Number of Sessions',
+ namesMap: [
+ 'Series 1'
+ ]
+ },
+ example: AreaChartCard
+ },
+
+
+ // Web analytics
+ {
+ title: 'Sessions by Users',
+ key: FilterKey.USERID,
+ cardType: TABLE,
+ metricOf: FilterKey.USERID,
+ category: CARD_CATEGORIES[2].key,
+ example: ByUser
+ },
+
+ {
+ title: 'Sessions by Browser',
+ key: FilterKey.USER_BROWSER,
+ cardType: TABLE,
+ metricOf: FilterKey.USER_BROWSER,
+ category: CARD_CATEGORIES[2].key,
+ example: ByBrowser
+ },
+ // {
+ // title: 'Sessions by System',
+ // key: TYPE.SESSIONS_BY_SYSTEM,
+ // cardType: TABLE,
+ // metricOf: FilterKey.USER_OS,
+ // category: CARD_CATEGORIES[2].key,
+ // example: BySystem,
+ // },
+ {
+ title: 'Sessions by Country',
+ key: FilterKey.USER_COUNTRY,
+ cardType: TABLE,
+ metricOf: FilterKey.USER_COUNTRY,
+ category: CARD_CATEGORIES[2].key,
+ example: ByCountry
+ },
+
+ {
+ title: 'Sessions by Device',
+ key: FilterKey.USER_DEVICE,
+ cardType: TABLE,
+ metricOf: FilterKey.USER_DEVICE,
+ category: CARD_CATEGORIES[2].key,
+ example: BySystem
+ },
+ {
+ title: 'Sessions by URL',
+ key: FilterKey.LOCATION,
+ cardType: TABLE,
+ metricOf: FilterKey.LOCATION,
+ category: CARD_CATEGORIES[2].key,
+ example: ByUrl
+ },
+
+ // Errors Tracking
+ {
+ title: 'JS Errors',
+ key: FilterKey.IMPACTED_SESSIONS_BY_JS_ERRORS,
+ cardType: ERRORS,
+ metricOf: FilterKey.IMPACTED_SESSIONS_BY_JS_ERRORS,
+ category: CARD_CATEGORIES[3].key,
+ data: {
+ chart: generateBarChartData()
+ },
+ example: BarChartCard
+ },
+ {
+ title: 'Errors by Origin',
+ key: FilterKey.RESOURCES_BY_PARTY,
+ cardType: ERRORS,
+ metricOf: FilterKey.RESOURCES_BY_PARTY,
+ category: CARD_CATEGORIES[3].key,
+ data: {
+ chart: generateBarChartData()
+ },
+ example: BarChartCard
+ },
+ {
+ title: 'Errors by Domain',
+ key: FilterKey.ERRORS_PER_DOMAINS,
+ cardType: ERRORS,
+ metricOf: FilterKey.ERRORS_PER_DOMAINS,
+ category: CARD_CATEGORIES[3].key,
+ example: SlowestDomains
+ // data: generateRandomBarsData(),
+ },
+ {
+ title: 'Errors by Type',
+ key: FilterKey.ERRORS_PER_TYPE,
+ cardType: ERRORS,
+ metricOf: FilterKey.ERRORS_PER_TYPE,
+ category: CARD_CATEGORIES[3].key,
+ data: {
+ chart: generateBarChartData()
+ },
+ example: BarChartCard
+ },
+ {
+ title: 'Calls with Errors',
+ key: FilterKey.CALLS_ERRORS,
+ cardType: ERRORS,
+ metricOf: FilterKey.CALLS_ERRORS,
+ category: CARD_CATEGORIES[3].key,
+ width: 4,
+ data: {
+ chart: [
+ {
+ 'method': 'GET',
+ 'urlHostpath': 'https://openreplay.com',
+ 'allRequests': 1333,
+ '4xx': 1333,
+ '5xx': 0
},
- example: ExampleTrend,
- },
-
- {
- title: 'Sessions by Issues',
- key: FilterKey.ISSUE,
- cardType: TABLE,
- metricOf: FilterKey.ISSUE,
- category: CARD_CATEGORIES[0].key,
- example: ByIssues,
- },
-
- {
- title: 'Insights',
- key: INSIGHTS,
- cardType: INSIGHTS,
- metricOf: 'issueCategories',
- category: CARD_CATEGORIES[0].key,
- width: 4,
- example: InsightsExample,
- },
-
- // Performance Monitoring
- {
- title: 'CPU Load',
- key: FilterKey.CPU,
- cardType: PERFORMANCE,
- metricOf: FilterKey.CPU,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- label: "CPU Load (%)",
- namesMap: [
- "Series 1"
- ]
+ {
+ 'method': 'POST',
+ 'urlHostpath': 'https://company.domain.com',
+ 'allRequests': 10,
+ '4xx': 10,
+ '5xx': 0
},
- example: AreaChartCard,
+ {
+ 'method': 'PUT',
+ 'urlHostpath': 'https://example.com',
+ 'allRequests': 3,
+ '4xx': 3,
+ '5xx': 0
+ }
+ ]
},
+ example: CallsWithErrorsExample
+ },
- {
- title: 'Crashes',
- key: FilterKey.CRASHES,
- cardType: PERFORMANCE,
- metricOf: FilterKey.CRASHES,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
+ {
+ title: '4xx Domains',
+ key: FilterKey.DOMAINS_ERRORS_4XX,
+ cardType: ERRORS,
+ metricOf: FilterKey.DOMAINS_ERRORS_4XX,
+ category: CARD_CATEGORIES[3].key,
+ data: {
+ chart: generateTimeSeriesData(),
+ label: 'Number of Errors',
+ namesMap: [
+ 'Series 1'
+ ]
},
+ example: ExampleTrend
+ },
- {
- title: 'Framerate',
- key: FilterKey.FPS,
- cardType: PERFORMANCE,
- metricOf: FilterKey.FPS,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- label: "Frames Per Second",
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'DOM Building Time',
- key: FilterKey.PAGES_DOM_BUILD_TIME,
- cardType: PERFORMANCE,
- metricOf: FilterKey.PAGES_DOM_BUILD_TIME,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- label: "DOM Build Time (ms)",
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'Memory Consumption',
- key: FilterKey.MEMORY_CONSUMPTION,
- cardType: PERFORMANCE,
- metricOf: FilterKey.MEMORY_CONSUMPTION,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- label: "JS Heap Size (MB)",
- unit: 'mb',
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'Page Response Time',
- key: FilterKey.PAGES_RESPONSE_TIME,
- cardType: PERFORMANCE,
- metricOf: FilterKey.PAGES_RESPONSE_TIME,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- label: "Page Response Time (ms)",
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'Page Response Time Distribution',
- key: FilterKey.PAGES_RESPONSE_TIME_DISTRIBUTION,
- cardType: PERFORMANCE,
- metricOf: FilterKey.PAGES_RESPONSE_TIME_DISTRIBUTION,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- label: "Number of Calls",
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'Resources vs Visually Completed',
- key: FilterKey.RESOURCES_VS_VISUALLY_COMPLETE,
- cardType: PERFORMANCE,
- metricOf: FilterKey.RESOURCES_VS_VISUALLY_COMPLETE,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateBarChartDate(),
- namesMap: [
- "Series 1"
- ]
- },
- example: BarChartCard,
- },
-
- {
- title: 'Sessions per Browser',
- key: FilterKey.SESSIONS_PER_BROWSER,
- cardType: PERFORMANCE,
- metricOf: FilterKey.SESSIONS_PER_BROWSER,
- category: CARD_CATEGORIES[1].key,
- data: generateRandomBarsData(),
- example: Bars,
- },
-
- {
- title: 'Slowest Domains',
- key: FilterKey.SLOWEST_DOMAINS,
- cardType: PERFORMANCE,
- metricOf: FilterKey.SLOWEST_DOMAINS,
- category: CARD_CATEGORIES[1].key,
- data: generateRandomBarsData(),
- example: Bars,
- },
-
- {
- title: 'Speed Index by Location',
- key: FilterKey.SPEED_LOCATION,
- cardType: PERFORMANCE,
- metricOf: FilterKey.SPEED_LOCATION,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'Time to Render',
- key: FilterKey.TIME_TO_RENDER,
- cardType: PERFORMANCE,
- metricOf: FilterKey.TIME_TO_RENDER,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
- },
-
- {
- title: 'Sessions Impacted by Slow Pages',
- key: FilterKey.IMPACTED_SESSIONS_BY_SLOW_PAGES,
- cardType: PERFORMANCE,
- metricOf: FilterKey.IMPACTED_SESSIONS_BY_SLOW_PAGES,
- category: CARD_CATEGORIES[1].key,
- data: {
- chart: generateAreaData(),
- namesMap: [
- "Series 1"
- ]
- },
- example: AreaChartCard,
+ {
+ title: '5xx Domains',
+ key: FilterKey.DOMAINS_ERRORS_5XX,
+ cardType: ERRORS,
+ metricOf: FilterKey.DOMAINS_ERRORS_5XX,
+ category: CARD_CATEGORIES[3].key,
+ data: {
+ chart: generateTimeSeriesData(),
+ label: 'Number of Errors',
+ namesMap: [
+ 'Series 1'
+ ]
},
+ example: ExampleTrend
+ },
- // Web analytics
- {
- title: 'Sessions by Users',
- key: FilterKey.USERID,
- cardType: TABLE,
- metricOf: FilterKey.USERID,
- category: CARD_CATEGORIES[2].key,
- example: ByUser,
- },
+ // Web vitals
+ {
+ title: 'Avg. CPU Load',
+ key: FilterKey.AVG_CPU,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_CPU,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
+ {
+ title: 'Avg. DOM Content Load Time',
+ key: FilterKey.AVG_DOM_CONTENT_LOADED,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_DOM_CONTENT_LOADED,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'Sessions by Browser',
- key: FilterKey.USER_BROWSER,
- cardType: TABLE,
- metricOf: FilterKey.USER_BROWSER,
- category: CARD_CATEGORIES[2].key,
- example: ByBrowser,
- },
- // {
- // title: 'Sessions by System',
- // key: TYPE.SESSIONS_BY_SYSTEM,
- // cardType: TABLE,
- // metricOf: FilterKey.USER_OS,
- // category: CARD_CATEGORIES[2].key,
- // example: BySystem,
- // },
- {
- title: 'Sessions by Country',
- key: FilterKey.USER_COUNTRY,
- cardType: TABLE,
- metricOf: FilterKey.USER_COUNTRY,
- category: CARD_CATEGORIES[2].key,
- example: ByCountry,
- },
+ {
+ title: 'DOM Content Loaded Start',
+ key: FilterKey.AVG_DOM_CONTENT_LOAD_START,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_DOM_CONTENT_LOAD_START,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'Sessions by Device',
- key: FilterKey.USER_DEVICE,
- cardType: TABLE,
- metricOf: FilterKey.USER_DEVICE,
- category: CARD_CATEGORIES[2].key,
- example: BySystem,
- },
- {
- title: 'Sessions by URL',
- key: FilterKey.LOCATION,
- cardType: TABLE,
- metricOf: FilterKey.LOCATION,
- category: CARD_CATEGORIES[2].key,
- example: ByUrl,
- },
+ {
+ title: 'Avg. First Meaningful Paint Time',
+ key: FilterKey.AVG_FIRST_CONTENTFUL_PIXEL,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_FIRST_CONTENTFUL_PIXEL,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- // Errors Tracking
- {
- title: 'JS Errors',
- key: FilterKey.IMPACTED_SESSIONS_BY_JS_ERRORS,
- cardType: ERRORS,
- metricOf: FilterKey.IMPACTED_SESSIONS_BY_JS_ERRORS,
- category: CARD_CATEGORIES[3].key,
- data: {
- chart: generateBarChartDate(),
- },
- example: BarChartCard,
- },
- {
- title: 'Errors by Origin',
- key: FilterKey.RESOURCES_BY_PARTY,
- cardType: ERRORS,
- metricOf: FilterKey.RESOURCES_BY_PARTY,
- category: CARD_CATEGORIES[3].key,
- data: {
- chart: generateBarChartDate(),
- },
- example: BarChartCard,
- },
- {
- title: 'Errors by Domain',
- key: FilterKey.ERRORS_PER_DOMAINS,
- cardType: ERRORS,
- metricOf: FilterKey.ERRORS_PER_DOMAINS,
- category: CARD_CATEGORIES[3].key,
- example: Bars,
- data: generateRandomBarsData(),
- },
- {
- title: 'Errors by Type',
- key: FilterKey.ERRORS_PER_TYPE,
- cardType: ERRORS,
- metricOf: FilterKey.ERRORS_PER_TYPE,
- category: CARD_CATEGORIES[3].key,
- data: {
- chart: generateBarChartDate(),
- },
- example: BarChartCard,
- },
- {
- title: 'Calls with Errors',
- key: FilterKey.CALLS_ERRORS,
- cardType: ERRORS,
- metricOf: FilterKey.CALLS_ERRORS,
- category: CARD_CATEGORIES[3].key,
- width: 4,
- data: {
- chart: [
- {
- "method": "GET",
- "urlHostpath": 'https://openreplay.com',
- "allRequests": 1333,
- "4xx": 1333,
- "5xx": 0
- },
- {
- "method": "POST",
- "urlHostpath": 'https://company.domain.com',
- "allRequests": 10,
- "4xx": 10,
- "5xx": 0
- },
- {
- "method": "PUT",
- "urlHostpath": 'https://example.com',
- "allRequests": 3,
- "4xx": 3,
- "5xx": 0
- }
- ],
- },
- example: CallsWithErrorsExample,
- },
+ {
+ title: 'Avg. First Paint Time',
+ key: FilterKey.AVG_FIRST_PAINT,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_FIRST_PAINT,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: '4xx Domains',
- key: FilterKey.DOMAINS_ERRORS_4XX,
- cardType: ERRORS,
- metricOf: FilterKey.DOMAINS_ERRORS_4XX,
- category: CARD_CATEGORIES[3].key,
- data: {
- chart: generateTimeSeriesData(),
- label: "Number of Errors",
- namesMap: [
- "Series 1"
- ]
- },
- example: ExampleTrend,
- },
+ {
+ title: 'Avg. Frame Rate',
+ key: FilterKey.AVG_FPS,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_FPS,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: '5xx Domains',
- key: FilterKey.DOMAINS_ERRORS_5XX,
- cardType: ERRORS,
- metricOf: FilterKey.DOMAINS_ERRORS_5XX,
- category: CARD_CATEGORIES[3].key,
- data: {
- chart: generateTimeSeriesData(),
- label: "Number of Errors",
- namesMap: [
- "Series 1"
- ]
- },
- example: ExampleTrend,
- },
+ {
+ title: 'Avg. Load Time of Images',
+ key: FilterKey.AVG_IMAGE_LOAD_TIME,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_IMAGE_LOAD_TIME,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
+ {
+ title: 'Avg. Load Time of Pages',
+ key: FilterKey.AVG_PAGE_LOAD_TIME,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_PAGE_LOAD_TIME,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- // Web vitals
- {
- title: 'CPU Load',
- key: FilterKey.AVG_CPU,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_CPU,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
- {
- title: 'DOM Content Loaded',
- key: FilterKey.AVG_DOM_CONTENT_LOADED,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_DOM_CONTENT_LOADED,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Avg. DOM Build Time',
+ key: FilterKey.AVG_PAGES_DOM_BUILD_TIME,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_PAGES_DOM_BUILD_TIME,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'DOM Content Loaded Start',
- key: FilterKey.AVG_DOM_CONTENT_LOAD_START,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_DOM_CONTENT_LOAD_START,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Page Response Time',
+ key: FilterKey.AVG_PAGES_RESPONSE_TIME,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_PAGES_RESPONSE_TIME,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'First Meaningful Paint',
- key: FilterKey.AVG_FIRST_CONTENTFUL_PIXEL,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_FIRST_CONTENTFUL_PIXEL,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Request Load Time',
+ key: FilterKey.AVG_REQUEST_LOADT_IME,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_REQUEST_LOADT_IME,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
+ {
+ title: 'Response Time',
+ key: FilterKey.AVG_RESPONSE_TIME,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_RESPONSE_TIME,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'First Paint',
- key: FilterKey.AVG_FIRST_PAINT,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_FIRST_PAINT,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Session Duration',
+ key: FilterKey.AVG_SESSION_DURATION,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_SESSION_DURATION,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'Frame Rate',
- key: FilterKey.AVG_FPS,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_FPS,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Time Till First Byte',
+ key: FilterKey.AVG_TILL_FIRST_BYTE,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_TILL_FIRST_BYTE,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'Image Load Time',
- key: FilterKey.AVG_IMAGE_LOAD_TIME,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_IMAGE_LOAD_TIME,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Time to be Interactive',
+ key: FilterKey.AVG_TIME_TO_INTERACTIVE,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_TIME_TO_INTERACTIVE,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'Page Load Time',
- key: FilterKey.AVG_PAGE_LOAD_TIME,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_PAGE_LOAD_TIME,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
+ {
+ title: 'Time to Render',
+ key: FilterKey.AVG_TIME_TO_RENDER,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_TIME_TO_RENDER,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ },
- {
- title: 'DOM Build Time',
- key: FilterKey.AVG_PAGES_DOM_BUILD_TIME,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_PAGES_DOM_BUILD_TIME,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'Page Response Time',
- key: FilterKey.AVG_PAGES_RESPONSE_TIME,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_PAGES_RESPONSE_TIME,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'Request Load Time',
- key: FilterKey.AVG_REQUEST_LOADT_IME,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_REQUEST_LOADT_IME,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
- {
- title: 'Response Time',
- key: FilterKey.AVG_RESPONSE_TIME,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_RESPONSE_TIME,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'Session Duration',
- key: FilterKey.AVG_SESSION_DURATION,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_SESSION_DURATION,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'Time Till First Byte',
- key: FilterKey.AVG_TILL_FIRST_BYTE,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_TILL_FIRST_BYTE,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'Time to be Interactive',
- key: FilterKey.AVG_TIME_TO_INTERACTIVE,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_TIME_TO_INTERACTIVE,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'Time to Render',
- key: FilterKey.AVG_TIME_TO_RENDER,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_TIME_TO_RENDER,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-
- {
- title: 'JS Heap Size',
- key: FilterKey.AVG_USED_JS_HEAP_SIZE,
- cardType: WEB_VITALS,
- metricOf: FilterKey.AVG_USED_JS_HEAP_SIZE,
- category: CARD_CATEGORIES[4].key,
- width: 1,
- height: 148,
- data: generateWebVitalData(),
- example: WebVital,
- },
-]
+ {
+ title: 'JS Heap Size',
+ key: FilterKey.AVG_USED_JS_HEAP_SIZE,
+ cardType: WEB_VITALS,
+ metricOf: FilterKey.AVG_USED_JS_HEAP_SIZE,
+ category: CARD_CATEGORIES[4].key,
+ data: generateWebVitalData(),
+ example: WebVital
+ }
+];
function generateRandomBarsData(): { total: number, values: { label: string, value: number }[] } {
- const labels = ["company.domain.com", "openreplay.com"];
- const values = labels.map(label => ({
- label,
- value: Math.floor(Math.random() * 100)
- }));
- const total = values.reduce((acc, curr) => acc + curr.value, 0);
+ const labels = ['company.domain.com', 'openreplay.com'];
+ const values = labels.map(label => ({
+ label,
+ value: Math.floor(Math.random() * 100)
+ }));
+ const total = values.reduce((acc, curr) => acc + curr.value, 0);
- return {
- total,
- values: values.sort((a, b) => b.value - a.value)
- };
+ return {
+ total,
+ values: values.sort((a, b) => b.value - a.value)
+ };
}
function generateWebVitalData(): { value: number, chart: { timestamp: number, value: number }[], unit: string } {
- const chart = Array.from({length: 7}, (_, i) => ({
- timestamp: Date.now() + i * 86400000,
- value: parseFloat((Math.random() * 10).toFixed(15))
- }));
+ const chart = Array.from({ length: 7 }, (_, i) => ({
+ timestamp: Date.now() + i * 86400000,
+ value: parseFloat((Math.random() * 10).toFixed(15))
+ }));
- const value = chart.reduce((acc, curr) => acc + curr.value, 0) / chart.length;
+ const value = chart.reduce((acc, curr) => acc + curr.value, 0) / chart.length;
- return {
- value,
- chart,
- unit: "%"
- };
+ return {
+ value,
+ chart,
+ unit: '%'
+ };
}
function generateTimeSeriesData(): any[] {
- const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"];
- const pointsPerMonth = 3; // Number of points for each month
+ const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'];
+ const pointsPerMonth = 3; // Number of points for each month
- const data = months.flatMap((month, monthIndex) =>
- Array.from({length: pointsPerMonth}, (_, pointIndex) => ({
- time: month,
- "Series 1": Math.floor(Math.random() * 90),
- timestamp: Date.now() + (monthIndex * pointsPerMonth + pointIndex) * 86400000
- }))
- );
+ const data = months.flatMap((month, monthIndex) =>
+ Array.from({ length: pointsPerMonth }, (_, pointIndex) => ({
+ time: month,
+ 'Series 1': Math.floor(Math.random() * 90),
+ timestamp: Date.now() + (monthIndex * pointsPerMonth + pointIndex) * 86400000
+ }))
+ );
- return data;
+ return data;
}
function generateAreaData(): any[] {
- const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"];
- const pointsPerMonth = 3; // Number of points for each month
+ const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'];
+ const pointsPerMonth = 3; // Number of points for each month
- const data = months.flatMap((month, monthIndex) =>
- Array.from({length: pointsPerMonth}, (_, pointIndex) => ({
- time: month,
- "value": Math.floor(Math.random() * 90),
- timestamp: Date.now() + (monthIndex * pointsPerMonth + pointIndex) * 86400000
- }))
- );
+ const data = months.flatMap((month, monthIndex) =>
+ Array.from({ length: pointsPerMonth }, (_, pointIndex) => ({
+ time: month,
+ 'value': Math.floor(Math.random() * 90),
+ timestamp: Date.now() + (monthIndex * pointsPerMonth + pointIndex) * 86400000
+ }))
+ );
- return data;
+ return data;
}
function generateRandomValue(min: number, max: number): number {
- return Math.floor(Math.random() * (max - min + 1)) + min;
+ return Math.floor(Math.random() * (max - min + 1)) + min;
}
-function generateBarChartDate(): any[] {
- const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'];
- return months.map(month => ({
- time: month,
- value: generateRandomValue(1000, 5000),
- }));
+function generateBarChartData(): any[] {
+ const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'];
+ return months.map(month => ({
+ time: month,
+ value: generateRandomValue(1000, 5000)
+ }));
}
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx
index d50fcab52..871c4519d 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/AreaChartCard.tsx
@@ -46,7 +46,7 @@ function AreaChartCard(props: Props) {
{/*
*/}
-
+
void;
- onClick?: any;
- data?: any,
+ title: string;
+ type: string;
+ onCard: (card: string) => void;
+ onClick?: any;
+ data?: any,
}
function BarChartCard(props: Props) {
- return (
-
+ {/**/}
+ {/* */}
+ {/* /!**!/*/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* }/>*/}
+ {/* /!*}/>*!/*/}
+ {/* */}
+ {/**/}
+
+
+
- {/**/}
- {/* */}
- {/* /!**!/*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* }/>*/}
- {/* /!*}/>*!/*/}
- {/* */}
- {/**/}
+
+
+ Styles.tickFormatter(val)}
+ label={{ ...Styles.axisLabelLeft, value: props.data?.label || 'Number of Errors' }}
+ allowDecimals={false}
+ />
+
+
+ One}
+ dataKey="value" stackId="a" fill={Styles.colors[0]} />
+ {/*3rd Party} dataKey="thirdParty" stackId="a"*/}
+ {/* fill={Styles.colors[2]}/>*/}
+
+
+
-
-
-
-
- Styles.tickFormatter(val)}
- label={{...Styles.axisLabelLeft, value: "Number of Errors"}}
- allowDecimals={false}
- />
-
-
- One}
- dataKey="value" stackId="a" fill={Styles.colors[0]}/>
- {/*3rd Party} dataKey="thirdParty" stackId="a"*/}
- {/* fill={Styles.colors[2]}/>*/}
-
-
-
-
- );
+ );
}
export default BarChartCard;
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx
index b64fac0a8..b464c1398 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard.tsx
@@ -15,7 +15,7 @@ function ExCard({
}) {
return (
onCard(type)}>
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx
index b6d35ef76..28c0b9560 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByUrl.tsx
@@ -4,6 +4,7 @@ import React from 'react';
import { Circle } from '../Count';
import ExCard from '../ExCard';
+import ByComponent from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/Component';
function ByUrl(props: any) {
const [mode, setMode] = React.useState(0);
@@ -47,57 +48,62 @@ function ByUrl(props: any) {
const lineWidth = 240;
return (
-
- {props.title}
- setMode(Number(v))}
- size='small'
- />
-
-
- }
- >
-
- {rows.map((r) => (
-
-
{r.icon}
-
-
{mode === 0 ? r.label : r.ptitle}
-
-
-
{r.value}
-
- ))}
-
-
+
+ //
+ // {props.title}
+ // setMode(Number(v))}
+ // size='small'
+ // />
+ //
+ //
+ //
);
}
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/Component.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/Component.tsx
index 2300ddeb2..67684ad10 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/Component.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/Component.tsx
@@ -1,67 +1,36 @@
-import ExCard from '../ExCard'
-import React from 'react'
-import CardSessionsByList from "Components/Dashboard/Widgets/CardSessionsByList";
+import ExCard from '../ExCard';
+import React from 'react';
+import CardSessionsByList from 'Components/Dashboard/Widgets/CardSessionsByList';
-function ByComponent({title, rows, lineWidth, onCard, type}: {
- title: string
- rows: {
- label: string
- progress: number
- value: string
- icon: React.ReactNode
- }[]
- onCard: (card: string) => void
- type: string
- lineWidth: number
+function ByComponent({ title, rows, lineWidth, onCard, type }: {
+ title: string
+ rows: {
+ label: string
+ progress: number
+ value: string
+ icon: React.ReactNode
+ }[]
+ onCard: (card: string) => void
+ type: string
+ lineWidth: number
}) {
- const _rows = rows.map((r) => ({
- ...r,
- name: r.label,
- sessionCount: r.value,
- })).slice(0, 4)
- return (
-
- )
+ const _rows = rows.map((r) => ({
+ ...r,
+ name: r.label,
+ displayName: r.label,
+ sessionCount: r.value
+ })).slice(0, 4);
+ return (
+
+ );
}
-export default ByComponent
+export default ByComponent;
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/SlowestDomains.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/SlowestDomains.tsx
new file mode 100644
index 000000000..428c04bb3
--- /dev/null
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/SlowestDomains.tsx
@@ -0,0 +1,49 @@
+import React from 'react';
+import ByComponent from './Component';
+import { LinkOutlined } from '@ant-design/icons';
+
+function SlowestDomains(props: any) {
+ const rows = [
+ {
+ label: 'res.cloudinary.com',
+ value: '500',
+ progress: 75,
+ icon:
+ },
+ {
+ label: 'mintbase.vercel.app',
+ value: '306',
+ progress: 60,
+ icon:
+ },
+ {
+ label: 'downloads.intercomcdn.com',
+ value: '198',
+ progress: 30,
+ icon:
+ },
+ {
+ label: 'static.intercomassets.com',
+ value: '47',
+ progress: 15,
+ icon:
+ },
+ {
+ label: 'mozbar.moz.com',
+ value: '5',
+ progress: 5,
+ icon:
+ );
+}
+
+export default SlowestDomains;
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsPerBrowserExample.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsPerBrowserExample.tsx
new file mode 100644
index 000000000..f5710b759
--- /dev/null
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsPerBrowserExample.tsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import ExCard from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard';
+import InsightsCard from 'Components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard';
+import { InsightIssue } from 'App/mstore/types/widget';
+import SessionsPerBrowser from 'Components/Dashboard/Widgets/PredefinedWidgets/SessionsPerBrowser';
+
+interface Props {
+ title: string;
+ type: string;
+ onCard: (card: string) => void;
+}
+
+function SessionsPerBrowserExample(props: Props) {
+ const data = {
+ chart: [
+ {
+ 'browser': 'Chrome',
+ 'count': 1524,
+ '126.0.0': 1157,
+ '125.0.0': 224
+ },
+ {
+ 'browser': 'Edge',
+ 'count': 159,
+ '126.0.0': 145
+ }
+ ]
+ };
+ return (
+
+ );
+}
+
+export default SessionsPerBrowserExample;
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx
index d39062eb2..baded8f84 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx
@@ -4,6 +4,7 @@ import React from 'react';
import { Circle } from './Count';
import ExCard from './ExCard';
+// TODO - delete this
function SlowestDomain(props: any) {
const rows = [
{
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SpeedIndexByLocationExample.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SpeedIndexByLocationExample.tsx
new file mode 100644
index 000000000..98a88eef7
--- /dev/null
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SpeedIndexByLocationExample.tsx
@@ -0,0 +1,94 @@
+import React from 'react';
+import ExCard from 'Components/Dashboard/components/DashboardList/NewDashModal/Examples/ExCard';
+import InsightsCard from 'Components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard';
+import { InsightIssue } from 'App/mstore/types/widget';
+import SessionsPerBrowser from 'Components/Dashboard/Widgets/PredefinedWidgets/SessionsPerBrowser';
+import SpeedIndexByLocation from 'Components/Dashboard/Widgets/PredefinedWidgets/SpeedIndexByLocation';
+
+interface Props {
+ title: string;
+ type: string;
+ onCard: (card: string) => void;
+}
+
+function SpeedIndexByLocationExample(props: Props) {
+ const data = {
+ 'value': 1480,
+ 'chart': [
+ {
+ 'userCountry': 'AT',
+ 'value': 415
+ },
+ {
+ 'userCountry': 'PL',
+ 'value': 433.1666666666667
+ },
+ {
+ 'userCountry': 'FR',
+ 'value': 502
+ },
+ {
+ 'userCountry': 'IT',
+ 'value': 540.4117647058823
+ },
+ {
+ 'userCountry': 'TH',
+ 'value': 662.0
+ },
+ {
+ 'userCountry': 'ES',
+ 'value': 740.5454545454545
+ },
+ {
+ 'userCountry': 'SG',
+ 'value': 889.6666666666666
+ },
+ {
+ 'userCountry': 'TW',
+ 'value': 1008.0
+ },
+ {
+ 'userCountry': 'HU',
+ 'value': 1027.0
+ },
+ {
+ 'userCountry': 'DE',
+ 'value': 1054.4583333333333
+ },
+ {
+ 'userCountry': 'BE',
+ 'value': 1126.0
+ },
+ {
+ 'userCountry': 'TR',
+ 'value': 1174.0
+ },
+ {
+ 'userCountry': 'US',
+ 'value': 1273.3015873015872
+ },
+ {
+ 'userCountry': 'GB',
+ 'value': 1353.8095238095239
+ },
+ {
+ 'userCountry': 'VN',
+ 'value': 1473.8181818181818
+ },
+ {
+ 'userCountry': 'HK',
+ 'value': 1654.6666666666667
+ },
+ ],
+ 'unit': 'ms'
+ };
+ return (
+
+ );
+}
+
+export default SpeedIndexByLocationExample;
diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx
index 5c975a9d1..c974e8bf3 100644
--- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx
+++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/NewDashboardModal.tsx
@@ -1,60 +1,70 @@
-import React, {useEffect} from 'react';
-import {Modal} from 'antd';
+import React, { useEffect } from 'react';
+import { Modal } from 'antd';
import SelectCard from './SelectCard';
-import CreateCard from "Components/Dashboard/components/DashboardList/NewDashModal/CreateCard";
-import colors from "tailwindcss/colors";
+import CreateCard from 'Components/Dashboard/components/DashboardList/NewDashModal/CreateCard';
+import colors from 'tailwindcss/colors';
+import { connect } from 'react-redux';
interface NewDashboardModalProps {
- onClose: () => void;
- open: boolean;
- isAddingFromLibrary?: boolean;
+ onClose: () => void;
+ open: boolean;
+ isAddingFromLibrary?: boolean;
+ isEnterprise?: boolean;
}
const NewDashboardModal: React.FC