blob: db86b573dba952521c6e6e5d115c80976f92dddc [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>
Andrea Campanella7cbeb972019-07-25 15:05:59 +020065 <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>
Andrea Campanelladadf6402019-08-07 15:24:11 +020070 <td colId="minFreq">Min Freq (THz)</td>
71 <td colId="maxFreq">Max Freq (THz)</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +020072 <td colId="grid">Grid (GHz)</td>
Andrea Campanellabdeeda12019-08-02 16:12:05 +020073 <td colId="modulation">Modulation</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +020074 <td colId="powerRange">Power Range (dBm)</td>
75 <td colId="currentPower">Current Power (dBm)</td>
76 <td colId="targetPower">Target Power (dBm)</td>
77 <td colId="hasTargetPower">Has Target Power</td>
78 <td colId="serviceState">Service State</td>
Boyuan Yan6b23b382019-06-04 11:59:35 -070079 </tr>
80 </table>
81 </div>
82
83 <div class="table-body">
84 <table>
85 <tr class="table-body" *ngIf="tableData.length === 0" class="no-data">
86 <td colspan="9">{{annots.noRowsMsg}}</td>
87 </tr>
88
89 <tr *ngFor="let port of tableData | filter : tableDataFilter" (click)="selectCallback($event, port)" [ngClass]="{selected: port.id === selId, 'data-change': isChanged(port.id)}">
90 <td>{{port.id}}</td>
91 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.reversePort}}</td>
92 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.name}}</td>
93 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type}}</td>
94 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.enabled}}</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +020095 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.minFreq:""}}</td>
96 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.maxFreq:""}}</td>
97 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.type=='OCH'?port.grid:""}}</td>
Andrea Campanellabdeeda12019-08-02 16:12:05 +020098 <td [ngClass]="(isDelta() ? 'delta' : '')">
99 <form [formGroup]="modulationForm" (ngSubmit)="submitModulation(devId, port.id)" *ngIf="port.type=='OCH'">
100 <select [(ngModel)]="port.modulation" formControlName="newModulation">
101 <option value="dp_qpsk">qpsk</option>
102 <option value="dp_16qam">16qam</option>
103 </select>
104 <button type="submit">Submit</button>
105 </form>
106 </td>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700107 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.powerRange}}</td>
Andrea Campanelladadf6402019-08-07 15:24:11 +0200108 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.currentPower | number: '1.2-2'}}</td>
Andrea Campanella7cbeb972019-07-25 15:05:59 +0200109 <td [ngClass]="(isDelta() ? 'delta' : '')">
Boyuan Yan6ad77722019-07-17 11:33:23 -0700110 <form [formGroup]="powerForm" (ngSubmit)="submitPower(devId, port.id)" *ngIf="port.type=='OCH'">
Andrea Campanelladadf6402019-08-07 15:24:11 +0200111 <input type="number" step="any" style="width:50px" value="{{port.targetPower | number: '1.2-2'}}" formControlName="newPower" required>
Boyuan Yan6b23b382019-06-04 11:59:35 -0700112 <button type="submit">Submit</button>
113 </form>
114 </td>
115 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.hasTargetPower}}</td>
116 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.serviceState}}</td>
117 </tr>
118 </table>
119 </div>
120 </div>
121</div>