Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame^] | 1 | <!-- |
| 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 | <div id="ov-flow" xmlns="http://www.w3.org/1999/html"> |
| 17 | <div class="tabular-header"> |
| 18 | <h2> |
| 19 | {{lionFn('title_flows')}} {{id}} ({{ tableData.length }} {{ lionFn('total') }}) |
| 20 | </h2> |
| 21 | <div class="ctrl-btns"> |
| 22 | <div class="refresh" (click)="toggleRefresh()"> |
| 23 | <!-- See icon.theme.css for the defintions of the classes active and refresh--> |
| 24 | <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" iconId="refresh" iconSize="42" toolTip="{{ autoRefreshTip }}"></onos-icon> |
| 25 | </div> |
| 26 | <div class="separator"></div> |
| 27 | <span *ngIf="brief" (click)="briefToggle()"> |
| 28 | <div> |
| 29 | <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="plus" iconSize="42" toolTip="{{detailTip}}"></onos-icon> |
| 30 | </div> |
| 31 | </span> |
| 32 | |
| 33 | <span *ngIf="!brief" (click)="briefToggle()"> |
| 34 | <div> |
| 35 | <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="minus" iconSize="42" toolTip="{{briefTip}}"></onos-icon> |
| 36 | </div> |
| 37 | </span> |
| 38 | <div class="separator"></div> |
| 39 | <div routerLink="/device" [queryParams]="{ devId: id }" routerLinkActive="active"> |
| 40 | <onos-icon classes="{{ id ? 'active-rect':undefined }}" iconId="deviceTable" iconSize="42" toolTip="{{deviceTip}}"></onos-icon> |
| 41 | </div> |
| 42 | |
| 43 | <div> |
| 44 | <onos-icon classes="{{ id ? 'current-view' :undefined}}" iconId="flowTable" iconSize="42"></onos-icon> |
| 45 | </div> |
| 46 | |
| 47 | <div routerLink="/port" [queryParams]="{ devId: id }" routerLinkActive="active"> |
| 48 | <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon> |
| 49 | </div> |
| 50 | |
| 51 | <div routerLink="/group" [queryParams]="{ devId: id }" routerLinkActive="active"> |
| 52 | <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon> |
| 53 | </div> |
| 54 | |
| 55 | <div routerLink="/meter" [queryParams]="{ devId: id }" routerLinkActive="active"> |
| 56 | <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon> |
| 57 | </div> |
| 58 | |
| 59 | <div routerLink="/pipeconf" [queryParams]="{ devId: id }" routerLinkActive="active"> |
| 60 | <onos-icon classes="{{ id ? 'active-rect' :undefined}}" iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon> |
| 61 | </div> |
| 62 | </div> |
| 63 | <div class="search"> |
| 64 | <input id="searchinput" [(ngModel)]="tableDataFilter.queryStr" type="search" #search placeholder="Search" /> |
| 65 | <select [(ngModel)]="tableDataFilter.queryBy"> |
| 66 | <option value="" disabled>Search By</option> |
| 67 | <option value="$">All Fields</option> |
| 68 | <option value="priority">{{lionFn('priority')}}</option> |
| 69 | <option value="tableName">{{lionFn('tableName')}}</option> |
| 70 | <option value="selector">{{lionFn('selector')}}</option> |
| 71 | <option value="treatment">{{lionFn('treatment')}}</option> |
| 72 | <option value="appName">{{lionFn('appName')}}</option> |
| 73 | </select> |
| 74 | </div> |
| 75 | </div> |
| 76 | |
| 77 | <div class="summary-list" onosTableResize> |
| 78 | <div class="table-header"> |
| 79 | <table> |
| 80 | <tr> |
| 81 | <td colId="state" (click)="onSort('state')">{{lionFn('state')}} |
| 82 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('state')"></onos-icon> |
| 83 | </td> |
| 84 | <td colId="packets" (click)="onSort('packets')">{{lionFn('packets')}} |
| 85 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('packets')"></onos-icon> |
| 86 | </td> |
| 87 | <td colId="duration" (click)="onSort('duration')">{{lionFn('duration')}} |
| 88 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('duration')"></onos-icon> |
| 89 | </td> |
| 90 | <td colId="priority" (click)="onSort('priority')">{{lionFn('priority')}} |
| 91 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('priority')"></onos-icon> |
| 92 | </td> |
| 93 | <td colId="tableName" (click)="onSort('tableName')">{{lionFn('tableName')}} |
| 94 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('tableName')"></onos-icon> |
| 95 | </td> |
| 96 | <td colId="selector" (click)="onSort('selector')">{{lionFn('selector')}} |
| 97 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('selector')"></onos-icon> |
| 98 | </td> |
| 99 | <td colId="treatment" (click)="onSort('treatment')">{{lionFn('treatment')}} |
| 100 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('treatment')"></onos-icon> |
| 101 | </td> |
| 102 | <td colId="appName" (click)="onSort('appName')">{{lionFn('appName')}} |
| 103 | <onos-icon classes="active-sort" [iconSize]="10" [iconId]="sortIcon('appName')"></onos-icon> |
| 104 | </td> |
| 105 | </tr> |
| 106 | </table> |
| 107 | </div> |
| 108 | |
| 109 | <div class="table-body"> |
| 110 | <table> |
| 111 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 112 | <td colspan="9">{{annots.noRowsMsg}}</td> |
| 113 | </tr> |
| 114 | <ng-template ngFor let-flow [ngForOf]="tableData | filter : tableDataFilter"> |
| 115 | <tr (click)="selectCallback($event, flow)" [ngClass]="{selected: flow.id === selId, 'data-change': isChanged(flow.id)}"> |
| 116 | <td>{{flow.state}}</td> |
| 117 | <td>{{flow.packets}}</td> |
| 118 | <td>{{flow.duration}}</td> |
| 119 | <td>{{flow.priority}}</td> |
| 120 | <td>{{flow.tableName}}</td> |
| 121 | <td>{{flow.selector_c}}</td> |
| 122 | <td>{{flow.treatment_c}}</td> |
| 123 | <td>{{flow.appName}}</td> |
| 124 | </tr> |
| 125 | <tr (click)="selectCallback($event, flow)" [ngClass]="{selected: flow.id === selId, 'data-change': isChanged(flow.id)}" [hidden]="brief"> |
| 126 | <td class="selector" colspan="8">{{flow.selector}} </td> |
| 127 | </tr> |
| 128 | <tr (click)="selectCallback($event, flow)" [ngClass]="{selected: flow.id === selId, 'data-change': isChanged(flow.id)}" [hidden]="brief"> |
| 129 | <td class="treatment" colspan="8">{{flow.treatment}}</td> |
| 130 | </tr> |
| 131 | </ng-template> |
| 132 | </table> |
| 133 | </div> |
| 134 | </div> |
| 135 | <onos-flowdetails class="floatpanels" flowId="{{ selId }}" appId="{{ selRowAppId }}" (closeEvent)="deselectRow($event)"></onos-flowdetails> |
| 136 | </div> |