From c173500c2243d17417f26a1c2db4c97cd8f93c01 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Sat, 4 Dec 2021 20:45:23 +0800 Subject: [PATCH] =?UTF-8?q?[web-app]=20bugfix-=E7=9B=91=E6=8E=A7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=82=B9=E5=87=BB=E5=8A=A8=E4=BD=9C=E5=90=8E=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=9C=AA=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitor/monitor-list/monitor-list.component.html | 2 +- .../monitor/monitor-list/monitor-list.component.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html index 1e8f793..4534515 100644 --- a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html +++ b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html @@ -46,7 +46,7 @@ nzShowPagination = "true" [nzScroll]="{ x: '1150px', y: '1240px' }"> - + 监控名称 监控状态 监控主机Host diff --git a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts index 7ddb1d2..d7dc7db 100644 --- a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts +++ b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts @@ -48,6 +48,8 @@ export class MonitorListComponent implements OnInit { let monitorInit$ = this.monitorSvc.getMonitors(this.app, this.pageIndex - 1, this.pageSize) .subscribe(message => { this.tableLoading = false; + this.checkedAll = false; + this.checkedMonitorIds.clear(); if (message.code === 0) { this.pageMonitors = message.data; this.monitors = this.pageMonitors.content; @@ -123,6 +125,7 @@ export class MonitorListComponent implements OnInit { this.notifySvc.warning("未选中任何待删除项!",""); return; } + this.tableLoading = true; const deleteMonitors$ = this.monitorSvc.deleteMonitors(monitors) .subscribe(message => { deleteMonitors$.unsubscribe(); @@ -130,10 +133,12 @@ export class MonitorListComponent implements OnInit { this.notifySvc.success("删除成功!", ""); this.loadMonitorTable(); } else { + this.tableLoading = false; this.notifySvc.error("删除失败!", message.msg); } }, error => { + this.tableLoading = false; deleteMonitors$.unsubscribe(); this.notifySvc.error("删除失败!", error.msg) } @@ -169,6 +174,7 @@ export class MonitorListComponent implements OnInit { } cancelManageMonitors(monitors: Set) { + this.tableLoading = true; const cancelManage$ = this.monitorSvc.cancelManageMonitors(monitors) .subscribe(message => { cancelManage$.unsubscribe(); @@ -176,10 +182,12 @@ export class MonitorListComponent implements OnInit { this.notifySvc.success("取消纳管成功!", ""); this.loadMonitorTable(); } else { + this.tableLoading = false; this.notifySvc.error("取消纳管失败!", message.msg); } }, error => { + this.tableLoading = false; cancelManage$.unsubscribe(); this.notifySvc.error("取消纳管失败!", error.msg) } @@ -215,6 +223,7 @@ export class MonitorListComponent implements OnInit { } enableManageMonitors(monitors: Set) { + this.tableLoading = true; const enableManage$ = this.monitorSvc.enableManageMonitors(monitors) .subscribe(message => { enableManage$.unsubscribe(); @@ -222,10 +231,12 @@ export class MonitorListComponent implements OnInit { this.notifySvc.success("启用纳管成功!", ""); this.loadMonitorTable(); } else { + this.tableLoading = false; this.notifySvc.error("启用纳管失败!", message.msg); } }, error => { + this.tableLoading = false; enableManage$.unsubscribe(); this.notifySvc.error("启用纳管失败!", error.msg) }