blob: 58cb62be852df7ee3d63c24e0cdf68976dbd0749 [file] [log] [blame]
Radek Krejcib4794962017-09-21 14:16:28 +02001<div class="netopeer-content">
2
Radek Krejcid23f0df2017-08-31 16:34:49 +02003<div class="items_manipulation">
4 <button (click)="getSchemas()">Refresh</button>
5 <button (click)="showAddSchema()">Add</button>
6 <div *ngIf="addingSchema">
7 <hr/>
8 <div class="buttons">
9 <input #uploadSchema type="file" (change)="upload(uploadSchema.files[0])" name="schema" placeholder="Upload schema"/>
Radek Krejci80e003e2017-09-21 14:20:20 +020010 <span [ngSwitch]="addingResult">
11 <span *ngSwitchCase="0" class="msg-rounded msg-failure"><span class="msg-close" (click)="addingResult=-1">x</span>Parsing {{uploadSchema.value.replace("C:\\fakepath\\","")}} failed.</span>
12 <span *ngSwitchCase="1" class="msg-rounded msg-success"><span class="msg-close" (click)="addingResult=-1">x</span>Schema {{uploadSchema.value.replace("C:\\fakepath\\","")}} successfully added.</span>
13 </span>
Radek Krejcid23f0df2017-08-31 16:34:49 +020014 </div>
15 </div>
16 <hr/>
17</div>
18
Radek Krejci80e003e2017-09-21 14:20:20 +020019<table class="items">
20 <tr class="item_header">
Radek Krejciae758392017-10-20 10:53:26 +020021 <th class="item_left">&nbsp;</th>
Radek Krejci80e003e2017-09-21 14:20:20 +020022 <th>name</th>
Radek Krejciae758392017-10-20 10:53:26 +020023 <th class="item_right">revision</th>
Radek Krejci80e003e2017-09-21 14:20:20 +020024 </tr>
25 <tr class="item" [class.selected]="schema === selectedSchema" *ngFor="let schema of schemas">
Radek Krejcie1a98502017-11-03 15:44:39 +010026 <td class="item_left item_actions">
27 <img class="item_action_delete" (click)="remove(schema)"
28 src="assets/netopeer/icons/close.svg" alt="x" title="delete"
29 onmouseover="this.src='assets/netopeer/icons/close_active.svg'"
30 onmouseout="this.src='assets/netopeer/icons/close.svg'"/>
31 </td>
Radek Krejci80e003e2017-09-21 14:20:20 +020032 <td class="schema schema-name" (click)="onSelect(schema)">{{schema.name}}</td>
Radek Krejciae758392017-10-20 10:53:26 +020033 <td class="item_right schema schema-revision" (click)="onSelect(schema)">{{schema.revision}}</td>
Radek Krejci80e003e2017-09-21 14:20:20 +020034 </tr>
35</table>
Radek Krejcid23f0df2017-08-31 16:34:49 +020036
37<div *ngIf="selectedSchema">
38 <h3>{{selectedSchema.name}}<span *ngIf="selectedSchema.revision">@{{selectedSchema.revision}}</span></h3>
Radek Krejcib4794962017-09-21 14:16:28 +020039</div>
40
Radek Krejcid23f0df2017-08-31 16:34:49 +020041</div>