Browse Source
Merge pull request #9186 from vvlladd28/bug/import-export-widget/same-id
Fixed widget import in the dashboard when the duplicate IDs
pull/9205/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts
|
|
|
@ -21,7 +21,7 @@ import { Store } from '@ngrx/store'; |
|
|
|
import { AppState } from '@core/core.state'; |
|
|
|
import { ActionNotificationShow } from '@core/notification/notification.actions'; |
|
|
|
import { Dashboard, DashboardLayoutId } from '@shared/models/dashboard.models'; |
|
|
|
import { deepClone, isDefined, isObject, isString, isUndefined } from '@core/utils'; |
|
|
|
import { deepClone, guid, isDefined, isObject, isString, isUndefined } from '@core/utils'; |
|
|
|
import { WINDOW } from '@core/services/window.service'; |
|
|
|
import { DOCUMENT } from '@angular/common'; |
|
|
|
import { |
|
|
|
@ -184,6 +184,7 @@ export class ImportExportService { |
|
|
|
} else { |
|
|
|
let widget = widgetItem.widget; |
|
|
|
widget = this.dashboardUtils.validateAndUpdateWidget(widget); |
|
|
|
widget.id = guid(); |
|
|
|
const aliasesInfo = this.prepareAliasesInfo(widgetItem.aliasesInfo); |
|
|
|
const filtersInfo: FiltersInfo = widgetItem.filtersInfo || { |
|
|
|
datasourceFilters: {} |
|
|
|
|