Radek Krejci | 010475d | 2018-03-08 13:14:19 +0100 | [diff] [blame] | 1 | <div *ngIf="node['info']['type'] != 8 || node['first']" class="node" |
| 2 | [class.dirty]="node['dirty']" |
| 3 | [class.deleted]="modsService.isDeleted(node)" |
| 4 | [class.moved]="modsService.isMoved(activeSession, node)" |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 5 | [class.yang-container]="node['info']['type'] == 1" |
| 6 | [class.yang-leaf]="node['info']['type'] == 4" |
| 7 | [class.yang-leaflist]="node['info']['type'] == 8" |
| 8 | [class.yang-list]="node['info']['type'] == 16"> |
| 9 | <tree-indent [node]="node" [indentation]="indentation"></tree-indent> |
| 10 | <img class="icon" src="assets/netopeer/icons/info.svg" alt="info" title="{{node['info']['dsc']}}" |
| 11 | onmouseover="this.src='assets/netopeer/icons/info_active.svg'" |
| 12 | onmouseout="this.src='assets/netopeer/icons/info.svg'"/> |
| 13 | |
| 14 | <!-- BEGIN nodetype-specific code --> |
| 15 | <!-- leaf --> |
| 16 | <ng-container *ngIf="node['info']['type'] == 4 || (node['new'] && node['info']['type'] == 8)"> |
| 17 | <ng-container *ngIf="node['info']['key']"> |
| 18 | <img class="icon" src="assets/netopeer/icons/key.svg" alt="key" title="list key"/> |
| 19 | </ng-container> |
| 20 | <ng-container *ngIf="node['info']['config'] && !node['deleted'] && (!node['info']['key'] || node['new']) && node['info']['datatypebase'] != 'empty'"> |
| 21 | <img *ngIf="!node['edit']" class="icon_action" src="assets/netopeer/icons/edit.svg" |
| 22 | alt="edit" title="edit value" tabindex=0 |
| 23 | (click)="startEditing(node, $event.target);" (keyup.enter)="startEditing(node, $event.target);" |
| 24 | onmouseover="this.src='assets/netopeer/icons/edit_active.svg'" |
| 25 | onmouseout="this.src='assets/netopeer/icons/edit.svg'"/> |
| 26 | <img *ngIf="node['edit']" class="icon" src="assets/netopeer/icons/edit.svg" alt="edit" title="editing value"/> |
| 27 | </ng-container> |
| 28 | </ng-container> |
| 29 | |
| 30 | <!-- container and lists --> |
| 31 | <ng-container *ngIf="!node['new'] && !node['deleted'] && ((node['info']['type'] == 16 || node['info']['type'] == 1)) && treeService.expandable(node)"> |
Radek Krejci | d0fac3b | 2018-03-13 16:55:47 +0100 | [diff] [blame] | 32 | <img *ngIf="treeService.hasHiddenChild(activeSession, node)" (click)="sessionsService.expand(activeSession, node, true)" |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 33 | class="icon_action" src="assets/netopeer/icons/show_all.svg" |
| 34 | onmouseover="this.src='assets/netopeer/icons/show_all_active.svg'" |
| 35 | onmouseout="this.src='assets/netopeer/icons/show_all.svg'" alt="show-all" title="expand subtree"/> |
Radek Krejci | d0fac3b | 2018-03-13 16:55:47 +0100 | [diff] [blame] | 36 | <img *ngIf="treeService.isHidden(activeSession, node)" (click)="sessionsService.expand(activeSession, node, false)" |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 37 | class="icon_action" src="assets/netopeer/icons/show_children.svg" |
| 38 | onmouseover="this.src='assets/netopeer/icons/show_children_active.svg'" |
| 39 | onmouseout="this.src='assets/netopeer/icons/show_children.svg'" alt="show-children" title="expand children"/> |
Radek Krejci | d0fac3b | 2018-03-13 16:55:47 +0100 | [diff] [blame] | 40 | <img *ngIf="!treeService.isHidden(activeSession, node)" (click)="sessionsService.collapse(activeSession, node)" |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 41 | class="icon_action" src="assets/netopeer/icons/collapse.svg" alt="collapse" title="collapse" |
| 42 | onmouseover="this.src='assets/netopeer/icons/collapse_active.svg'" |
| 43 | onmouseout="this.src='assets/netopeer/icons/collapse.svg'"/> |
| 44 | </ng-container> |
| 45 | |
| 46 | <div class="node_info"><span class="node_name">{{node['info']['name']}}</span> |
| 47 | <!-- list's keys --> |
| 48 | <span *ngIf="node['info']['type'] == 16" class="keys">* [{{node['keys']}}]</span> |
| 49 | |
| 50 | <!-- leaf and leaflists --> |
| 51 | <span *ngIf="node['info']['type'] == 8 || node['info']['type'] == 4">:</span> |
| 52 | |
| 53 | <!-- leaf --> |
| 54 | <ng-container *ngIf="node['info']['type'] == 4"> |
Radek Krejci | a6e015b | 2018-03-09 15:23:29 +0100 | [diff] [blame] | 55 | <span *ngIf="!node['edit']" class="value_inline" [class.keys]="!isEditable(node)" [class.editable]="isEditable(node)" |
| 56 | (click)="startEditing(node, $event.target);">{{node['value']}}</span> |
Radek Krejci | 38b0a0b | 2018-08-03 10:17:03 +0200 | [diff] [blame^] | 57 | <a *ngIf="node['info']['datatypebase'] == 'identityref'" class="value_inline" |
| 58 | (click)="showIdentity(node)" title="open identity information in YANG Explorer">info</a> |
Radek Krejci | a6e015b | 2018-03-09 15:23:29 +0100 | [diff] [blame] | 59 | <span *ngIf="node['edit']" class="value_inline">{{node['info']['datatype']}} |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 60 | <span *ngIf="node['info']['datatype'] != node['info']['datatypebase']">({{node['info']['datatypebase']}})</span> |
| 61 | </span> |
| 62 | </ng-container> |
| 63 | <ng-container *ngIf="node['info']['type'] == 8"> |
| 64 | <span class="value_inline">{{node['info']['datatype']}} |
| 65 | <span *ngIf="node['info']['datatype'] != node['info']['datatypebase']">({{node['info']['datatypebase']}})</span> |
| 66 | </span> |
| 67 | </ng-container> |
| 68 | </div> |
| 69 | <!-- END nodetype-specific code --> |
| 70 | |
Radek Krejci | 010475d | 2018-03-08 13:14:19 +0100 | [diff] [blame] | 71 | <div class="module_name" (click)="showSchema(node)" title="open schema {{node['info']['module']}} in YANG Explorer">{{treeService.moduleName(node)}}</div> |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 72 | </div> |
| 73 | |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 74 | <!-- leaf/leaf-list's edit value --> |
Radek Krejci | 010475d | 2018-03-08 13:14:19 +0100 | [diff] [blame] | 75 | <tree-edit *ngIf="node['edit'] && node['info']['type'] == 4" [node]="node" [indentation]="indentation" [activeSession]="activeSession"></tree-edit> |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 76 | |
| 77 | <!-- END nodetype-specific code --> |
| 78 | |
| 79 | <!-- recursion - show children --> |
| 80 | <div class="loading" *ngIf="node['loading']"> |
| 81 | <netopeer-loading></netopeer-loading> |
| 82 | </div> |
Radek Krejci | d0fac3b | 2018-03-13 16:55:47 +0100 | [diff] [blame] | 83 | <div class="children" *ngIf="(node['children'] || node['newChildren']) && !node['deleted'] && !treeService.isHidden(activeSession, node)"> |
Radek Krejci | 30ce159 | 2018-03-01 14:44:14 +0100 | [diff] [blame] | 84 | <ng-container *ngFor="let child of treeService.childrenToShow(node)"> |
| 85 | <tree-view [node]="child" [indentation]="treeService.inheritIndentation(indentation, node)"></tree-view> |
| 86 | </ng-container> |
| 87 | </div> |
| 88 | |
| 89 | <!-- create new child dialog --> |
Radek Krejci | 010475d | 2018-03-08 13:14:19 +0100 | [diff] [blame] | 90 | <tree-create [node]="node" [activeSession]="activeSession" [indentation]="treeService.inheritIndentation(indentation, node)"></tree-create> |