blob: 6ea5d9d57a8f1754545eccfd1afa2587d7b24732 [file] [log] [blame]
<div class="netopeer-content">
<div class="items_manipulation">
<button (click)="getSchemas()">Refresh</button>
<button (click)="showAddSchema()">Add</button>
<div *ngIf="addingSchema">
<hr/>
<div class="buttons">
<input #uploadSchema type="file" (change)="upload(uploadSchema.files[0])" name="schema" placeholder="Upload schema"/>
<span [ngSwitch]="addingResult">
<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>
<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>
</span>
</div>
</div>
<hr/>
</div>
<table class="items">
<tr class="item_header">
<th class="item_header_left">&nbsp;</th>
<th>name</th>
<th class="item_header_right">revision</th>
</tr>
<tr class="item" [class.selected]="schema === selectedSchema" *ngFor="let schema of schemas">
<td class="item_actions"><span class="item_action_delete" (click)="remove(schema)">x</span></td>
<td class="schema schema-name" (click)="onSelect(schema)">{{schema.name}}</td>
<td class="schema schema-revision" (click)="onSelect(schema)">{{schema.revision}}</td>
</tr>
</table>
<div *ngIf="selectedSchema">
<h3>{{selectedSchema.name}}<span *ngIf="selectedSchema.revision">@{{selectedSchema.revision}}</span></h3>
</div>
</div>