blob: 1e16d57f01ad8485c456c7da1027d21978bd119a [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>
73 <td colId="modulation">MODULATION</td>
74 <td colId="powerRange">POWER RANGE (dBm)</td>
75 <td colId="currentPower">CURRENT POWER (dBm)</td>
76 <td colId="currentInputPower">CURRENT INPUT POWER (dBm)</td>
77 <td colId="targetPower">TARGET POWER (dBm)</td>
78 <td colId="hasTargetPower">HAS TARGET POWER</td>
79 <td colId="serviceState">SERVICE STATE</td>
Boyuan Yan6b23b382019-06-04 11:59:35 -070080 </tr>
81 </table>
82 </div>
83
84 <div class="table-body">
85 <table>
86 <tr class="table-body" *ngIf="tableData.length === 0" class="no-data">
87 <td colspan="9">{{annots.noRowsMsg}}</td>
88 </tr>
89
90 <tr *ngFor="let port of tableData | filter : tableDataFilter" (click)="selectCallback($event, port)" [ngClass]="{selected: port.id === selId, 'data-change': isChanged(port.id)}">
91 <td>{{port.id}}</td>
92 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.reversePort}}</td>
93 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.name}}</td>
94 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type}}</td>
95 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.enabled}}</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +020096 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.minFreq:""}}</td>
97 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.maxFreq:""}}</td>
98 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.grid:""}}</td>
Andrea Campanellabdeeda12019-08-02 16:12:05 +020099 <td [ngClass]="(isDelta() ? 'delta' : '')">
100 <form [formGroup]="modulationForm" (ngSubmit)="submitModulation(devId, port.id)" *ngIf="port.type=='OCH'">
101 <select [(ngModel)]="port.modulation" formControlName="newModulation">
102 <option value="dp_qpsk">qpsk</option>
103 <option value="dp_16qam">16qam</option>
104 </select>
105 <button type="submit">Submit</button>
106 </form>
107 </td>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700108 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.powerRange}}</td>
Sean Condonf20b8ef2019-08-13 16:45:52 +0100109 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentPower) | number: '1.2-2'}}</td>
110 <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.currentInputPower) | number: '1.2-2'}}</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +0200111 <td [ngClass]="(isDelta() ? 'delta' : '')">
Boyuan Yan6ad77722019-07-17 11:33:23 -0700112 <form [formGroup]="powerForm" (ngSubmit)="submitPower(devId, port.id)" *ngIf="port.type=='OCH'">
Sean Condonf20b8ef2019-08-13 16:45:52 +0100113 <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 -0700114 <button type="submit">Submit</button>
115 </form>
116 </td>
117 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.hasTargetPower}}</td>
118 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.serviceState}}</td>
119 </tr>
120 </table>
121 </div>
122 </div>
123</div>