protocol-opcua/opcua-address-space-tree.component.ts
selector | opcua-address-space-tree |
templateUrl | ./opcua-address-space-tree.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(addressSpaceService: AddressSpaceService, opcuaService: OpcuaService, alertService: AlertService)
|
||||||||||||
Parameters :
|
focusEmitter |
Type : EventEmitter<AddressSpaceNode>
|
Default value : new EventEmitter<AddressSpaceNode>()
|
moId |
Type : string
|
node |
Type : any
|
selectedNode |
Type : EventEmitter<AddressSpaceNode>
|
getIcon | ||||
getIcon(nodeClassName)
|
||||
Parameters :
Returns :
any
|
getMoId |
getMoId()
|
Returns :
any
|
initializeDataSet |
initializeDataSet()
|
Returns :
void
|
isFocusedNode | ||||||
isFocusedNode(node: AddressSpaceNode)
|
||||||
Parameters :
Returns :
boolean
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Async openNode | ||||||
openNode(nodeNavData: NodeNavigationData)
|
||||||
Parameters :
Returns :
any
|
setChildNodes | |||||||||
setChildNodes(nodes: AddressSpaceNode[], ids: string[])
|
|||||||||
Parameters :
Returns :
void
|
Async setupTree | ||||||
setupTree(nodeId?: string)
|
||||||
Parameters :
Returns :
any
|
toggleFocusedNode | ||||
toggleFocusedNode(node)
|
||||
Parameters :
Returns :
void
|
dataSource |
Type : DynamicDataSource
|
Default value : null
|
focused |
Type : AddressSpaceNode
|
getChildren |
Default value : () => {...}
|
hasChild |
Default value : () => {...}
|
loading |
Type : boolean
|
Default value : false
|
nestedTreeControl |
Type : NestedTreeControl<AddressSpaceNode>
|
nodeNavDataSubscription |
Type : Subscription
|
subscriptionRef |
Type : Subscription
|
moId | ||||||
setmoId(id: string)
|
||||||
Parameters :
Returns :
void
|
<div class="card-block" *ngIf="dataSource && !loading">
<cdk-tree [dataSource]="dataSource" [treeControl]="nestedTreeControl">
<!-- This is the tree node template for leaf nodes -->
<cdk-nested-tree-node
*cdkTreeNodeDef="let node"
(click)="toggleFocusedNode(node)"
[ngClass]="{ strong: isFocusedNode(node) }"
class="interact"
>
<span>
<i
class="m-r-4 interact"
[c8yIcon]="getIcon(node.nodeClassName)"
[ngClass]="{ strong: isFocusedNode(node) }"
></i>
{{ node.displayName }}
</span>
</cdk-nested-tree-node>
<!-- This is the tree node template for expandable nodes -->
<cdk-nested-tree-node *cdkTreeNodeDef="let node; when: hasChild">
<div class="flex-row">
<button
cdkTreeNodeToggle
class="btn-clean text-primary m-r-4"
[disabled]="node.currentlyLoadingChildren"
>
<i
[ngClass]="{ 'dlt-c8y-icon-plus-square': !node.expanded, 'dlt-c8y-icon-minus-square': node.expanded }"
></i>
</button>
<i
class="m-r-4 interact"
[c8yIcon]="getIcon(node.nodeClassName)"
></i>
<span
(click)="toggleFocusedNode(node)"
[ngClass]="{ strong: isFocusedNode(node) }"
class="interact"
>
{{ node.displayName }}
</span>
<span
class="m-l-4"
[style.visibility]="node.currentlyLoadingChildren ? 'visible' : 'hidden'"
>
<i class="dlt-c8y-icon-circle-o-notch icon-spin"></i>
</span>
</div>
<ng-container cdkTreeNodeOutlet></ng-container>
</cdk-nested-tree-node>
</cdk-tree>
</div>
<div class="p-8" *ngIf="loading">
<div class="spinner p-relative">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
</div>
<div class="alert alert-info m-t-16" *ngIf="!dataSource && !loading" translate>
No source data available to fetch address space.
</div>