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
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
      class="interact"
      *cdkTreeNodeDef="let node"
      (click)="toggleFocusedNode(node)"
      [ngClass]="{ strong: isFocusedNode(node) }"
    >
      <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 role="group">
        <div class="d-flex a-i-center">
          <button
            class="btn-clean text-primary m-r-4"
            title="{{ 'Expand node' | translate }}"
            cdkTreeNodeToggle
            [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
            class="interact"
            (click)="toggleFocusedNode(node)"
            [ngClass]="{ strong: isFocusedNode(node) }"
          >
            {{ 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>
      </div>
    </cdk-nested-tree-node>
  </cdk-tree>
</div>
<div
  class="p-t-8"
  *ngIf="loading"
>
  <c8y-loading></c8y-loading>
</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 ""