-
-
- {{ 'monitors.collect.time' | i18n }}: {{ time | _date : 'HH:mm:ss' }}
-
+
+
+
+
+ {{ 'monitors.collect.time' | i18n }}: {{ time | _date : 'HH:mm:ss' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ('monitors.collect.time.tip' | i18n) + ': ' + (time | _date : 'yyyy-MM-dd HH:mm:ss') }}
+
+
+
+
+
+
+
diff --git a/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.less b/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.less
index e21d7f68cac..5f1d96d10e5 100644
--- a/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.less
+++ b/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.less
@@ -14,4 +14,7 @@ p {
.ant-table-body {
overflow-y: auto!important;
}
+ .ant-card {
+ margin-bottom: inherit;
+ }
}
diff --git a/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.ts b/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.ts
index 11582d1d87d..a2a66783670 100644
--- a/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.ts
+++ b/web-app/src/app/routes/monitor/monitor-data-table/monitor-data-table.component.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
+import { Component, Input, OnInit } from '@angular/core';
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { finalize } from 'rxjs/operators';
@@ -28,7 +28,7 @@ import { MonitorService } from '../../../service/monitor.service';
templateUrl: './monitor-data-table.component.html',
styleUrls: ['./monitor-data-table.component.less']
})
-export class MonitorDataTableComponent implements OnInit, AfterViewInit {
+export class MonitorDataTableComponent implements OnInit {
@Input()
get monitorId(): number {
return this._monitorId;
@@ -53,8 +53,7 @@ export class MonitorDataTableComponent implements OnInit, AfterViewInit {
@Input()
height: string = '100%';
- @ViewChild('targetElement', { static: false }) cardElement!: ElementRef;
-
+ showModal!: boolean;
time!: any;
fields!: any[];
valueRows!: any[];
@@ -62,18 +61,8 @@ export class MonitorDataTableComponent implements OnInit, AfterViewInit {
isTable: boolean = true;
scrollY: string = '100%';
loading: boolean = false;
- cardWidth: number = 300;
- constructor(private monitorSvc: MonitorService, private notifySvc: NzNotificationService, private cdr: ChangeDetectorRef) {}
-
- ngAfterViewInit() {
- if (this.cardElement.nativeElement) {
- const grandparentElement = this.cardElement.nativeElement.parentElement.parentElement;
- const grandparentWidth = grandparentElement.clientWidth;
- this.cardWidth = grandparentWidth / 2 - 4;
- this.cdr.detectChanges();
- }
- }
+ constructor(private monitorSvc: MonitorService, private notifySvc: NzNotificationService) {}
ngOnInit(): void {
this.scrollY = `calc(${this.height} - 130px)`;
@@ -92,25 +81,9 @@ export class MonitorDataTableComponent implements OnInit, AfterViewInit {
this.time = message.data.time;
this.fields = message.data.fields;
this.valueRows = message.data.valueRows;
- let updateWidth = false;
if (this.valueRows.length == 1) {
this.isTable = false;
this.rowValues = this.valueRows[0].values;
- } else {
- if (this.fields?.length >= 5) {
- updateWidth = true;
- }
- }
- this.valueRows.forEach(row => {
- row.values.forEach((value: any) => {
- if (value.origin?.length > 60) {
- updateWidth = true;
- }
- });
- });
- if (updateWidth) {
- this.cardWidth = this.cardWidth + this.cardWidth;
- this.cdr.detectChanges();
}
} else if (message.code !== 0) {
this.notifySvc.warning(`${this.metrics}:${message.msg}`, '');
diff --git a/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html b/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html
index 2dcdaa66ee0..7cf402565f0 100755
--- a/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html
+++ b/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html
@@ -65,6 +65,7 @@
[app]="app"
>
.card {
- height: 400px;
-}
diff --git a/yarn.lock b/yarn.lock
deleted file mode 100644
index fb57ccd13af..00000000000
--- a/yarn.lock
+++ /dev/null
@@ -1,4 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-