context-dashboard/context-dashboard.service.ts
constructor(inventory: InventoryService, tabs: TabsService, modal: ModalService, translateService: TranslateService, router: Router, navigator: NavigatorService, permissions: Permissions, alert: AlertService, dynamicComponent: DynamicComponentService, groupService: GroupService, optionsService: OptionsService)
|
||||||||||||||||||||||||||||||||||||
Parameters :
|
activateDashboards | |||||||||
activateDashboards(route: ActivatedRouteSnapshot, types: ContextDashboardType[])
|
|||||||||
Parameters :
Returns :
Observable<boolean | []>
|
addReportNavigatorNode | ||||||
addReportNavigatorNode(report: IManagedObject)
|
||||||
Parameters :
Returns :
void
|
Async canEditDashboard | ||||||||
canEditDashboard(mo: ContextDashboardManagedObject)
|
||||||||
Checks if user is able to edit dashboard according to his roles and dashboard ownership.
Parameters :
Returns :
Promise<boolean>
True if user is able to edit dashboard, false if he cannot. |
Async create | ||||||||||||||||
create(dashboardCfg: ContextDashboard, context?: ContextData, name: string)
|
||||||||||||||||
Parameters :
Returns :
unknown
|
createFragmentKey | ||||||||||||
createFragmentKey(contextDashboardType: ContextDashboardType, value: string)
|
||||||||||||
Creates fragment that associates dashboards with device/asset. It consists of three elements:
Parameters :
Returns :
string
Fragment for dashboard |
createReport | ||||||
createReport(reportCfg: Partial
|
||||||
Parameters :
Returns :
any
|
Async delete | ||||||||||||
delete(dashboard: ContextDashboardManagedObject, withConfirmation)
|
||||||||||||
Parameters :
Returns :
any
|
Async detail | ||||||
detail(dashboardMO: ContextDashboardManagedObject)
|
||||||
Parameters :
Returns :
unknown
|
Async getContextDashboards | |||||||||
getContextDashboards(mo: IManagedObject, dashboardType: ContextDashboardType[])
|
|||||||||
Parameters :
Returns :
Promise<IResultList<IManagedObject>>
|
getContextForGS | ||||||
getContextForGS(mo: IManagedObject)
|
||||||
Parameters :
Returns :
string | null
|
getDashboard$ | ||||||||||||
getDashboard$(dashboardIdOrName, dashboardType: ContextDashboardType[], mo?: IManagedObject)
|
||||||||||||
Parameters :
Returns :
any
|
getFilteredDashboardStyles | ||||||
getFilteredDashboardStyles(styleList: string[])
|
||||||
Parameters :
Returns :
any
|
getNamedDashboardOrCreate | ||||||||||||
getNamedDashboardOrCreate(name: string, defaultWidgets: Widget[], context?: ContextData)
|
||||||||||||
Parameters :
Returns :
any
|
getStyling | ||||||||
getStyling(styleList, styleName, defaultValue)
|
||||||||
Parameters :
Returns :
any
|
hasPermissionsToCopyDashboard |
hasPermissionsToCopyDashboard()
|
Checks if user has permissions to copy dashboard according to his roles.
Returns :
boolean
True if user has permissions to copy dashboard, false if he cannot. |
isDeviceDashboard | ||||||
isDeviceDashboard(dashboard: Partial
|
||||||
Parameters :
Returns :
boolean
|
isDeviceType | ||||||
isDeviceType(dashboard: Partial
|
||||||
Parameters :
Returns :
any
|
isGroupDashboard | ||||||
isGroupDashboard(dashboard: Partial
|
||||||
Parameters :
Returns :
boolean
|
isNamed | ||||||
isNamed(dashboard: Partial
|
||||||
Parameters :
Returns :
any
|
isReport | ||||||
isReport(dashboard: Partial
|
||||||
Parameters :
Returns :
any
|
mapWidgets | ||||||
mapWidgets(widgets: Widget[])
|
||||||
Parameters :
Returns :
any
|
Async navigateToDashboard | ||||||
navigateToDashboard(dashboardMO: ContextDashboardManagedObject)
|
||||||
Parameters :
Returns :
any
|
Async pasteDashboard | ||||||
pasteDashboard(newContext: DashboardContext)
|
||||||
Parameters :
Returns :
Promise<void>
|
shouldAllowToSetDashboardType | ||||||||||||
shouldAllowToSetDashboardType(mo: ContextDashboardManagedObject, context: ContextData)
|
||||||||||||
Indicates if dashboard can be set to type dashboard. First, it checks if deviceTypeValue exists and if user has permission to set dashboard type. Then, case from sensor app is checked- dashboard created with sensor app has deviceType set to true but type fragment is missing- we do not support this combination.
Parameters :
Returns :
AllowTypeDashboard
True if dashboard can be set to type dashboard, false if it is forbidden. |
Async update | |||||||||
update(dashboard: ContextDashboardManagedObject, context?: ContextData)
|
|||||||||
Parameters :
Returns :
Promise<ContextDashboardManagedObject>
|
updateDashboardHistory | |||||||||
updateDashboardHistory(dashboard: Partial
|
|||||||||
Parameters :
Returns :
Partial<ContextDashboardManagedObject>
|
updateNavigatorItem | ||||||
updateNavigatorItem(mo: IManagedObject)
|
||||||
Parameters :
Returns :
void
|
copyClipboard |
Type : DashboardCopyClipboard
|
dashboardTabs$ |
Type : Observable<Tab[]>
|
formDisabled$ |
Type : Observable<boolean>
|
queriesUtil |
Type : QueriesUtil
|
Readonly REPORT_PARTIAL_NAME |
Type : string
|
Default value : 'report_'
|
Readonly VERSION_HISTORY_SIZE_LIMIT |
Type : number
|
Default value : 10
|
formDisabled | ||||
getformDisabled()
|
||||
setformDisabled(value)
|
||||
Parameters :
Returns :
void
|