diff --git a/web/package-lock.json b/web/package-lock.json index ffed0a59b..119a46e7f 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -46,6 +46,7 @@ "core-js": "^3.21.1", "cron": "^2.2.0", "cronstrue": "^2.21.0", + "deep-equality-data-structures": "1.5.1", "dompurify": "^2.3.6", "fast-json-patch": "^3.1.1", "fuse.js": "^6.4.6", @@ -6931,6 +6932,15 @@ "node": ">=0.10.0" } }, + "node_modules/deep-equality-data-structures": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/deep-equality-data-structures/-/deep-equality-data-structures-1.5.1.tgz", + "integrity": "sha512-P7zsL2/AbZIGHDxbo/LLEhCp11AttRp8GvzXOXudqMT/qiGCLo/pyI4lAZvjUZyQnlIbPna3fv8DMsuRvLt4ww==", + "license": "MIT", + "dependencies": { + "object-hash": "^3.0.0" + } + }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -11314,6 +11324,15 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", diff --git a/web/package.json b/web/package.json index 699ade972..71792c535 100644 --- a/web/package.json +++ b/web/package.json @@ -69,6 +69,7 @@ "cron": "^2.2.0", "cronstrue": "^2.21.0", "dompurify": "^2.3.6", + "deep-equality-data-structures": "1.5.1", "fast-json-patch": "^3.1.1", "fuse.js": "^6.4.6", "jose": "^4.9.0", diff --git a/web/projects/shared/styles/taiga.scss b/web/projects/shared/styles/taiga.scss index 68b4b97ca..3edb110f8 100644 --- a/web/projects/shared/styles/taiga.scss +++ b/web/projects/shared/styles/taiga.scss @@ -162,3 +162,20 @@ tui-badge-notification { align-self: center !important; } } + +// TODO Remove after Taiga UI update +[tuiTitle] { + h1, + h2, + h3, + h4, + h5, + h6 { + font: inherit; + margin: 0; + } + + [tuiSubtitle] { + margin: 0; + } +} diff --git a/web/projects/ui/src/app/routes/portal/components/form.component.ts b/web/projects/ui/src/app/routes/portal/components/form.component.ts index a4850ffac..07c27b769 100644 --- a/web/projects/ui/src/app/routes/portal/components/form.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/form.component.ts @@ -99,7 +99,7 @@ export interface FormContext { changeDetection: ChangeDetectionStrategy.OnPush, }) export class FormComponent> implements OnInit { - private readonly confirmService = inject(TuiConfirmService) + private readonly confirm = inject(TuiConfirmService, { optional: true }) private readonly formService = inject(FormService) private readonly invalidService = inject(InvalidService) private readonly context = inject>>( @@ -115,7 +115,7 @@ export class FormComponent> implements OnInit { form = new FormGroup({}) ngOnInit() { - this.confirmService.markAsPristine() + this.confirm?.markAsPristine() this.form = this.formService.createForm(this.spec, this.value) this.process(this.operations) } @@ -136,7 +136,7 @@ export class FormComponent> implements OnInit { } markAsDirty() { - this.confirmService.markAsDirty() + this.confirm?.markAsDirty() } close() { diff --git a/web/projects/ui/src/app/routes/portal/routes/services/dashboard/uptime.component.ts b/web/projects/ui/src/app/routes/portal/components/uptime.component.ts similarity index 97% rename from web/projects/ui/src/app/routes/portal/routes/services/dashboard/uptime.component.ts rename to web/projects/ui/src/app/routes/portal/components/uptime.component.ts index a0136717e..0280df7ad 100644 --- a/web/projects/ui/src/app/routes/portal/routes/services/dashboard/uptime.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/uptime.component.ts @@ -19,10 +19,11 @@ export class UptimeComponent implements OnChanges, OnDestroy { appUptime = '' ngOnChanges() { + clearInterval(this.interval) + if (!this.appUptime) { this.el.textContent = '-' } else { - clearInterval(this.interval) this.el.textContent = uptime(new Date(this.appUptime)) this.interval = setInterval(() => { this.el.textContent = uptime(new Date(this.appUptime)) diff --git a/web/projects/ui/src/app/routes/portal/routes/services/dashboard/service.component.ts b/web/projects/ui/src/app/routes/portal/routes/services/dashboard/service.component.ts index 45d514a8f..a2eee42fd 100644 --- a/web/projects/ui/src/app/routes/portal/routes/services/dashboard/service.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/services/dashboard/service.component.ts @@ -8,11 +8,11 @@ import { } from '@angular/core' import { RouterLink } from '@angular/router' import { tuiPure } from '@taiga-ui/cdk' +import { UptimeComponent } from 'src/app/routes/portal/components/uptime.component' import { ConnectionService } from 'src/app/services/connection.service' import { PkgDependencyErrors } from 'src/app/services/dep-error.service' import { PackageDataEntry } from 'src/app/services/patch-db/data-model' import { getManifest } from 'src/app/utils/get-package-data' -import { UptimeComponent } from './uptime.component' import { ControlsComponent } from './controls.component' import { StatusComponent } from './status.component' diff --git a/web/projects/ui/src/app/routes/portal/routes/services/routes/outlet.component.ts b/web/projects/ui/src/app/routes/portal/routes/services/routes/outlet.component.ts index e84a5b50d..dc38446d6 100644 --- a/web/projects/ui/src/app/routes/portal/routes/services/routes/outlet.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/services/routes/outlet.component.ts @@ -33,7 +33,7 @@ const ICONS = { {{ manifest()?.title }} -