| <!-- |
| ~ Copyright 2014-present Open Networking Foundation |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| <div id="ov-device"> |
| <div class="tabular-header"> |
| <h2>Devices ({{ tableData.length }} total)</h2> |
| <div class="ctrl-btns"> |
| <div class="refresh" (click)="toggleRefresh()"> |
| <!-- See icon.theme.css for the defintions of the classes active and refresh--> |
| <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" |
| iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon> |
| </div> |
| <div class="separator"></div> |
| |
| <div> |
| <onos-icon classes="{{ selId ? 'current-view':undefined }}" |
| iconId="deviceTable" iconSize="42"></onos-icon> |
| </div> |
| |
| <div routerLink="/flow" routerLinkActive="active"> |
| <onos-icon classes="{{ selId ? 'active':undefined }}" |
| iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon> |
| </div> |
| |
| <div routerLink="/port" routerLinkActive="active"> |
| <onos-icon classes="{{ selId ? 'active':undefined }}" |
| iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon> |
| </div> |
| |
| <div routerLink="/group" routerLinkActive="active"> |
| <onos-icon classes="{{ selId ? 'active':undefined }}" |
| iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon> |
| </div> |
| |
| <div routerLink="/meter" routerLinkActive="active"> |
| <onos-icon classes="{{ selId ? 'active':undefined }}" |
| iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon> |
| </div> |
| |
| <div routerLink="/pipeconf" routerLinkActive="active"> |
| <onos-icon classes="{{ selId ? 'active':undefined }}" |
| iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon> |
| </div> |
| </div> |
| </div> |
| |
| <div class="summary-list" onos-table-resize> |
| <table onos-flash-changes id-prop="id" width="100%"> |
| <tr class="table-header"> |
| <th colId="available" class="table-icon" sortable></th> |
| <th colId="type" class="table-icon"></th> |
| <th colId="name" sortable>Friendly Name </th> |
| <th colId="id" sortable>Device ID </th> |
| <th colId="masterid" [ngClass]="{width: '130px'}" sortable>Master </th> |
| <th colId="num_ports" [ngClass]="{width: '70px'}" sortable>Ports </th> |
| <th colId="mfr" sortable>Vendor </th> |
| <th colId="hw" sortable>H/W Version </th> |
| <th colId="sw" sortable>S/W Version </th> |
| <th colId="protocol" [ngClass]="{width: '100px'}" sortable>Protocol </th> |
| </tr> |
| |
| <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| <td colspan="9">{{ annots.noRowsMsg }}</td> |
| </tr> |
| |
| |
| <tr class="table-body" *ngFor="let dev of tableData" |
| (click)="selectCallback($event, dev)" |
| [ngClass]="{selected: dev.id === selId, 'data-change': isChanged(dev.id)}"> |
| <td class="table-icon"> |
| <!--[ngClass]="{width: devAvail.getBBox().width}"--> |
| <onos-icon iconId="{{dev._iconid_available}}"></onos-icon> |
| </td> |
| <td class="table-icon"> |
| <onos-icon iconId="{{dev._iconid_type}}"></onos-icon> |
| </td> |
| <td>{{ dev.name }}</td> |
| <td>{{ dev.id }}</td> |
| <td>{{ dev.masterid }}</td> |
| <td>{{ dev.num_ports }}</td> |
| <td>{{ dev.mfr }}</td> |
| <td>{{ dev.hw }}</td> |
| <td>{{ dev.sw }}</td> |
| <td>{{ dev.protocol }}</td> |
| </tr> |
| </table> |
| </div> |
| <small> |
| <p>TODO (21 Jun 18): Add in:</p> |
| <ul> |
| <li>Scrolling for long lists of devices</li> |
| <li>Sorting by column</li> |
| <li>Left align header columns</li> |
| <li>Move tooltip to underneath icon</li> |
| <li>Correct width and icon colour of active and device icon columns</li> |
| <li>Add device details panel</li> |
| <li>Add more unit tests</li> |
| <li>Make icon for #undefined work (e.g. for device type olt or unknown)</li> |
| <li>Change loading service to fade in and out and have a threshold of </li> |
| </ul> |
| </small> |
| </div> |