File

protocol-opcua/opcua-address-space-tree.component.ts

Implements

OnInit OnDestroy OnChanges

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(addressSpaceService: AddressSpaceService, opcuaService: OpcuaService, alertService: AlertService)
Parameters :
Name Type Optional
addressSpaceService AddressSpaceService No
opcuaService OpcuaService No
alertService AlertService No

Inputs

focusEmitter
Type : EventEmitter<AddressSpaceNode>
Default value : new EventEmitter<AddressSpaceNode>()
moId
Type : string
node
Type : any

Outputs

selectedNode
Type : EventEmitter<AddressSpaceNode>

Methods

getIcon
getIcon(nodeClassName)
Parameters :
Name Optional
nodeClassName No
Returns : any
getMoId
getMoId()
Returns : any
initializeDataSet
initializeDataSet()
Returns : void
isFocusedNode
isFocusedNode(node: AddressSpaceNode)
Parameters :
Name Type Optional
node AddressSpaceNode No
Returns : boolean
ngOnChanges
ngOnChanges(changes: SimpleChanges)
Parameters :
Name Type Optional
changes SimpleChanges No
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
Async openNode
openNode(nodeNavData: NodeNavigationData)
Parameters :
Name Type Optional
nodeNavData NodeNavigationData No
Returns : any
setChildNodes
setChildNodes(nodes: AddressSpaceNode[], ids: string[])
Parameters :
Name Type Optional
nodes AddressSpaceNode[] No
ids string[] No
Returns : void
Async setupTree
setupTree(nodeId?: string)
Parameters :
Name Type Optional
nodeId string Yes
Returns : any
toggleFocusedNode
toggleFocusedNode(node)
Parameters :
Name Optional
node No
Returns : void

Properties

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

Accessors

moId
setmoId(id: string)
Parameters :
Name Type Optional
id string No
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>

results matching ""

    No results matching ""