|
|
@ -139,7 +139,7 @@ export class ImportExportService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public exportDashboard(dashboardId: string) { |
|
|
public exportDashboard(dashboardId: string) { |
|
|
this.dashboardService.getDashboard(dashboardId).subscribe( |
|
|
this.dashboardService.exportDashboard(dashboardId).subscribe( |
|
|
(dashboard) => { |
|
|
(dashboard) => { |
|
|
let name = dashboard.title; |
|
|
let name = dashboard.title; |
|
|
name = name.toLowerCase().replace(/\W/g, '_'); |
|
|
name = name.toLowerCase().replace(/\W/g, '_'); |
|
|
@ -348,7 +348,7 @@ export class ImportExportService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public exportWidgetsBundle(widgetsBundleId: string) { |
|
|
public exportWidgetsBundle(widgetsBundleId: string) { |
|
|
this.widgetService.getWidgetsBundle(widgetsBundleId).subscribe( |
|
|
this.widgetService.exportWidgetsBundle(widgetsBundleId).subscribe( |
|
|
(widgetsBundle) => { |
|
|
(widgetsBundle) => { |
|
|
this.dialog.open<ExportWidgetsBundleDialogComponent, ExportWidgetsBundleDialogData, |
|
|
this.dialog.open<ExportWidgetsBundleDialogComponent, ExportWidgetsBundleDialogData, |
|
|
ExportWidgetsBundleDialogResult>(ExportWidgetsBundleDialogComponent, { |
|
|
ExportWidgetsBundleDialogResult>(ExportWidgetsBundleDialogComponent, { |
|
|
@ -376,7 +376,7 @@ export class ImportExportService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private exportWidgetsBundleWithWidgetTypes(widgetsBundle: WidgetsBundle) { |
|
|
private exportWidgetsBundleWithWidgetTypes(widgetsBundle: WidgetsBundle) { |
|
|
this.widgetService.getBundleWidgetTypesDetails(widgetsBundle.id.id).subscribe( |
|
|
this.widgetService.exportBundleWidgetTypesDetails(widgetsBundle.id.id).subscribe( |
|
|
(widgetTypesDetails) => { |
|
|
(widgetTypesDetails) => { |
|
|
const widgetsBundleItem: WidgetsBundleItem = { |
|
|
const widgetsBundleItem: WidgetsBundleItem = { |
|
|
widgetsBundle: this.prepareExport(widgetsBundle), |
|
|
widgetsBundle: this.prepareExport(widgetsBundle), |
|
|
@ -620,7 +620,7 @@ export class ImportExportService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public exportDeviceProfile(deviceProfileId: string) { |
|
|
public exportDeviceProfile(deviceProfileId: string) { |
|
|
this.deviceProfileService.getDeviceProfile(deviceProfileId).subscribe( |
|
|
this.deviceProfileService.exportDeviceProfile(deviceProfileId).subscribe( |
|
|
(deviceProfile) => { |
|
|
(deviceProfile) => { |
|
|
let name = deviceProfile.name; |
|
|
let name = deviceProfile.name; |
|
|
name = name.toLowerCase().replace(/\W/g, '_'); |
|
|
name = name.toLowerCase().replace(/\W/g, '_'); |
|
|
@ -651,7 +651,7 @@ export class ImportExportService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public exportAssetProfile(assetProfileId: string) { |
|
|
public exportAssetProfile(assetProfileId: string) { |
|
|
this.assetProfileService.getAssetProfile(assetProfileId).subscribe( |
|
|
this.assetProfileService.exportAssetProfile(assetProfileId).subscribe( |
|
|
(assetProfile) => { |
|
|
(assetProfile) => { |
|
|
let name = assetProfile.name; |
|
|
let name = assetProfile.name; |
|
|
name = name.toLowerCase().replace(/\W/g, '_'); |
|
|
name = name.toLowerCase().replace(/\W/g, '_'); |
|
|
|