dnet-applications/frontends/dnet-is-application/src/app/contexts/context-viewer.component.html

58 lines
2.2 KiB
HTML

<h2>Context Viewer</h2>
<p>
<b>Context ID: </b>{{context?.id}}<br />
<b>Label: </b>{{context?.label}}<br />
<b>Type: </b>{{context?.type}}<br />
</p>
<p>
<a mat-stroked-button color="primary" [routerLink]="['/adv_resources/context']">
<mat-icon fontIcon="home"></mat-icon>
Return to contexts list
</a>
<button mat-stroked-button color="primary" (click)="showParamsDialog(context?.parameters)">
<mat-icon fontIcon="info"></mat-icon>
Global parameters
</button>
<a mat-stroked-button color="link" href="/api/contexts/{{context?.id}}" target="_blank">
<mat-icon fontIcon="download"></mat-icon>
Download
</a>
</p>
<ul>
<li *ngFor="let cat of categories" class="context-node">
<a (click)="populateNode(0, cat)" *ngIf="!(cat.populated || cat.nChilds == 0)"
style="margin-right: 0.5em;">[+{{cat.nChilds}}]</a>
<a title="{{cat.label}}" (click)="showParamsDialog(cat.parameters)" style="margin-right: 0.5em;">{{cat.id}}</a>
<span class="badge-label badge-info" *ngIf="cat.claim">claim</span>
<ul *ngIf="cat.childs && cat.childs.length > 0">
<li *ngFor="let c0 of cat.childs" class="context-node">
<a (click)="populateNode(1, c0)" *ngIf="!(c0.populated || c0.nChilds == 0)"
style="margin-right: 0.5em;">[+{{c0.nChilds}}]</a>
<a title="{{c0.label}" (click)="showParamsDialog(c0.parameters)" style="margin-right: 0.5em;">{{c0.id}}</a>
<span class="badge-label badge-info" *ngIf="c0.claim">claim</span>
<ul *ngIf="c0.childs && c0.childs.length > 0">
<li *ngFor="let c1 of c0.childs" class="context-node">
<a (click)="populateNode(2, c1)" *ngIf="!(c1.populated || c1.nChilds == 0)"
style="margin-right: 0.5em;">[+{{c1.nChilds}}]</a>
<a title="{{c1.label}}" (click)="showParamsDialog(c1.parameters)" style="margin-right: 0.5em;">{{c1.id}}</a>
<span class="badge-label badge-info" *ngIf="c1.claim">claim</span>
<ul *ngIf="c1.childs && c1.childs.length > 0">
<li *ngFor="let c2 of c1.childs" class="context-node">
<a title="{{c2.label}}" (click)="showParamsDialog(c2.parameters)"
style="margin-right: 0.5em;">{{c2.id}}</a>
<span class="badge-label badge-info" *ngIf="c2.claim">claim</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>