diff --git a/ui/packages/tidb-dashboard-for-op/.env.development b/ui/packages/tidb-dashboard-for-op/.env.development index 48bdd58e47..5d54702b6d 100644 --- a/ui/packages/tidb-dashboard-for-op/.env.development +++ b/ui/packages/tidb-dashboard-for-op/.env.development @@ -3,3 +3,4 @@ PUBLIC_URL='/dashboard' REACT_APP_VERSION=$npm_package_version REACT_APP_MIXPANEL_HOST=https://telemetry.pingcap.com/api/v1/dashboard/report REACT_APP_MIXPANEL_TOKEN= +REACT_APP_DASHBOARD_API_URL=http://172.16.7.147:12333 \ No newline at end of file diff --git a/ui/packages/tidb-dashboard-lib/src/apps/Overview/components/Metrics.tsx b/ui/packages/tidb-dashboard-lib/src/apps/Overview/components/Metrics.tsx index a4c3a35305..148a16e98e 100644 --- a/ui/packages/tidb-dashboard-lib/src/apps/Overview/components/Metrics.tsx +++ b/ui/packages/tidb-dashboard-lib/src/apps/Overview/components/Metrics.tsx @@ -78,6 +78,7 @@ export default function Metrics() { queries={item.queries} type={item.type as GraphType} unit={item.unit!} + nullValue={item.nullValue} range={chartRange} onRangeChange={setChartRange} getMetrics={ctx!.ds.metricsQueryGet} diff --git a/ui/packages/tidb-dashboard-lib/src/apps/Overview/data/overviewMetrics.ts b/ui/packages/tidb-dashboard-lib/src/apps/Overview/data/overviewMetrics.ts index 182b2ce4b5..7cdae853f9 100644 --- a/ui/packages/tidb-dashboard-lib/src/apps/Overview/data/overviewMetrics.ts +++ b/ui/packages/tidb-dashboard-lib/src/apps/Overview/data/overviewMetrics.ts @@ -55,7 +55,7 @@ const overviewMetrics = [ } ], nullValue: TransformNullValue.AS_ZERO, - unit: 'percent', + unit: 'percentunit', type: 'line' }, { @@ -67,7 +67,7 @@ const overviewMetrics = [ } ], nullValue: TransformNullValue.AS_ZERO, - unit: 'decbytes', + unit: 'bytes', type: 'line' }, { @@ -84,7 +84,7 @@ const overviewMetrics = [ name: '{instance}-read' } ], - unit: 'KBs', + unit: 'Bps', type: 'line' } ] diff --git a/ui/packages/tidb-dashboard-lib/src/components/MetricChart/index.tsx b/ui/packages/tidb-dashboard-lib/src/components/MetricChart/index.tsx index deb20fe96a..0adc0581af 100644 --- a/ui/packages/tidb-dashboard-lib/src/components/MetricChart/index.tsx +++ b/ui/packages/tidb-dashboard-lib/src/components/MetricChart/index.tsx @@ -19,7 +19,6 @@ import { Axis, // BrushEvent, Chart, - DomainRange, LineSeries, Position, ScaleType,