blob: 460a8f6dc063c7716cf3ff82d49ccd6f9d9cfe65 [file] [log] [blame]
Radek Krejci010475d2018-03-08 13:14:19 +01001<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 Krejci30ce1592018-03-01 14:44:14 +01005 [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 Krejcid0fac3b2018-03-13 16:55:47 +010032 <img *ngIf="treeService.hasHiddenChild(activeSession, node)" (click)="sessionsService.expand(activeSession, node, true)"
Radek Krejci30ce1592018-03-01 14:44:14 +010033 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 Krejcid0fac3b2018-03-13 16:55:47 +010036 <img *ngIf="treeService.isHidden(activeSession, node)" (click)="sessionsService.expand(activeSession, node, false)"
Radek Krejci30ce1592018-03-01 14:44:14 +010037 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 Krejcid0fac3b2018-03-13 16:55:47 +010040 <img *ngIf="!treeService.isHidden(activeSession, node)" (click)="sessionsService.collapse(activeSession, node)"
Radek Krejci30ce1592018-03-01 14:44:14 +010041 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 Krejcia6e015b2018-03-09 15:23:29 +010055 <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 Krejci38b0a0b2018-08-03 10:17:03 +020057 <a *ngIf="node['info']['datatypebase'] == 'identityref'" class="value_inline"
58 (click)="showIdentity(node)" title="open identity information in YANG Explorer">info</a>
Radek Krejcia6e015b2018-03-09 15:23:29 +010059 <span *ngIf="node['edit']" class="value_inline">{{node['info']['datatype']}}
Radek Krejci30ce1592018-03-01 14:44:14 +010060 <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 Krejci010475d2018-03-08 13:14:19 +010071 <div class="module_name" (click)="showSchema(node)" title="open schema {{node['info']['module']}} in YANG Explorer">{{treeService.moduleName(node)}}</div>
Radek Krejci30ce1592018-03-01 14:44:14 +010072</div>
73
Radek Krejci30ce1592018-03-01 14:44:14 +010074<!-- leaf/leaf-list's edit value -->
Radek Krejci010475d2018-03-08 13:14:19 +010075<tree-edit *ngIf="node['edit'] && node['info']['type'] == 4" [node]="node" [indentation]="indentation" [activeSession]="activeSession"></tree-edit>
Radek Krejci30ce1592018-03-01 14:44:14 +010076
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 Krejcid0fac3b2018-03-13 16:55:47 +010083<div class="children" *ngIf="(node['children'] || node['newChildren']) && !node['deleted'] && !treeService.isHidden(activeSession, node)">
Radek Krejci30ce1592018-03-01 14:44:14 +010084 <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 Krejci010475d2018-03-08 13:14:19 +010090<tree-create [node]="node" [activeSession]="activeSession" [indentation]="treeService.inheritIndentation(indentation, node)"></tree-create>