Skip to content

Commit

Permalink
fix: add metrics chart timezone info back (#1432)
Browse files Browse the repository at this point in the history
* fix: add missed timezone props for metrics chart

* bump tidb-dashboard-for-dbaas to 0.0.48
  • Loading branch information
baurine authored Oct 31, 2022
1 parent 6b4adf6 commit 528888b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ui/packages/tidb-dashboard-for-dbaas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pingcap/tidb-dashboard-for-dbaas",
"version": "0.0.45",
"version": "0.0.48",
"main": "dist/main.js",
"module": "dist/main.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { Space, Typography, Row, Col, Collapse, Tooltip } from 'antd'
import React, { useCallback, useContext, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Stack } from 'office-ui-fabric-react'
import { LoadingOutlined, FileTextOutlined } from '@ant-design/icons'
import { useMemoizedFn } from 'ahooks'
import { MetricsChart, SyncChartPointer, TimeRangeValue } from 'metrics-chart'
import { Link } from 'react-router-dom'
import { debounce } from 'lodash'

import {
AutoRefreshButton,
Card,
Expand All @@ -10,17 +17,11 @@ import {
Toolbar,
ErrorBar
} from '@lib/components'
import { Stack } from 'office-ui-fabric-react'
import { useTimeRangeValue } from '@lib/components/TimeRangeSelector/hook'
import { LoadingOutlined, FileTextOutlined } from '@ant-design/icons'
import { MonitoringContext } from '../context'
import { useMemoizedFn } from 'ahooks'

import { Link } from 'react-router-dom'
import { debounce } from 'lodash'
import { store } from '@lib/utils/store'
import { tz } from '@lib/utils'
import { useTimeRangeValue } from '@lib/components/TimeRangeSelector/hook'
import { telemetry } from '../utils/telemetry'
import { MetricsChart, SyncChartPointer, TimeRangeValue } from 'metrics-chart'
import { MonitoringContext } from '../context'

export default function Monitoring() {
const ctx = useContext(MonitoringContext)
Expand Down Expand Up @@ -144,6 +145,7 @@ export default function Monitoring() {
range={chartRange}
nullValue={m.nullValue}
unit={m.unit!}
timezone={tz.getTimeZone()}
fetchPromeData={ctx!.ds.metricsQueryGet}
onLoading={onLoadingStateChange}
onBrush={handleOnBrush}
Expand Down

0 comments on commit 528888b

Please sign in to comment.