diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx index 4fa482592..7ccc8814c 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Count.tsx @@ -1,3 +1,4 @@ +import { Segmented } from 'antd'; import { Angry, ArrowDownUp, Mouse, MousePointerClick, Unlink } from 'lucide-react'; import React from 'react'; @@ -6,13 +7,44 @@ import React from 'react'; import ExCard from './ExCard'; -function ExampleCount() { - return - - ; +const TYPES = { + Frustrations: 0, + Errors: 1, + Users: 2 } -function Frustrations() { +function ExampleCount() { + const [type, setType] = React.useState(TYPES.Frustrations); + + const el = { + [TYPES.Frustrations]: , + [TYPES.Errors]: , + [TYPES.Users]: + }; + return ( + +
Sessions by
+
+ setType(Number(v))} + /> +
+ + } + > + {el[type]} +
+ ); +} + +export function Frustrations() { const rows = [ { label: 'Rage Clicks', @@ -46,12 +78,13 @@ function Frustrations() { }, ]; + const lineWidth = 140 return ( -
+
{rows.map((r) => (
{r.icon} @@ -60,7 +93,7 @@ function Frustrations() {
XHR
, }, ]; + + const lineWidth = 270 + return ( +
+ {rows.map((r) => ( +
+ {r.icon} +
+
{r.label}
+
+
+
+
+
+
{r.value}
+
+ ))} +
+ ) } -function Circle({ +export function Users() { + const rows = [ + { + label: 'pedro@mycompany.com', + value: '9.5K', + }, + { + label: 'mauricio@mycompany.com', + value: '2.5K', + }, + { + label: 'alex@mycompany.com', + value: '405', + }, + { + label: 'jose@mycompany.com', + value: '150', + }, + { + label: 'maria@mycompany.com', + value: '123', + } + ] + + return ( +
+ {rows.map((r) => ( +
+ {r.label[0].toUpperCase()} +
+
{r.label}
+
+
{r.value}
+
+ ))} +
+ ) +} + +export function Circle({ children, badgeType, }: { @@ -124,14 +237,17 @@ function Circle({ badgeType: 0 | 1 | 2; }) { const colors = { + // frustrations 0: '#FFFBE6', + // errors 1: '#FFF1F0', + // users and domains 2: '#EBF4F5', }; return (
{children} diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/PerfBreakdown.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/PerfBreakdown.tsx new file mode 100644 index 000000000..75e9769f9 --- /dev/null +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/PerfBreakdown.tsx @@ -0,0 +1,102 @@ +import { GitCommitHorizontal } from 'lucide-react'; +import React from 'react'; + +import ExCard from './ExCard'; + +function PerfBreakdown() { + const rows = [ + ['5K', '1K'], + ['4K', '750'], + ['3K', '500'], + ['2K', '250'], + ['1K', '0'], + ]; + const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May']; + const values = [ + [3, 1, 9], + [2, 4, 10], + [3, 6, 2], + [7, 4, 1], + [5, 3, 4], + ]; + const bgs = ['#E2E4F6', '#A7BFFF', '#394EFF']; + return ( + +
+
+ {rows.map((r) => ( +
+
{r[0]}
+
+
{r[1]}
+
+ ))} +
+
+ {months.map((m, i) => ( +
+ {m} +
+ {values[i].map((v, bg) => ( +
+ ))} +
+
+ ))} +
+ +
+ + + +
+
+ +
+
+
+
XHR
+
+
+
+
Other
+
+
+ +
Response End
+
+
+ + ); +} + +export default PerfBreakdown; diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsByErrors.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsByErrors.tsx new file mode 100644 index 000000000..fd8a9f776 --- /dev/null +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsByErrors.tsx @@ -0,0 +1,15 @@ +import React from 'react' +import ExCard from "./ExCard"; +import { Errors } from "./Count"; + +function SessionsByErrors() { + return ( + + + + ); +} + +export default SessionsByErrors \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsByIssues.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsByIssues.tsx new file mode 100644 index 000000000..2c9f57afb --- /dev/null +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsByIssues.tsx @@ -0,0 +1,15 @@ +import React from 'react' +import ExCard from "./ExCard"; +import { Frustrations } from "./Count"; + +function SessionsByIssues() { + return ( + + + + ); +} + +export default SessionsByIssues \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx new file mode 100644 index 000000000..1233fe9f8 --- /dev/null +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SlowestDomain.tsx @@ -0,0 +1,84 @@ +import { LinkOutlined } from '@ant-design/icons'; +import React from 'react'; + +import { Circle } from './Count'; +import ExCard from './ExCard'; + +function SlowestDomain() { + const rows = [ + { + label: 'kroger.com', + value: '28,162 ms', + progress: 97, + icon: , + }, + { + label: 'instacart.com', + value: '3,165 ms', + progress: 60, + icon: , + }, + { + label: 'gifs.eco.br', + value: '1,503 ms', + progress: 40, + icon: , + }, + { + label: 'cdn.byintera.com', + value: '512 ms', + progress: 10, + icon: , + }, + { + label: 'analytics.twitter.com', + value: '110 ms', + progress: 5, + icon: , + }, + ]; + + const lineWidth = 240; + + return ( + +
+ {rows.map((r) => ( +
+ + {r.icon} + +
+
{r.label}
+
+
+
+
+
+
{r.value}
+
+ ))} +
+ + ); +} + +export default SlowestDomain; diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx index cc14f6ea8..07308f7ac 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/Trend.tsx @@ -13,6 +13,7 @@ function ExampleTrend() { title={
Trend
+
setIsMulti(v === 'multi')} /> +
} > diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/index.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/index.tsx index bf82d7cec..48ce0f714 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/index.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/index.tsx @@ -7,9 +7,27 @@ import ExampleCount from "./Examples/Count"; import ExampleFunnel from './Examples/Funnel'; import ExamplePath from './Examples/Path'; +import PerfBreakdown from "./Examples/PerfBreakdown"; +import SessionsByErrors from "./Examples/SessionsByErrors"; +import SessionsByIssues from "./Examples/SessionsByIssues"; +import SlowestDomain from "./Examples/SlowestDomain"; import ExampleTrend from './Examples/Trend'; function NewDashboardModal(props: { onClose: () => void; open: boolean }) { + const initial = 'performance-monitoring' //'product-analytics'; + const [selected, setSelected] = React.useState(initial); + let item; + switch (selected) { + case 'product-analytics': + item = + break; + case 'performance-monitoring': + item = + break; + default: + item =
under construction
+ break; + } return ( @@ -62,13 +80,11 @@ function NewDashboardModal(props: { onClose: () => void; open: boolean }) { value: 'core-web-vitals', }, ]} + onChange={(v) => setSelected(v)} /> -
- - - - +
+ {item}
@@ -77,4 +93,26 @@ function NewDashboardModal(props: { onClose: () => void; open: boolean }) { ); } +function ProductAnalytics() { + return ( + <> + + + + + + ) +} + +function PerformanceMonitoring() { + return ( + <> + + + + + + ) +} + export default NewDashboardModal;