frontend FEATURE support creatin new top-level configuration data
diff --git a/frontend/config/tree.component.html b/frontend/config/tree.component.html
index b41c612..d6fe16b 100644
--- a/frontend/config/tree.component.html
+++ b/frontend/config/tree.component.html
@@ -1,4 +1,42 @@
-<div class="subtree" *ngIf="node['info']['config'] || activeSession.statusVisibility" [class.status]="!node['info']['config']">
+<div *ngIf="node['path'] == '/'">
+ <!-- recursion - show children -->
+ <div class="node">
+ <tree-indent [node]="node" [indentation]="indentation" [type]="'root'"
+ (onOpenCreatingDialog)="openCreatingDialog($event.element, $event.node, $event.parent)">
+ </tree-indent>
+ </div>
+ <div class="children" *ngIf="node['children'] || node['newChildren']">
+ <ng-container *ngFor="let child of node['children']">
+ <tree-view [node]="child" [root]="root"></tree-view>
+ </ng-container>
+ <ng-container *ngFor="let child of newChildrenToShow(node)">
+ <tree-view [node]="child" [root]="root"></tree-view>
+ </ng-container>
+ </div>
+
+ <!-- create new child dialog -->
+ <div id="{{node['path']}}_createChildDialog" class="node_edit" *ngIf="node['creatingChild']" [class.dialog]="node['schemaChildren']"
+ treeScrollTo [node]="node">
+ <ng-container *ngIf="node['schemaChildren'].length; else nothingToCreate">
+ <tree-indent [node]="node" [indentation]="indentation" [type]="'edit'"
+ (onCloseCreatingDialog)="closeCreatingDialog($event)"></tree-indent>
+ <select #nodeSelect (change)="creatingDialogSelect(node, $event.target.value, $event.currentTarget)">
+ <option disabled selected value="-1" style="display:none"> </option>
+ <ng-container *ngFor="let schema of node['schemaChildren']; let i='index'">
+ <option value="{{i}}">{{schemaInfoName(node, schema)}}</option>
+ </ng-container>
+ </select>
+ <!-- <pre>{{node['schemaChildren'] | json}}</pre> -->
+ </ng-container>
+ <ng-template #nothingToCreate>
+ <div class="msg-failure msg-rounded">
+ <span class="msg-close" (click)="closeCreatingDialog(node);">x</span>There is no element to create at {{node['path']}}.
+ </div>
+ </ng-template>
+ </div>
+</div>
+<div class="subtree" *ngIf="node['path'] != '/' && (node['info']['config'] || activeSession.statusVisibility)"
+ [class.status]="!node['info']['config']">
<div class="node" [class.dirty]="node['dirty']" [class.deleted]="node['deleted']">
<tree-indent [node]="node" [indentation]="indentation"
@@ -99,10 +137,10 @@
</div>
<div class="children" *ngIf="(node['children'] || node['newChildren']) && !node['deleted']">
<ng-container *ngFor="let child of node['children']">
- <tree-view [node]="child" [indentation]="inheritIndentation(node)"></tree-view>
+ <tree-view [node]="child" [root]="root" [indentation]="inheritIndentation(node)"></tree-view>
</ng-container>
<ng-container *ngFor="let child of newChildrenToShow(node)">
- <tree-view [node]="child" [indentation]="inheritIndentation(node)"></tree-view>
+ <tree-view [node]="child" [root]="root" [indentation]="inheritIndentation(node)"></tree-view>
</ng-container>
</div>