blob: 689445f6c0c6a6f0bb8988c771940a62a286b015 [file] [log] [blame]
Sean Condond6f95bf2020-01-21 10:10:23 +00001<!--
2~ Copyright 2018-present Open Networking Foundation
3~
4~ Licensed under the Apache License, Version 2.0 (the "License");
5~ you may not use this file except in compliance with the License.
6~ You may obtain a copy of the License at
7~
8~ http://www.apache.org/licenses/LICENSE-2.0
9~
10~ Unless required by applicable law or agreed to in writing, software
11~ distributed under the License is distributed on an "AS IS" BASIS,
12~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13~ See the License for the specific language governing permissions and
14~ limitations under the License.
15-->
16
17<!-- YANG Model partial HTML -->
Sean Condon8649b092020-01-22 10:39:35 +000018<div id="ov-yang-model" (dragover)="onDragOver($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)">
19 <onos-flash id="appMsgFlash" message="{{ alertMsg }}" dwell="5000" warning="true" (closed)="alertMsg = ''"></onos-flash>
Sean Condond6f95bf2020-01-21 10:10:23 +000020 <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
21 <div class="tabular-header">
22 <h2>YANG Models ({{tableData.length}} total)</h2>
23 <div class="ctrl-btns">
24 <div class="refresh" (click)="toggleRefresh()">
25 <onos-icon [classes]="autoRefresh?'active refresh':'refresh'"
26 [iconId]="'refresh'" [iconSize]="36"
27 [toolTip]="autoRefreshTip"></onos-icon>
28 </div>
29 <div class="separator"></div>
Sean Condond6f95bf2020-01-21 10:10:23 +000030 <div class="active" (click)="triggerForm()">
Sean Condon8649b092020-01-22 10:39:35 +000031 <onos-icon [classes]="'details-icon upload'" [iconSize]="36"
32 [iconId]="'nav_yang'" [toolTip]="'Upload a YANG file (.zip,.jar,.yang)'"></onos-icon>
Sean Condond6f95bf2020-01-21 10:10:23 +000033 </div>
Sean Condon8649b092020-01-22 10:39:35 +000034 <form #inputYangFileForm="ngForm">
35 <input id="uploadYangFile" hidden
36 type="file" size="50" accept=".zip,.jar,.yang"
37 name="yangFile" (change)="fileEvent($event)">
38 </form>
39 </div>
40
41 <div class="search">
42 <input id="searchinput" [(ngModel)]="tableDataFilter.queryStr" type="search" #search placeholder="Search"/>
43 <!--(keyup)="onSearch(search.value)" (search)="onSearch(search.value)"/>-->
44 <select [(ngModel)]="tableDataFilter.queryBy">
45 <!--(change)="onSearchBy($event)" (change)="search.value = ''">-->
46 <option value="" disabled>Search By</option>
47 <option value="$">All Fields</option>
48 <option value="id">ModelId</option>
49 <option value="module">Module</option>
50 <option value="revision">Revision</option>
51 </select>
Sean Condond6f95bf2020-01-21 10:10:23 +000052 </div>
53 </div>
54
55 <div class="summary-list" onosTableResize>
56 <div class="table-header">
57 <table>
58 <tr>
Sean Condon8649b092020-01-22 10:39:35 +000059 <th colId="modelId" [ngStyle]="{width: '32px'}" class="table-icon" (click)="onSort('modelId')">Model ID
60 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('modelId')"></onos-icon>
61 </th>
62 <th colId="id" [ngStyle]="{width: '32px'}" class="table-icon" (click)="onSort('id')">Module
63 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('id')"></onos-icon>
64 </th>
65 <th colId="revision" [ngStyle]="{width: '32px'}" class="table-icon" (click)="onSort('revision')">Revision
66 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('revision')"></onos-icon>
67 </th>
Sean Condond6f95bf2020-01-21 10:10:23 +000068 </tr>
69 </table>
70 </div>
71
72 <div class="table-body">
73 <table>
74 <tr class="table-body" *ngIf="tableData.length === 0" class="no-data">
75 <td colspan="9">{{ annots.noRowsMsg }}</td>
76 </tr>
77 <tr *ngFor="let ymodel of tableData | filter: tableDataFilter"
78 (click)="selectCallback($event, ymodel)"
79 [ngClass]="{selected: ymodel.id === selId, 'data-change': isChanged(ymodel.id)}">
80 <td>{{ymodel.modelId}}</td>
81 <td>{{ymodel.id}}</td>
82 <td>{{ymodel.revision}}</td>
83 </tr>
84 </table>
85 </div>
86 </div>
87
88 <onos-yangdetails class="floatpanels" [id]="selId" [modelId]="selectedModel?.modelId" [revision]="selectedModel?.revision"
89 (closeEvent)="deselectRow($event)"></onos-yangdetails>
90
91</div>
92