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