You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@hertzbeat.apache.org by go...@apache.org on 2025/02/09 13:38:32 UTC
(hertzbeat) 02/02: [webapp] update ui theme
This is an automated email from the ASF dual-hosted git repository.
gongchao pushed a commit to branch ui-update
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit 1ad532ce7531dbc2f00722761cb5d2ede5c41abd
Author: tomsun28 <to...@outlook.com>
AuthorDate: Sun Feb 9 17:05:00 2025 +0800
[webapp] update ui theme
Signed-off-by: tomsun28 <to...@outlook.com>
---
web-app/src/app/routes/dashboard/dashboard.component.html | 2 +-
web-app/src/app/routes/dashboard/dashboard.component.less | 1 -
web-app/src/app/routes/dashboard/dashboard.component.ts | 4 ++++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.html b/web-app/src/app/routes/dashboard/dashboard.component.html
index 06dfcc2695..19e2692dbe 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.html
+++ b/web-app/src/app/routes/dashboard/dashboard.component.html
@@ -306,7 +306,7 @@
[delay]="300"
[zoomOnHover]="{ scale: 1.4, transitionTime: 0.6, delay: 0.4 }"
[overflow]="false"
- [background]="'white no-repeat fixed center'"
+ [background]="theme == 'dark' ? '#141414' : 'white'"
>
</angular-tag-cloud>
</nz-spin>
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.less b/web-app/src/app/routes/dashboard/dashboard.component.less
index 9f3455d7ee..0f8756cb69 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.less
+++ b/web-app/src/app/routes/dashboard/dashboard.component.less
@@ -1,4 +1,3 @@
-@import '@delon/theme/index';
:host ::ng-deep {
.ant-timeline {
.ant-timeline-label {
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.ts b/web-app/src/app/routes/dashboard/dashboard.component.ts
index e8937de788..e78282f135 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.ts
+++ b/web-app/src/app/routes/dashboard/dashboard.component.ts
@@ -34,6 +34,7 @@ import { AlertService } from '../../service/alert.service';
import { CollectorService } from '../../service/collector.service';
import { MonitorService } from '../../service/monitor.service';
import { TagService } from '../../service/tag.service';
+import { ThemeService } from '../../service/theme.service';
import { formatTagName } from '../../shared/utils/common-util';
@Component({
@@ -51,9 +52,11 @@ export class DashboardComponent implements OnInit, OnDestroy {
private collectorSvc: CollectorService,
@Inject(ALAIN_I18N_TOKEN) private i18nSvc: I18NService,
private router: Router,
+ private themeSvc: ThemeService,
private cdr: ChangeDetectorRef
) {}
+ theme: string = 'default';
// Tag Word Cloud
wordCloudData: CloudData[] = [];
wordCloudDataLoading: boolean = false;
@@ -178,6 +181,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
alertContentLoading: boolean = false;
ngOnInit(): void {
+ this.theme = this.themeSvc.getTheme() || 'default';
this.appsCountTheme = {
title: {
text: `{a|${this.i18nSvc.fanyi('dashboard.monitors.title')}}`,
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org