Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 1 | <!-- |
| 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 | <div id="ov-device"> |
Sean Condon | 95fb574 | 2019-04-02 12:16:55 +0100 | [diff] [blame^] | 17 | <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading> |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 18 | <div class="tabular-header"> |
| 19 | <h2>Devices ({{ tableData.length }} total)</h2> |
| 20 | <div class="ctrl-btns"> |
| 21 | <div class="refresh" (click)="toggleRefresh()"> |
| 22 | <!-- See icon.theme.css for the defintions of the classes active and refresh--> |
| 23 | <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon> |
| 24 | </div> |
| 25 | <div class="separator"></div> |
| 26 | |
| 27 | <div> |
| 28 | <onos-icon classes="{{ selId ? 'current-view':undefined }}" iconId="deviceTable" iconSize="42"></onos-icon> |
| 29 | </div> |
| 30 | |
| 31 | <div (click)="navto('/flow')"> |
| 32 | <onos-icon classes="{{ selId ? 'active-rect' :undefined}}" iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon> |
| 33 | </div> |
| 34 | |
| 35 | <div (click)="navto('/port')"> |
| 36 | <onos-icon classes="{{ selId ? 'active-rect' :undefined}}" iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon> |
| 37 | </div> |
| 38 | |
| 39 | <div (click)="navto('/group')"> |
| 40 | <onos-icon classes="{{ selId ? 'active-rect' :undefined}}" iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon> |
| 41 | </div> |
| 42 | |
| 43 | <div (click)="navto('/meter')"> |
| 44 | <onos-icon classes="{{ selId ? 'active-rect' :undefined}}" iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon> |
| 45 | </div> |
| 46 | |
| 47 | <div (click)="navto('/pipeconf')"> |
| 48 | <onos-icon classes="{{ selId ? 'active-rect' :undefined}}" iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon> |
| 49 | </div> |
| 50 | </div> |
| 51 | <div class="search"> |
| 52 | <input id="searchinput" [(ngModel)]="tableDataFilter.queryStr" type="search" #search placeholder="Search" /> |
| 53 | <select [(ngModel)]="tableDataFilter.queryBy"> |
| 54 | <option value="" disabled>Search By</option> |
| 55 | <option value="$">All Fields</option> |
| 56 | <option value="id">Device-Id</option> |
| 57 | <option value="name">Name</option> |
| 58 | <option value="protocol">Protocol</option> |
| 59 | </select> |
| 60 | </div> |
| 61 | </div> |
| 62 | |
| 63 | <div id="summary-list" class="summary-list" onosTableResize> |
| 64 | <div class="table-header"> |
| 65 | <table> |
| 66 | <tr> |
| 67 | <td colId="available" class="table-icon"></td> |
| 68 | <td colId="type" class="table-icon"></td> |
| 69 | <td colId="name" (click)="onSort('name')">Friendly Name |
| 70 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('name')"></onos-icon> |
| 71 | </td> |
| 72 | <td colId="id" (click)="onSort('id')">Device ID |
| 73 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('id')"></onos-icon> |
| 74 | </td> |
| 75 | <td colId="masterid" [ngClass]="{width: '130px'}" (click)="onSort('masterid')">Master |
| 76 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('masterid')"></onos-icon> |
| 77 | </td> |
| 78 | <td colId="num_ports" [ngClass]="{width: '70px'}" (click)="onSort('num_ports')">Ports |
| 79 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('num_ports')"></onos-icon> |
| 80 | </td> |
| 81 | <td colId="mfr" (click)="onSort('mfr')">Vendor |
| 82 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('mfr')"></onos-icon> |
| 83 | </td> |
| 84 | <td colId="hw" (click)="onSort('hw')">H/W Version |
| 85 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('hw')"></onos-icon> |
| 86 | </td> |
| 87 | <td colId="sw" (click)="onSort('sw')">S/W Version |
| 88 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('sw')"></onos-icon> |
| 89 | </td> |
| 90 | <td colId="protocol" [ngClass]="{width: '100px'}" (click)="onSort('protocol')">Protocol |
| 91 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('protocol')"></onos-icon> |
| 92 | </td> |
| 93 | </tr> |
| 94 | </table> |
| 95 | </div> |
| 96 | <div class="table-body"> |
| 97 | <table> |
| 98 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 99 | <td colspan="9">{{ annots.noRowsMsg }}</td> |
| 100 | </tr> |
| 101 | <tr *ngFor="let dev of tableData | filter : tableDataFilter" (click)="selectCallback($event, dev)" [ngClass]="{selected: dev.id === selId, 'data-change': isChanged(dev.id)}"> |
| 102 | <td class="table-icon"> |
| 103 | <onos-icon classes="{{ dev._iconid_available}}" iconId={{dev._iconid_available}}></onos-icon> |
| 104 | </td> |
| 105 | <td class="table-icon"> |
| 106 | <onos-icon classes="{{dev._iconid_type? 'active-type':undefined}}" iconId="{{dev._iconid_type}}"></onos-icon> |
| 107 | </td> |
| 108 | <td>{{ dev.name }}</td> |
| 109 | <td>{{ dev.id }}</td> |
| 110 | <td>{{ dev.masterid }}</td> |
| 111 | <td>{{ dev.num_ports }}</td> |
| 112 | <td>{{ dev.mfr }}</td> |
| 113 | <td>{{ dev.hw }}</td> |
| 114 | <td>{{ dev.sw }}</td> |
| 115 | <td>{{ dev.protocol }}</td> |
| 116 | </tr> |
| 117 | </table> |
| 118 | </div> |
| 119 | </div> |
| 120 | |
| 121 | <onos-devicedetails class="floatpanels" id="{{ selId }}" (closeEvent)="deselectRow($event)"></onos-devicedetails> |
Sean Condon | 95fb574 | 2019-04-02 12:16:55 +0100 | [diff] [blame^] | 122 | </div> |