You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@hertzbeat.apache.org by zh...@apache.org on 2024/09/05 14:10:51 UTC
(hertzbeat) branch master updated: [improve] add kanban auto refresh (#2681)
This is an automated email from the ASF dual-hosted git repository.
zhaoqingran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 7506429fc [improve] add kanban auto refresh (#2681)
7506429fc is described below
commit 7506429fc40683ca181fdd84f6167df4604a5bcf
Author: aias00 <ro...@163.com>
AuthorDate: Thu Sep 5 22:10:47 2024 +0800
[improve] add kanban auto refresh (#2681)
Co-authored-by: shown <yu...@gmail.com>
---
web-app/src/app/routes/bulletin/bulletin.component.ts | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/web-app/src/app/routes/bulletin/bulletin.component.ts b/web-app/src/app/routes/bulletin/bulletin.component.ts
index a312f6e89..7aeb29c9d 100644
--- a/web-app/src/app/routes/bulletin/bulletin.component.ts
+++ b/web-app/src/app/routes/bulletin/bulletin.component.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { Component, Inject, OnInit } from '@angular/core';
+import { Component, Inject, OnInit, OnDestroy } from '@angular/core';
import { I18NService } from '@core';
import { ALAIN_I18N_TOKEN } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
@@ -39,7 +39,7 @@ import { MonitorService } from '../../service/monitor.service';
templateUrl: './bulletin.component.html',
styleUrls: ['./bulletin.component.less']
})
-export class BulletinComponent implements OnInit {
+export class BulletinComponent implements OnInit, OnDestroy {
constructor(
private modal: NzModalService,
private notifySvc: NzNotificationService,
@@ -68,9 +68,19 @@ export class BulletinComponent implements OnInit {
pageIndex: number = 1;
pageSize: number = 8;
total: number = 0;
+ refreshInterval: any;
ngOnInit() {
this.loadTabs();
+ this.refreshInterval = setInterval(() => {
+ this.loadTabs();
+ }, 30000); // every 30 seconds refresh the tabs
+ }
+
+ ngOnDestroy() {
+ if (this.refreshInterval) {
+ clearInterval(this.refreshInterval);
+ }
}
sync() {
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org