Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2019-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 | <!-- Port partial HTML --> |
| 17 | <div id="ov-roadm-port"> |
Andrea Campanella | 7cbeb97 | 2019-07-25 15:05:59 +0200 | [diff] [blame] | 18 | <!--<onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>--> |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 19 | <div class="tabular-header"> |
| 20 | <h2> |
Andrea Campanella | 7cbeb97 | 2019-07-25 15:05:59 +0200 | [diff] [blame] | 21 | Ports for Optical Device {{devId}} ({{tableData.length}} Total) |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 22 | </h2> |
| 23 | |
| 24 | <div class="ctrl-btns"> |
| 25 | <div class="refresh" (click)="toggleRefresh()"> |
| 26 | <!-- See icon.theme.css for the defintions of the classes active and refresh--> |
| 27 | <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon> |
| 28 | </div> |
| 29 | |
| 30 | <div class="separator"></div> |
| 31 | |
| 32 | <div routerLink="/roadm-gui" [queryParams]="{ devId: devId }" routerLinkActive="active"> |
| 33 | <onos-icon classes="{{ devId ? 'active-rect':undefined }}" iconId="deviceTable" iconSize="42" toolTip="{{deviceTip}}"></onos-icon> |
| 34 | </div> |
| 35 | |
| 36 | <!--<div routerLink="/flow" [queryParams]="{ devId: devId }" routerLinkActive="active">--> |
| 37 | <!--<onos-icon classes="{{ devId ? 'active-rect' :undefined}}" iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon>--> |
| 38 | <!--</div>--> |
| 39 | |
| 40 | <div> |
| 41 | <onos-icon classes="{{ devId ? 'current-view' :undefined}}" iconId="portTable" iconSize="42"></onos-icon> |
| 42 | </div> |
| 43 | |
| 44 | </div> |
| 45 | |
| 46 | <div class="search"> |
| 47 | <input id="searchinput" [(ngModel)]="tableDataFilter.queryStr" type="search" #search placeholder="Search" /> |
| 48 | <select [(ngModel)]="tableDataFilter.queryBy"> |
| 49 | <option value="" disabled>Search By</option> |
| 50 | <option value="$">All Fields</option> |
| 51 | <option value="id">Port ID</option> |
| 52 | <option value="name">Pkts Received</option> |
| 53 | <option value="type">Pkts Sent</option> |
| 54 | <option value="enabled">Bytes Received</option> |
| 55 | <option value="grid">Bytes Sent</option> |
| 56 | <option value="hasTargetPower">Pkts RX Dropped</option> |
| 57 | </select> |
| 58 | </div> |
| 59 | </div> |
| 60 | |
| 61 | <div class="summary-list" onosTableResize> |
| 62 | <div class="table-header"> |
| 63 | <table> |
| 64 | <tr> |
Sean Condon | f20b8ef | 2019-08-13 16:45:52 +0100 | [diff] [blame] | 65 | <td colId="id">PORT ID</td> |
| 66 | <td colId="reversePort">REVERSE PORT</td> |
| 67 | <td colId="name">NAME</td> |
| 68 | <td colId="type">TYPE</td> |
| 69 | <td colId="enabled">ENABLED</td> |
| 70 | <td colId="minFreq">MIN FREQ (THz)</td> |
| 71 | <td colId="maxFreq">MAX FREQ (THz)</td> |
| 72 | <td colId="grid">GRID (GHz)</td> |
Andrea Campanella | 02e2eb4e | 2019-08-29 11:46:57 -0700 | [diff] [blame] | 73 | <td colId="currentFreq">CURRENT FREQ (THz)</td> |
Sean Condon | f20b8ef | 2019-08-13 16:45:52 +0100 | [diff] [blame] | 74 | <td colId="modulation">MODULATION</td> |
| 75 | <td colId="powerRange">POWER RANGE (dBm)</td> |
| 76 | <td colId="currentPower">CURRENT POWER (dBm)</td> |
| 77 | <td colId="currentInputPower">CURRENT INPUT POWER (dBm)</td> |
| 78 | <td colId="targetPower">TARGET POWER (dBm)</td> |
| 79 | <td colId="hasTargetPower">HAS TARGET POWER</td> |
| 80 | <td colId="serviceState">SERVICE STATE</td> |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 81 | </tr> |
| 82 | </table> |
| 83 | </div> |
| 84 | |
| 85 | <div class="table-body"> |
| 86 | <table> |
| 87 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 88 | <td colspan="9">{{annots.noRowsMsg}}</td> |
| 89 | </tr> |
| 90 | |
| 91 | <tr *ngFor="let port of tableData | filter : tableDataFilter" (click)="selectCallback($event, port)" [ngClass]="{selected: port.id === selId, 'data-change': isChanged(port.id)}"> |
| 92 | <td>{{port.id}}</td> |
| 93 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.reversePort}}</td> |
| 94 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.name}}</td> |
| 95 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type}}</td> |
| 96 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.enabled}}</td> |
Andrea Campanella | 7cbeb97 | 2019-07-25 15:05:59 +0200 | [diff] [blame] | 97 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.minFreq:""}}</td> |
| 98 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.maxFreq:""}}</td> |
| 99 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.grid:""}}</td> |
Andrea Campanella | 6ac13ff | 2019-08-29 16:51:14 -0700 | [diff] [blame] | 100 | <td [ngClass]="(isDelta() ? 'delta' : '')"> |
| 101 | <form [formGroup]="freqForm" (ngSubmit)="submitFrequency(devId, port.id)" *ngIf="port.type=='OCH'"> |
| 102 | <input type="text" style="width:50px" value="{{port.type=='OCH'?port.currFreq:''}}" formControlName="newFreq" required> |
| 103 | <button type="submit">Submit</button> |
| 104 | </form> |
| 105 | </td> |
Andrea Campanella | bdeeda1 | 2019-08-02 16:12:05 +0200 | [diff] [blame] | 106 | <td [ngClass]="(isDelta() ? 'delta' : '')"> |
| 107 | <form [formGroup]="modulationForm" (ngSubmit)="submitModulation(devId, port.id)" *ngIf="port.type=='OCH'"> |
| 108 | <select [(ngModel)]="port.modulation" formControlName="newModulation"> |
| 109 | <option value="dp_qpsk">qpsk</option> |
| 110 | <option value="dp_16qam">16qam</option> |
| 111 | </select> |
| 112 | <button type="submit">Submit</button> |
| 113 | </form> |
| 114 | </td> |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 115 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.powerRange}}</td> |
Sean Condon | f20b8ef | 2019-08-13 16:45:52 +0100 | [diff] [blame] | 116 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentPower) | number: '1.2-2'}}</td> |
| 117 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentInputPower) | number: '1.2-2'}}</td> |
Andrea Campanella | 7cbeb97 | 2019-07-25 15:05:59 +0200 | [diff] [blame] | 118 | <td [ngClass]="(isDelta() ? 'delta' : '')"> |
Boyuan Yan | 6ad7772 | 2019-07-17 11:33:23 -0700 | [diff] [blame] | 119 | <form [formGroup]="powerForm" (ngSubmit)="submitPower(devId, port.id)" *ngIf="port.type=='OCH'"> |
Sean Condon | f20b8ef | 2019-08-13 16:45:52 +0100 | [diff] [blame] | 120 | <input type="number" step="any" style="width:50px" value="{{convertNumber(port.targetPower) | number: '1.2-2'}}" formControlName="newPower" required> |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 121 | <button type="submit">Submit</button> |
| 122 | </form> |
| 123 | </td> |
| 124 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.hasTargetPower}}</td> |
| 125 | <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.serviceState}}</td> |
| 126 | </tr> |
| 127 | </table> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |