Skip to content

Commit

Permalink
Merge branch 'master' into fix/metricsChart
Browse files Browse the repository at this point in the history
  • Loading branch information
YiniXu9506 authored Sep 26, 2022
2 parents 42123d6 + 0bdeafc commit 3b5cb73
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ui/packages/tidb-dashboard-for-clinic-op/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pingcap/tidb-dashboard-for-clinic-op",
"version": "0.0.4",
"version": "0.0.5",
"main": "dist/main.js",
"module": "dist/main.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export default function MonitorAlert() {
}
async function fetch() {
let resp = await ctx!.ds.getAlertManagerCounts(
`${amData!.ip}:${amData!.port}`
`${amData!.ip}:${amData!.port}`,
{
handleError: 'custom'
}
)
setAlertCounter(resp.data)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
Menu,
Dropdown,
Alert,
Tooltip
Tooltip,
Result
} from 'antd'
import {
LoadingOutlined,
Expand Down Expand Up @@ -258,20 +259,34 @@ function List() {
</Space>
</Toolbar>
</Card>
<div style={{ height: '100%', position: 'relative' }}>
<ScrollablePane>
{controller.isDataLoadedSlowly && (
<Card noMarginBottom noMarginTop>
<Alert
message={t('statement.pages.overview.slow_load_info')}
type="info"
showIcon
/>
</Card>
)}
<SlowQueriesTable cardNoMarginTop controller={controller} />
</ScrollablePane>
</div>

{controller.data?.length === 0 ? (
<Result title={t('slow_query.overview.empty_result')} />
) : (
<div style={{ height: '100%', position: 'relative' }}>
<ScrollablePane>
{controller.isDataLoadedSlowly && (
<Card noMarginBottom noMarginTop>
<Alert
message={t('slow_query.overview.slow_load_info')}
type="info"
showIcon
/>
</Card>
)}
{(controller.data?.length ?? 0) > 0 && (
<Card noMarginBottom noMarginTop>
<p className="ant-form-item-extra">
{t('slow_query.overview.result_count', {
n: controller.data?.length
})}
</p>
</Card>
)}
<SlowQueriesTable cardNoMarginTop controller={controller} />
</ScrollablePane>
</div>
)}
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ slow_query:
status:
success: Success
error: Failed
overview:
empty_result: Has no related slow queries
result_count: Get {{ n }} results.
slow_load_info: On-the-fly update is disabled due to slow data loading. You can initiate query manually by clicking the "Query" button.
detail:
head:
title: Slow Query Detail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ slow_query:
status:
success: 成功
error: 失败
overview:
empty_result: 没有符合条件的慢查询
result_count: 得到 {{ n }} 条结果。
slow_load_info: 数据加载耗时较长,已禁用即时更新。修改查询条件后,您可以手工点击”查询“按钮来发起查询。
detail:
head:
title: 慢查询详情
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ export default function StatementsOverview() {
<DateTime.Calendar
unixTimestampMs={dataTimeRange[1] * 1000}
/>
<div>
{t('statement.pages.overview.result_count', {
n: controller.data?.list.length
})}
</div>
</p>
</Card>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ statement:
custom_time_ranges: Custom
export: Export
exporting: Exporting
result_count: Get {{ n }} results.
actual_range: 'Due to time window and expiration configurations, currently displaying data in time range: '
slow_load_info: On-the-fly update is disabled due to slow data loading. You can initiate query manually by clicking the "Query" button.
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ statement:
custom_time_ranges: 自定义时间范围
export: 导出
exporting: 正在导出
result_count: 得到 {{ n }} 条结果。
actual_range: 基于设置的时间窗及过期时间,当前显示数据的时间范围:
slow_load_info: 数据加载耗时较长,已禁用即时更新。修改查询条件后,您可以手工点击”查询“按钮来发起查询。
settings:
Expand Down

0 comments on commit 3b5cb73

Please sign in to comment.