feat(ui) - errors - widget
This commit is contained in:
parent
baa6c916dc
commit
f1d94c5378
7 changed files with 49 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { default } from './ErrorListItem'
|
||||
|
|
@ -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;
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { default } from './ErrorsList';
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import ErrorsList from '../ErrorsList';
|
||||
|
||||
function ErrorsWidget(props) {
|
||||
return (
|
||||
<div>
|
||||
<ErrorsList />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ErrorsWidget;
|
||||
|
|
@ -0,0 +1 @@
|
|||
export { default } from './ErrorsWidget';
|
||||
|
|
@ -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} />
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue