change(ui): insights card
This commit is contained in:
parent
7d2d4db21e
commit
716e83d819
2 changed files with 35 additions and 32 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import CustomMetricOverviewChart from "Components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricOverviewChart";
|
||||
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";
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
|
|
@ -10,35 +10,40 @@ interface Props {
|
|||
}
|
||||
|
||||
function InsightsExample(props: Props) {
|
||||
const data = [
|
||||
{
|
||||
"category": "errors",
|
||||
"name": "Error: Invalid unit value NaN",
|
||||
"value": 562,
|
||||
"oldValue": null,
|
||||
"ratio": 7.472410583698976,
|
||||
"change": null,
|
||||
"isNew": true
|
||||
},
|
||||
{
|
||||
"category": "errors",
|
||||
"name": "TypeError: e.node.getContext is not a function",
|
||||
"value": 128,
|
||||
"oldValue": 1,
|
||||
"ratio": 1.7019013429065284,
|
||||
"change": 12700.0,
|
||||
"isNew": false
|
||||
},
|
||||
{
|
||||
"category": "errors",
|
||||
"name": "Unhandled Promise Rejection: {\"message\":\"! POST error on /client/members; 400\",\"response\":{}}",
|
||||
"value": 26,
|
||||
"oldValue": null,
|
||||
"ratio": 0.34569871027788857,
|
||||
"change": null,
|
||||
"isNew": true
|
||||
}
|
||||
];
|
||||
const data = {
|
||||
issues: [
|
||||
{
|
||||
"category": "errors",
|
||||
"name": "Error: Invalid unit value NaN",
|
||||
"value": 562,
|
||||
"oldValue": null,
|
||||
"ratio": 7.472410583698976,
|
||||
"change": 1,
|
||||
"isNew": true
|
||||
},
|
||||
{
|
||||
"category": "errors",
|
||||
"name": "TypeError: e.node.getContext is not a function",
|
||||
"value": 128,
|
||||
"oldValue": 1,
|
||||
"ratio": 1.7019013429065284,
|
||||
"change": 12700.0,
|
||||
"isNew": false
|
||||
},
|
||||
{
|
||||
"category": "errors",
|
||||
"name": "Unhandled Promise Rejection: {\"message\":\"! POST error on /client/members; 400\",\"response\":{}}",
|
||||
"value": 26,
|
||||
"oldValue": null,
|
||||
"ratio": 0.34569871027788857,
|
||||
"change": 1,
|
||||
"isNew": true
|
||||
}
|
||||
].map(
|
||||
(i: any) =>
|
||||
new InsightIssue(i.category, i.name, i.ratio, i.oldValue, i.value, i.change, i.isNew)
|
||||
)
|
||||
}
|
||||
return (
|
||||
<ExCard
|
||||
{...props}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ import FilterItem from './filterItem';
|
|||
import {filtersMap} from 'Types/filter/newFilter';
|
||||
import Issue from '../types/issue';
|
||||
import {durationFormatted} from 'App/date';
|
||||
import React from "react";
|
||||
import {countries} from "App/constants/countries";
|
||||
import {SessionsByRow} from "./sessionsCardData";
|
||||
|
||||
export class InsightIssue {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue