From f1d94c53784ee421c6564d90e776cab1ddd24766 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 16 May 2022 17:04:10 +0200 Subject: [PATCH] feat(ui) - errors - widget --- .../Errors/ErrorListItem/ErrorListItem.tsx | 14 ++++++++++++++ .../components/Errors/ErrorListItem/index.ts | 1 + .../components/Errors/ErrorsList/ErrorsList.tsx | 14 ++++++++++++++ .../components/Errors/ErrorsList/index.ts | 1 + .../Errors/ErrorsWidget/ErrorsWidget.tsx | 12 ++++++++++++ .../components/Errors/ErrorsWidget/index.ts | 1 + .../components/WidgetChart/WidgetChart.tsx | 7 ++++++- 7 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 frontend/app/components/Dashboard/components/Errors/ErrorListItem/ErrorListItem.tsx create mode 100644 frontend/app/components/Dashboard/components/Errors/ErrorListItem/index.ts create mode 100644 frontend/app/components/Dashboard/components/Errors/ErrorsList/ErrorsList.tsx create mode 100644 frontend/app/components/Dashboard/components/Errors/ErrorsList/index.ts create mode 100644 frontend/app/components/Dashboard/components/Errors/ErrorsWidget/ErrorsWidget.tsx create mode 100644 frontend/app/components/Dashboard/components/Errors/ErrorsWidget/index.ts diff --git a/frontend/app/components/Dashboard/components/Errors/ErrorListItem/ErrorListItem.tsx b/frontend/app/components/Dashboard/components/Errors/ErrorListItem/ErrorListItem.tsx new file mode 100644 index 000000000..6f230b516 --- /dev/null +++ b/frontend/app/components/Dashboard/components/Errors/ErrorListItem/ErrorListItem.tsx @@ -0,0 +1,14 @@ +import React from 'react'; + +interface Props { + error: any; +} +function ErrorListItem(props: Props) { + return ( +
+ Errors List Item +
+ ); +} + +export default ErrorListItem; \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/Errors/ErrorListItem/index.ts b/frontend/app/components/Dashboard/components/Errors/ErrorListItem/index.ts new file mode 100644 index 000000000..b37bfbbca --- /dev/null +++ b/frontend/app/components/Dashboard/components/Errors/ErrorListItem/index.ts @@ -0,0 +1 @@ +export { default } from './ErrorListItem' \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/Errors/ErrorsList/ErrorsList.tsx b/frontend/app/components/Dashboard/components/Errors/ErrorsList/ErrorsList.tsx new file mode 100644 index 000000000..bfc7c9bcc --- /dev/null +++ b/frontend/app/components/Dashboard/components/Errors/ErrorsList/ErrorsList.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import ErrorListItem from '../ErrorListItem'; + +function ErrorsList(props) { + + return ( +
+ Errors List + +
+ ); +} + +export default ErrorsList; \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/Errors/ErrorsList/index.ts b/frontend/app/components/Dashboard/components/Errors/ErrorsList/index.ts new file mode 100644 index 000000000..7dd28915c --- /dev/null +++ b/frontend/app/components/Dashboard/components/Errors/ErrorsList/index.ts @@ -0,0 +1 @@ +export { default } from './ErrorsList'; \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/Errors/ErrorsWidget/ErrorsWidget.tsx b/frontend/app/components/Dashboard/components/Errors/ErrorsWidget/ErrorsWidget.tsx new file mode 100644 index 000000000..b2862d040 --- /dev/null +++ b/frontend/app/components/Dashboard/components/Errors/ErrorsWidget/ErrorsWidget.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +import ErrorsList from '../ErrorsList'; + +function ErrorsWidget(props) { + return ( +
+ +
+ ); +} + +export default ErrorsWidget; \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/Errors/ErrorsWidget/index.ts b/frontend/app/components/Dashboard/components/Errors/ErrorsWidget/index.ts new file mode 100644 index 000000000..8f62f38a4 --- /dev/null +++ b/frontend/app/components/Dashboard/components/Errors/ErrorsWidget/index.ts @@ -0,0 +1 @@ +export { default } from './ErrorsWidget'; \ No newline at end of file diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx index c3d40867e..32623efe7 100644 --- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx +++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx @@ -12,6 +12,7 @@ import CustomMetricOverviewChart from 'App/components/Dashboard/Widgets/CustomMe import { getStartAndEndTimestampsByDensity } from 'Types/dashboard/helper'; import { debounce } from 'App/utils'; import FunnelWidget from 'App/components/Funnels/FunnelWidget'; +import ErrorsWidget from '../Errors/ErrorsWidget'; interface Props { metric: any; isWidget?: boolean @@ -83,7 +84,11 @@ function WidgetChart(props: Props) { const renderChart = () => { const { metricType, viewType } = metric; - if (isFunnel) { + if (metricType === 'errors') { + return + } + + if (metricType === 'funnel') { return }