Radek Krejci | b479496 | 2017-09-21 14:16:28 +0200 | [diff] [blame] | 1 | <div class="netopeer-content"> |
| 2 | |
Radek Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 3 | <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 Krejci | 80e003e | 2017-09-21 14:20:20 +0200 | [diff] [blame] | 10 | <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 Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 14 | </div> |
| 15 | </div> |
| 16 | <hr/> |
| 17 | </div> |
| 18 | |
Radek Krejci | 80e003e | 2017-09-21 14:20:20 +0200 | [diff] [blame] | 19 | <table class="items"> |
| 20 | <tr class="item_header"> |
Radek Krejci | ae75839 | 2017-10-20 10:53:26 +0200 | [diff] [blame] | 21 | <th class="item_left"> </th> |
Radek Krejci | 80e003e | 2017-09-21 14:20:20 +0200 | [diff] [blame] | 22 | <th>name</th> |
Radek Krejci | ae75839 | 2017-10-20 10:53:26 +0200 | [diff] [blame] | 23 | <th class="item_right">revision</th> |
Radek Krejci | 80e003e | 2017-09-21 14:20:20 +0200 | [diff] [blame] | 24 | </tr> |
| 25 | <tr class="item" [class.selected]="schema === selectedSchema" *ngFor="let schema of schemas"> |
Radek Krejci | e1a9850 | 2017-11-03 15:44:39 +0100 | [diff] [blame] | 26 | <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 Krejci | 80e003e | 2017-09-21 14:20:20 +0200 | [diff] [blame] | 32 | <td class="schema schema-name" (click)="onSelect(schema)">{{schema.name}}</td> |
Radek Krejci | ae75839 | 2017-10-20 10:53:26 +0200 | [diff] [blame] | 33 | <td class="item_right schema schema-revision" (click)="onSelect(schema)">{{schema.revision}}</td> |
Radek Krejci | 80e003e | 2017-09-21 14:20:20 +0200 | [diff] [blame] | 34 | </tr> |
| 35 | </table> |
Radek Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 36 | |
| 37 | <div *ngIf="selectedSchema"> |
| 38 | <h3>{{selectedSchema.name}}<span *ngIf="selectedSchema.revision">@{{selectedSchema.revision}}</span></h3> |
Radek Krejci | b479496 | 2017-09-21 14:16:28 +0200 | [diff] [blame] | 39 | </div> |
| 40 | |
Radek Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 41 | </div> |