From 40aa5a4d73c66785f702c85aed1dec7041427178 Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Wed, 24 Jul 2024 23:48:47 +0800 Subject: [PATCH] Fixed the issue of style anomaly caused by incorrect usage of nz-card-tab (#2368) Co-authored-by: tomsun28 --- .../routes/dashboard/dashboard.component.html | 94 ++++++++++--------- .../routes/dashboard/dashboard.component.less | 15 ++- .../routes/dashboard/dashboard.component.ts | 1 + 3 files changed, 59 insertions(+), 51 deletions(-) diff --git a/web-app/src/app/routes/dashboard/dashboard.component.html b/web-app/src/app/routes/dashboard/dashboard.component.html index f5ca85ae1d8..ccbf4c627a8 100644 --- a/web-app/src/app/routes/dashboard/dashboard.component.html +++ b/web-app/src/app/routes/dashboard/dashboard.component.html @@ -328,55 +328,63 @@
- - - - -
- - {{ - item.collector.status == 0 ? ('monitor.collector.status.online' | i18n) : ('monitor.collector.status.offline' | i18n) - }} - -
-
- -
- - {{ item.pinMonitorNum + item.dispatchMonitorNum }} - -
- {{ 'collector.pinned' | i18n }}: {{ item.pinMonitorNum }} - {{ 'collector.dispatched' | i18n }}: {{ item.dispatchMonitorNum }} -
-
- -
- {{ - (item.collector.gmtUpdate | date : 'YYYY-MM-dd HH:mm:ss')?.trim() - }} -
-
- -
- {{ item.collector.ip }} -
-
- -
- {{ item.collector.name }} -
-
-
-
+ {{ 'collector' | i18n }} : {{ item.collector.name }} + + + + + + + + + + +
+ + {{ item.collector.status == 0 ? ('monitor.collector.status.online' | i18n) : ('monitor.collector.status.offline' | i18n) }} + +
+
+ +
+ + {{ item.pinMonitorNum + item.dispatchMonitorNum }} + +
+ {{ 'collector.pinned' | i18n }}: {{ item.pinMonitorNum }} + {{ 'collector.dispatched' | i18n }}: {{ item.dispatchMonitorNum }} +
+
+ +
+ {{ + (item.collector.gmtUpdate | date : 'YYYY-MM-dd HH:mm:ss')?.trim() + }} +
+
+ +
+ {{ item.collector.ip }} +
+
+ +
+ {{ item.collector.name }} +
+
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.less b/web-app/src/app/routes/dashboard/dashboard.component.less index 1d2eadd30b7..9f3455d7ee4 100644 --- a/web-app/src/app/routes/dashboard/dashboard.component.less +++ b/web-app/src/app/routes/dashboard/dashboard.component.less @@ -22,10 +22,7 @@ } } .ant-card-head-title { - padding-top: 6px; - padding-right: 0; - padding-bottom: 6px; - padding-left: 0; + padding: 6px 0px; } .ant-card-head { min-height: 24px; @@ -34,10 +31,7 @@ font-size: 12px; } .ant-card-body { - padding-top: 24px; - padding-right: 24px; - padding-bottom: 6px; - padding-left: 24px; + padding: 24px 24px 6px 24px; } .ant-timeline-item { padding-bottom: 10px; @@ -63,6 +57,11 @@ } } } + .collectors { + .ant-card-body { + padding: 6px; + } + } } [data-theme='dark'] { diff --git a/web-app/src/app/routes/dashboard/dashboard.component.ts b/web-app/src/app/routes/dashboard/dashboard.component.ts index 2bbbaca044e..5cb78117396 100644 --- a/web-app/src/app/routes/dashboard/dashboard.component.ts +++ b/web-app/src/app/routes/dashboard/dashboard.component.ts @@ -171,6 +171,7 @@ export class DashboardComponent implements OnInit, OnDestroy { // collector list collectorsLoading: boolean = false; collectors!: CollectorSummary[]; + collectorsTabSelectedIndex = 0; // alert list alerts!: Alert[];