context-dashboard/dashboard-detail.component.ts
OnInit
OnChanges
OnDestroy
| providers |
DashboardDetailService
|
| selector | c8y-dashboard-detail |
| imports |
CollapseDirective
NgIf
TabsOutletComponent
RouterOutlet
C8yTranslatePipe
|
| templateUrl | ./dashboard-detail.component.html |
Properties |
Methods |
|
Inputs |
Outputs |
constructor(contextDashboardService: ContextDashboardService, translateService: TranslateService, contextRoute: ContextRouteService, activatedRoute: ActivatedRoute, tabsService: TabsService, router: Router, inventory: InventoryService, route: ActivatedRoute, dashboardDetailService: DashboardDetailService, appState: AppStateService, groupService: GroupService, modal: ModalService, gainsightService: GainsightService)
|
||||||||||||||||||||||||||||||||||||||||||
|
Parameters :
|
| context |
Type : any
|
| dashboard |
Type : ContextDashboard
|
| deviceType |
Type : string
|
| hideAvailability |
Type : boolean
|
Default value : false
|
| isNamedDashboard |
Type : boolean
|
| isReport |
Type : boolean
|
| mo |
Type : ContextDashboardManagedObject
|
| dashboardSaved |
Type : EventEmitter
|
| previewChanged |
Type : EventEmitter
|
| Async cancel |
cancel()
|
|
Returns :
any
|
| Async canDeactivate | ||||||||
canDeactivate(omitConfirm: unknown)
|
||||||||
|
Parameters :
Returns :
Promise<boolean>
|
| Async duplicateWithoutType |
duplicateWithoutType()
|
|
Returns :
Promise<void>
|
| ngAfterContentInit |
ngAfterContentInit()
|
|
Returns :
void
|
| ngOnChanges |
ngOnChanges()
|
|
Returns :
void
|
| ngOnDestroy |
ngOnDestroy()
|
|
Returns :
void
|
| Async ngOnInit |
ngOnInit()
|
|
Returns :
any
|
| Async revertDashboard | ||||||
revertDashboard(dashboard: ContextDashboard)
|
||||||
|
Parameters :
Returns :
any
|
| Async save |
save()
|
|
Returns :
any
|
| show | ||||||
show(isEdit: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| updateDashboardHistoryDescription | ||||||
updateDashboardHistoryDescription(dashboardChanges: string[])
|
||||||
|
Parameters :
Returns :
DashboardHistoryDescription
|
| allowTypeDashboard |
Type : AllowTypeDashboard
|
| currentContext |
Type : ContextData
|
| currentDashboard |
Type : ContextDashboard
|
| Public dashboardDetailService |
Type : DashboardDetailService
|
| dashboardDetailsForm |
Type : ReturnType<unknown>
|
| deviceTypeValue |
Type : string
|
| displayDeviceTypeValue |
Type : string
|
| icons |
Type : string[]
|
| isCollapsed |
Type : unknown
|
Default value : true
|
| isEdit |
Type : boolean
|
| tabs |
Type : Tab[]
|
Default value : []
|
| Readonly TABS_OUTLET_NAME |
Type : unknown
|
Default value : DASHBOARD_DETAILS_TABS_OUTLET_NAME
|
<div
class="collapse c8y-top-drawer"
[collapse]="isCollapsed"
[isAnimated]="true"
>
<div class="p-t-16 p-b-16 p-l-24 p-r-24 separator-bottom">
<span class="h4">{{ 'Dashboard settings' | translate }}</span>
</div>
<div
class="d-flex"
*ngIf="!isCollapsed"
>
<c8y-tabs-outlet
class="c8y-top-drawer--tabs"
[tabs]="tabs"
[outletName]="TABS_OUTLET_NAME"
[orientation]="'vertical'"
[openFirstTab]="true"
></c8y-tabs-outlet>
<div
class="inner-scroll c8y-top-drawer__tabs-container flex-grow p-l-24 p-r-lg-32 p-r-xs-24 p-r-sm-24"
>
<router-outlet name="dashboard-details"></router-outlet>
</div>
</div>
<div class="c8y-top-drawer--footer">
<button
class="btn btn-default"
title="{{ 'Cancel' | translate }}"
type="button"
data-cy="dashboard-detail--cancel-dashboard"
(click)="cancel()"
>
{{ 'Cancel' | translate }}
</button>
<button
class="btn btn-primary"
title="{{ 'Save' | translate }}"
type="button"
data-cy="dashboard-detail--save-dashboard"
(click)="save()"
[disabled]="((dashboardDetailsForm?.invalid || dashboardDetailsForm?.pristine) && this.isEdit) || dashboardDetailService.saveButtonDisabled"
>
{{ 'Save' | translate }}
</button>
</div>
</div>