blob: 26420cae5374d0158a499c047f34e30906064fc0 [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 Campanella7ebfe322019-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>
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 Yan6b23b382019-06-04 11:59:35 -070081 </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 Campanella7cbeb972019-07-25 15:05:59 +020097 <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 Campanella7ebfe322019-08-29 11:46:57 -0700100 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.currFreq:""}}</td>
Andrea Campanellabdeeda12019-08-02 16:12:05 +0200101 <td [ngClass]="(isDelta() ? 'delta' : '')">
102 <form [formGroup]="modulationForm" (ngSubmit)="submitModulation(devId, port.id)" *ngIf="port.type=='OCH'">
103 <select [(ngModel)]="port.modulation" formControlName="newModulation">
104 <option value="dp_qpsk">qpsk</option>
105 <option value="dp_16qam">16qam</option>
106 </select>
107 <button type="submit">Submit</button>
108 </form>
109 </td>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700110 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.powerRange}}</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +0100111 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentPower) | number: '1.2-2'}}</td>
112 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentInputPower) | number: '1.2-2'}}</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +0200113 <td [ngClass]="(isDelta() ? 'delta' : '')">
Boyuan Yan6ad77722019-07-17 11:33:23 -0700114 <form [formGroup]="powerForm" (ngSubmit)="submitPower(devId, port.id)" *ngIf="port.type=='OCH'">
Sean Condonf20b8ef2019-08-13 16:45:52 +0100115 <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 -0700116 <button type="submit">Submit</button>
117 </form>
118 </td>
119 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.hasTargetPower}}</td>
120 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.serviceState}}</td>
121 </tr>
122 </table>
123 </div>
124 </div>
125</div>