diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts b/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts index eca7b61dcc..844e0822a1 100644 --- a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts +++ b/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts @@ -31,7 +31,7 @@ import { DashboardService } from '@core/http/dashboard.service'; import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; import { isEqual } from '@core/utils'; import { EntityType } from '@shared/models/entity-type.models'; -import {PageLink} from "@shared/models/page/page-link"; +import { PageLink } from "@shared/models/page/page-link"; @Component({ selector: 'tb-dashboard-form', @@ -118,7 +118,7 @@ export class DashboardFormComponent extends EntityComponent implements OnInit { - dashboard: Dashboard; + private dashboard: Dashboard; currentFileName: string = ''; - uploadFileFormGroup: UntypedFormGroup; + uploadFileFormGroup: FormGroup; constructor(protected store: Store, protected router: Router, @Inject(MAT_DIALOG_DATA) public data: DashboardInfoDialogData, - public translate: TranslateService, private dashboardService: DashboardService, - public dialogRef: MatDialogRef, - public fb: UntypedFormBuilder) { + protected dialogRef: MatDialogRef, + public fb: FormBuilder) { super(store, router, dialogRef); this.dashboard = data.dashboard; } @@ -62,9 +60,9 @@ export class ImportDashboardFileDialogComponent extends DialogComponent{ + this.dashboardService.saveDashboard(this.dashboard).subscribe(() => { this.dialogRef.close(true); }) } diff --git a/ui-ngx/src/app/shared/models/dashboard.models.ts b/ui-ngx/src/app/shared/models/dashboard.models.ts index acd7e63b68..8fe92f1b80 100644 --- a/ui-ngx/src/app/shared/models/dashboard.models.ts +++ b/ui-ngx/src/app/shared/models/dashboard.models.ts @@ -195,7 +195,6 @@ export interface Dashboard extends DashboardInfo { configuration?: DashboardConfiguration; dialogRef?: MatDialogRef; resources?: Array; - fileContent?: DashboardConfiguration; } export interface HomeDashboard extends Dashboard {