blob: 5c82dc436fb68660314afcc9d64c7256b6b7ac63 [file] [log] [blame]
Boyuan Yan6b23b382019-06-04 11:59:35 -07001<!--
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 Campanella7cbeb972019-07-25 15:05:59 +020018 <!--<onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>-->
Boyuan Yan6b23b382019-06-04 11:59:35 -070019 <div class="tabular-header">
20 <h2>
Andrea Campanella7cbeb972019-07-25 15:05:59 +020021 Ports for Optical Device {{devId}} ({{tableData.length}} Total)
Boyuan Yan6b23b382019-06-04 11:59:35 -070022 </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 Condonf20b8ef2019-08-13 16:45:52 +010065 <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 Campanella02e2eb4e2019-08-29 11:46:57 -070073 <td colId="currentFreq">CURRENT FREQ (THz)</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +010074 <td colId="modulation">MODULATION</td>
75 <td colId="powerRange">POWER RANGE (dBm)</td>
Andrea Campanellabfe55402019-09-08 10:16:01 -070076 <td colId="currentPower">CURRENT OUTPUT POWER (dBm)</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +010077 <td colId="currentInputPower">CURRENT INPUT POWER (dBm)</td>
Andrea Campanellabfe55402019-09-08 10:16:01 -070078 <td colId="targetPower">TARGET OUTPUT POWER (dBm)</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +010079 <td colId="hasTargetPower">HAS TARGET POWER</td>
Sudeep Desaic3f655b2020-02-05 17:55:50 +053080 <td colId="PRE_FEC_BER">PRE FEC BER</td>
81 <td colId="POST_FEC_BER">POST FEC BER</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +010082 <td colId="serviceState">SERVICE STATE</td>
Boyuan Yan6b23b382019-06-04 11:59:35 -070083 </tr>
84 </table>
85 </div>
86
87 <div class="table-body">
88 <table>
89 <tr class="table-body" *ngIf="tableData.length === 0" class="no-data">
90 <td colspan="9">{{annots.noRowsMsg}}</td>
91 </tr>
92
93 <tr *ngFor="let port of tableData | filter : tableDataFilter" (click)="selectCallback($event, port)" [ngClass]="{selected: port.id === selId, 'data-change': isChanged(port.id)}">
94 <td>{{port.id}}</td>
95 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.reversePort}}</td>
96 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.name}}</td>
97 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type}}</td>
98 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.enabled}}</td>
Andrea Campanellabfe55402019-09-08 10:16:01 -070099 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH' || port.type=='OMS'?port.minFreq:""}}</td>
100 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH' || port.type=='OMS'?port.maxFreq:""}}</td>
101 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH' || port.type=='OMS'?port.grid:""}}</td>
Andrea Campanella6ac13ff2019-08-29 16:51:14 -0700102 <td [ngClass]="(isDelta() ? 'delta' : '')">
103 <form [formGroup]="freqForm" (ngSubmit)="submitFrequency(devId, port.id)" *ngIf="port.type=='OCH'">
104 <input type="text" style="width:50px" value="{{port.type=='OCH'?port.currFreq:''}}" formControlName="newFreq" required>
105 <button type="submit">Submit</button>
106 </form>
107 </td>
Andrea Campanellabdeeda12019-08-02 16:12:05 +0200108 <td [ngClass]="(isDelta() ? 'delta' : '')">
109 <form [formGroup]="modulationForm" (ngSubmit)="submitModulation(devId, port.id)" *ngIf="port.type=='OCH'">
110 <select [(ngModel)]="port.modulation" formControlName="newModulation">
111 <option value="dp_qpsk">qpsk</option>
112 <option value="dp_16qam">16qam</option>
113 </select>
114 <button type="submit">Submit</button>
115 </form>
116 </td>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700117 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.powerRange}}</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +0100118 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentPower) | number: '1.2-2'}}</td>
119 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentInputPower) | number: '1.2-2'}}</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +0200120 <td [ngClass]="(isDelta() ? 'delta' : '')">
Andrea Campanellabfe55402019-09-08 10:16:01 -0700121 <form [formGroup]="powerForm" (ngSubmit)="submitPower(devId, port.id)" *ngIf="port.type=='OCH' || port.type=='OMS'">
Sean Condonf20b8ef2019-08-13 16:45:52 +0100122 <input type="number" step="any" style="width:50px" value="{{convertNumber(port.targetPower) | number: '1.2-2'}}" formControlName="newPower" required>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700123 <button type="submit">Submit</button>
124 </form>
125 </td>
126 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.hasTargetPower}}</td>
Sudeep Desaic3f655b2020-02-05 17:55:50 +0530127 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.preFecBitErrorRate)}}</td>
128 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.postFecBitErrorRate)}}</td>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700129 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.serviceState}}</td>
130 </tr>
131 </table>
132 </div>
133 </div>
134</div>