feat(ui) - errors - widget

This commit is contained in:
Shekar Siri 2022-05-16 17:04:10 +02:00
parent baa6c916dc
commit f1d94c5378
7 changed files with 49 additions and 1 deletions

View file

@ -0,0 +1,14 @@
import React from 'react';
interface Props {
error: any;
}
function ErrorListItem(props: Props) {
return (
<div>
Errors List Item
</div>
);
}
export default ErrorListItem;

View file

@ -0,0 +1 @@
export { default } from './ErrorListItem'

View file

@ -0,0 +1,14 @@
import React from 'react';
import ErrorListItem from '../ErrorListItem';
function ErrorsList(props) {
return (
<div>
Errors List
<ErrorListItem error={{}} />
</div>
);
}
export default ErrorsList;

View file

@ -0,0 +1 @@
export { default } from './ErrorsList';

View file

@ -0,0 +1,12 @@
import React from 'react';
import ErrorsList from '../ErrorsList';
function ErrorsWidget(props) {
return (
<div>
<ErrorsList />
</div>
);
}
export default ErrorsWidget;

View file

@ -0,0 +1 @@
export { default } from './ErrorsWidget';

View file

@ -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 <ErrorsWidget metric={metric} />
}
if (metricType === 'funnel') {
return <FunnelWidget metric={metric} />
}