|
|
@ -45,10 +45,6 @@ import { |
|
|
EntityAliasesDialogData |
|
|
EntityAliasesDialogData |
|
|
} from '@home/components/alias/entity-aliases-dialog.component'; |
|
|
} from '@home/components/alias/entity-aliases-dialog.component'; |
|
|
import { MatDialog } from '@angular/material/dialog'; |
|
|
import { MatDialog } from '@angular/material/dialog'; |
|
|
import { |
|
|
|
|
|
DashboardInfoDialogData, |
|
|
|
|
|
ImportDashboardFileDialogComponent |
|
|
|
|
|
} from "@home/pages/dashboard/import-dashboard-file-dialog.component"; |
|
|
|
|
|
import { UserPermissionsService } from '@core/http/user-permissions.service'; |
|
|
import { UserPermissionsService } from '@core/http/user-permissions.service'; |
|
|
import { Operation, Resource } from '@shared/models/security.models'; |
|
|
import { Operation, Resource } from '@shared/models/security.models'; |
|
|
import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; |
|
|
import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; |
|
|
@ -289,18 +285,14 @@ export class DashboardsTableConfigResolver { |
|
|
this.importExport.exportDashboard(dashboard.id.id); |
|
|
this.importExport.exportDashboard(dashboard.id.id); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
importDashboardFile($event: Event, dashboard: DashboardInfo) { |
|
|
importDashboardFile($event: Event, dashboard: DashboardInfo, config: EntityTableConfig<DashboardInfo>) { |
|
|
if ($event) { |
|
|
this.homeDialogs.importDashboardFile($event, dashboard).subscribe( |
|
|
$event.stopPropagation(); |
|
|
(res) => { |
|
|
} |
|
|
if (res) { |
|
|
return this.dialog.open<ImportDashboardFileDialogComponent, DashboardInfoDialogData, |
|
|
config.updateData(); |
|
|
boolean>(ImportDashboardFileDialogComponent, { |
|
|
} |
|
|
disableClose: true, |
|
|
|
|
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|
|
|
|
|
data: { |
|
|
|
|
|
dashboard |
|
|
|
|
|
} |
|
|
} |
|
|
}).afterClosed(); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
manageOwnerAndGroups($event: Event, dashboard: DashboardInfo, config: EntityTableConfig<DashboardInfo>) { |
|
|
manageOwnerAndGroups($event: Event, dashboard: DashboardInfo, config: EntityTableConfig<DashboardInfo>) { |
|
|
@ -322,7 +314,7 @@ export class DashboardsTableConfigResolver { |
|
|
this.exportDashboard(action.event, action.entity); |
|
|
this.exportDashboard(action.event, action.entity); |
|
|
return true; |
|
|
return true; |
|
|
case 'import': |
|
|
case 'import': |
|
|
this.importDashboardFile(action.event, action.entity); |
|
|
this.importDashboardFile(action.event, action.entity, config); |
|
|
return true; |
|
|
return true; |
|
|
case 'manageOwnerAndGroups': |
|
|
case 'manageOwnerAndGroups': |
|
|
this.manageOwnerAndGroups(action.event, action.entity, config); |
|
|
this.manageOwnerAndGroups(action.event, action.entity, config); |
|
|
|