blob: 8625d1a069c7b3a94dfba20b19b545b069e8c4e2 [file] [log] [blame]
Bhavesh72ead492018-07-19 16:29:18 +05301<!--
2~ Copyright 2018-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-port">
18 <div class="tabular-header">
19 <h2>
20 Ports for Device {{devId}} ({{tableData.length}} Total)
21 </h2>
22
23 <div class="ctrl-btns">
24 <div class="refresh" (click)="toggleRefresh()">
25 <!-- See icon.theme.css for the defintions of the classes active and refresh-->
26 <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon>
27 </div>
28
29 <div class="separator"></div>
30
31 <div class="refresh" (click)="toggleNZState()">
32 <onos-icon classes="{{ isNz() ? 'refresh' :'active refresh'}}" iconId="nonzero" iconSize="42" toolTip="{{toggleNZTip}}">
33 </onos-icon>
34 </div>
35
36 <div class="refresh" (click)="toggleDeltaState()">
37 <onos-icon classes="{{ isDelta() ? 'active refresh' :'refresh'}}" iconId="delta" iconSize="42" toolTip="{{toggleDeltaTip}}"></onos-icon>
38 </div>
39
40 <div class="separator"></div>
41
42 <div routerLink="/device" [queryParams]="{ devId: devId }" routerLinkActive="active">
43 <onos-icon classes="{{ devId ? 'active-rect':undefined }}" iconId="deviceTable" iconSize="42" toolTip="{{deviceTip}}"></onos-icon>
44 </div>
45
46 <div routerLink="/flow" [queryParams]="{ devId: devId }" routerLinkActive="active">
47 <onos-icon classes="{{ devId ? 'active-rect' :undefined}}" iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon>
48 </div>
49
50 <div>
51 <onos-icon classes="{{ devId ? 'current-view' :undefined}}" iconId="portTable" iconSize="42"></onos-icon>
52 </div>
53
54 <div routerLink="/group" [queryParams]="{ devId: devId }" routerLinkActive="active">
55 <onos-icon classes="{{ devId ? 'active-rect' :undefined}}" iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon>
56 </div>
57
58 <div routerLink="/meter" [queryParams]="{ devId: devId }" routerLinkActive="active">
59 <onos-icon classes="{{ devId ? 'active-rect' :undefined}}" iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon>
60 </div>
61
62 <div routerLink="/pipeconf" [queryParams]="{ devId: devId }" routerLinkActive="active">
63 <onos-icon classes="{{ devId ? 'active-rect' :undefined}}" iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon>
64 </div>
65 </div>
66
67 <div class="search">
68 <input id="searchinput" [(ngModel)]="tableDataFilter.queryStr" type="search" #search placeholder="Search" />
69 <select [(ngModel)]="tableDataFilter.queryBy">
70 <option value="" disabled>Search By</option>
71 <option value="$">All Fields</option>
72 <option value="id">Port ID</option>
73 <option value="pkt_rx">Pkts Received</option>
74 <option value="pkt_tx">Pkts Sent</option>
75 <option value="bytes_rx">Bytes Received</option>
76 <option value="bytes_tx">Bytes Sent</option>
77 <option value="pkt_rx_drp">Pkts RX Dropped</option>
78 <option value="pkt_rx_drp">Pkts TX Dropped</option>
79 <option value="duration">Duration (sec)</option>
80 </select>
81 </div>
82 </div>
83
84 <div class="summary-list" onosTableResize>
85 <div class="table-header">
86 <table>
87 <tr>
88 <td colId="id" (click)="onSort('id')">Port ID
89 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('id')"></onos-icon>
90 </td>
91 <td colId="pkt_rx" (click)="onSort('pkt_rx')">Pkts Received
92 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('pkt_rx')"></onos-icon>
93 </td>
94 <td colId="pkt_tx" (click)="onSort('pkt_tx')">Pkts Sent
95 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('pkt_tx')"></onos-icon>
96 </td>
97 <td colId="bytes_rx" (click)="onSort('bytes_rx')">Bytes Received
98 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('bytes_rx')"></onos-icon>
99 </td>
100 <td colId="bytes_tx" (click)="onSort('bytes_tx')">Bytes Sent
101 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('bytes_tx')"></onos-icon>
102 </td>
103 <td colId="pkt_rx_drp" (click)="onSort('pkt_rx_drp')">Pkts RX Dropped
104 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('pkt_rx_drp')"></onos-icon>
105 </td>
106 <td colId="pkt_tx_drp" (click)="onSort('pkt_tx_drp')">Pkts TX Dropped
107 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('pkt_tx_drp')"></onos-icon>
108 </td>
109 <td colId="duration" (click)="onSort('duration')">Duration (sec)
110 <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('duration')"></onos-icon>
111 </td>
112 </tr>
113 </table>
114 </div>
115
116 <div class="table-body">
117 <table>
118 <tr class="table-body" *ngIf="tableData.length === 0" class="no-data">
119 <td colspan="9">{{annots.noRowsMsg}}</td>
120 </tr>
121
122 <tr *ngFor="let port of tableData | filter : tableDataFilter" (click)="selectCallback($event, port)" [ngClass]="{selected: port.id === selId, 'data-change': isChanged(port.id)}">
123 <td>{{port.id}}</td>
124 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.pkt_rx}}</td>
125 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.pkt_tx}}</td>
126 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.bytes_rx}}</td>
127 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.bytes_tx}}</td>
128 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.pkt_rx_drp}}</td>
129 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.pkt_tx_drp}}</td>
130 <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.duration}}</td>
131 </tr>
132 </table>
133 </div>
134 <onos-portdetails class="floatpanels" id="{{ selId }}" devId="{{devId}}" (closeEvent)="deselectRow($event)"></onos-portdetails>
135 </div>
136</div>