From c5097f52dc77975cef30e91a5abe1538c2cbc5e8 Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Mon, 16 Nov 2026 12:14:01 +0100 Subject: [PATCH] Merge pull request #16698 from mtsymbarov-del/fix/dashboard-upload-version-conflict Fixed dashboard "Upload new version" repeatedly reporting a version conflict after "Discard changes" --- .../import-dashboard-file-dialog.component.ts | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/import-dashboard-file-dialog.component.ts b/ui-ngx/src/app/modules/home/pages/dashboard/import-dashboard-file-dialog.component.ts index 1b76ca539f..ecad7891dd 100644 --- a/ui-ngx/src/app/modules/home/pages/dashboard/import-dashboard-file-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/pages/dashboard/import-dashboard-file-dialog.component.ts @@ -11,6 +11,7 @@ import { DashboardInfo } from '@app/shared/models/dashboard.models'; import { ActionNotificationShow } from '@core/notification/notification.actions'; import { DialogComponent } from '@shared/components/dialog.component'; import { Router } from '@angular/router'; +import { HttpErrorResponse, HttpStatusCode } from '@angular/common/http'; export interface DashboardInfoDialogData { dashboard: DashboardInfo; @@ -54,15 +55,22 @@ export class ImportDashboardFileDialogComponent extends DialogComponent { - this.dialogRef.close(true); - }) + this.dashboardService.saveDashboard(dashboard).subscribe({ + next: () => this.dialogRef.close(true), + error: (err: HttpErrorResponse) => { + if (err.status === HttpStatusCode.Conflict) { + this.dialogRef.close(true); + } + } + }); } loadDataFromJsonContent(content: string): any {