Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2014-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 | --> |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 16 | <div id="ov-device"> |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 17 | <div class="tabular-header"> |
| 18 | <h2>Devices ({{ tableData.length }} total)</h2> |
| 19 | <div class="ctrl-btns"> |
| 20 | <div class="refresh" (click)="toggleRefresh()"> |
| 21 | <!-- See icon.theme.css for the defintions of the classes active and refresh--> |
| 22 | <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" |
| 23 | 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 }}" |
| 29 | iconId="deviceTable" iconSize="42"></onos-icon> |
| 30 | </div> |
| 31 | |
| 32 | <div routerLink="/flow" routerLinkActive="active"> |
| 33 | <onos-icon classes="{{ selId ? 'active':undefined }}" |
| 34 | iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon> |
| 35 | </div> |
| 36 | |
| 37 | <div routerLink="/port" routerLinkActive="active"> |
| 38 | <onos-icon classes="{{ selId ? 'active':undefined }}" |
| 39 | iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon> |
| 40 | </div> |
| 41 | |
| 42 | <div routerLink="/group" routerLinkActive="active"> |
| 43 | <onos-icon classes="{{ selId ? 'active':undefined }}" |
| 44 | iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon> |
| 45 | </div> |
| 46 | |
| 47 | <div routerLink="/meter" routerLinkActive="active"> |
| 48 | <onos-icon classes="{{ selId ? 'active':undefined }}" |
| 49 | iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon> |
| 50 | </div> |
| 51 | |
| 52 | <div routerLink="/pipeconf" routerLinkActive="active"> |
| 53 | <onos-icon classes="{{ selId ? 'active':undefined }}" |
| 54 | iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon> |
| 55 | </div> |
| 56 | </div> |
| 57 | </div> |
| 58 | |
| 59 | <div class="summary-list" onos-table-resize> |
| 60 | <table onos-flash-changes id-prop="id" width="100%"> |
| 61 | <tr class="table-header"> |
| 62 | <th colId="available" class="table-icon" sortable></th> |
| 63 | <th colId="type" class="table-icon"></th> |
| 64 | <th colId="name" sortable>Friendly Name </th> |
| 65 | <th colId="id" sortable>Device ID </th> |
| 66 | <th colId="masterid" [ngClass]="{width: '130px'}" sortable>Master </th> |
| 67 | <th colId="num_ports" [ngClass]="{width: '70px'}" sortable>Ports </th> |
| 68 | <th colId="mfr" sortable>Vendor </th> |
| 69 | <th colId="hw" sortable>H/W Version </th> |
| 70 | <th colId="sw" sortable>S/W Version </th> |
| 71 | <th colId="protocol" [ngClass]="{width: '100px'}" sortable>Protocol </th> |
| 72 | </tr> |
| 73 | |
| 74 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 75 | <td colspan="9">{{ annots.noRowsMsg }}</td> |
| 76 | </tr> |
| 77 | |
| 78 | |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 79 | <tr class="table-body" *ngFor="let dev of tableData" |
Sean Condon | 2bd11b7 | 2018-06-15 08:00:48 +0100 | [diff] [blame] | 80 | (click)="selectCallback($event, dev)" |
| 81 | [ngClass]="{selected: dev.id === selId, 'data-change': isChanged(dev.id)}"> |
| 82 | <td class="table-icon"> |
| 83 | <!--[ngClass]="{width: devAvail.getBBox().width}"--> |
| 84 | <onos-icon iconId="{{dev._iconid_available}}"></onos-icon> |
| 85 | </td> |
| 86 | <td class="table-icon"> |
| 87 | <onos-icon iconId="{{dev._iconid_type}}"></onos-icon> |
| 88 | </td> |
| 89 | <td>{{ dev.name }}</td> |
| 90 | <td>{{ dev.id }}</td> |
| 91 | <td>{{ dev.masterid }}</td> |
| 92 | <td>{{ dev.num_ports }}</td> |
| 93 | <td>{{ dev.mfr }}</td> |
| 94 | <td>{{ dev.hw }}</td> |
| 95 | <td>{{ dev.sw }}</td> |
| 96 | <td>{{ dev.protocol }}</td> |
| 97 | </tr> |
| 98 | </table> |
| 99 | </div> |
| 100 | <small> |
| 101 | <p>TODO (21 Jun 18): Add in:</p> |
| 102 | <ul> |
| 103 | <li>Scrolling for long lists of devices</li> |
| 104 | <li>Sorting by column</li> |
| 105 | <li>Left align header columns</li> |
| 106 | <li>Move tooltip to underneath icon</li> |
| 107 | <li>Correct width and icon colour of active and device icon columns</li> |
| 108 | <li>Add device details panel</li> |
| 109 | <li>Add more unit tests</li> |
| 110 | <li>Make icon for #undefined work (e.g. for device type olt or unknown)</li> |
| 111 | <li>Change loading service to fade in and out and have a threshold of </li> |
| 112 | </ul> |
| 113 | </small> |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 114 | </div> |