Sean Condon | 50e61a6 | 2019-12-19 14:28:06 +0000 | [diff] [blame^] | 1 | <!-- |
| 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 | |
| 17 | <div id="ov-pipeconf"> |
| 18 | <div class="tabular-header"> |
| 19 | <h2>Pipeconf for Device {{devId || "(No device selected)"}}</h2> |
| 20 | |
| 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 | <div (click)="navto('/device')"> |
| 28 | <onos-icon classes="active-rect" iconId="deviceTable" iconSize="42"></onos-icon> |
| 29 | </div> |
| 30 | <div (click)="navto('/flow')"> |
| 31 | <onos-icon classes="active-rect" iconId="flowTable" iconSize="42" toolTip="{{ flowTip }}"></onos-icon> |
| 32 | </div> |
| 33 | <div (click)="navto('/port')"> |
| 34 | <onos-icon classes="active-rect" iconId="portTable" iconSize="42" toolTip="{{ portTip }}"></onos-icon> |
| 35 | </div> |
| 36 | <div (click)="navto('/group')"> |
| 37 | <onos-icon classes="active-rect" iconId="groupTable" iconSize="42" toolTip="{{ groupTip }}"></onos-icon> |
| 38 | </div> |
| 39 | <div (click)="navto('/meter')"> |
| 40 | <onos-icon classes="active-rect" iconId="meterTable" iconSize="42" toolTip="{{ meterTip }}"></onos-icon> |
| 41 | </div> |
| 42 | <div> |
| 43 | <onos-icon classes="current-view" iconId="pipeconfTable" iconSize="42" toolTip="{{ pipeconfTip }}"></onos-icon> |
| 44 | </div> |
| 45 | </div> |
| 46 | </div> |
| 47 | <div id="pipeconf-info" auto-height> |
| 48 | <div id="pipeconf-basic"> |
| 49 | <table class="pipeconf-table"> |
| 50 | <thead> |
| 51 | <th class="text-center" style="width: 160px">Name</th> |
| 52 | <th>Info</th> |
| 53 | </thead> |
| 54 | <tr *ngIf="pipeconfData === undefined; else pipeconfDataShow"> |
| 55 | <td colspan="2" class="no-data"> |
| 56 | No PiPipeconf for this device |
| 57 | </td> |
| 58 | </tr> |
| 59 | <ng-template #pipeconfDataShow> |
| 60 | <tr> |
| 61 | <td class="text-center">ID</td> |
| 62 | <td>{{pipeconfData.pipeconf.id}}</td> |
| 63 | </tr> |
| 64 | <tr> |
| 65 | <td class="text-center">Behaviors</td> |
| 66 | <td>{{pipeconfData.pipeconf.behaviors.join(", ")}}</td> |
| 67 | </tr> |
| 68 | <tr> |
| 69 | <td class="text-center">Extensions</td> |
| 70 | <td>{{pipeconfData.pipeconf.extensions.join(", ")}}</td> |
| 71 | </tr> |
| 72 | </ng-template> |
| 73 | </table> |
| 74 | </div> |
| 75 | <h2>Pipeline Model</h2> |
| 76 | <div id="pipeconf-tables"> |
| 77 | <table class="pipeconf-table"> |
| 78 | <thead> |
| 79 | <th class="text-center">Table</th> |
| 80 | <th class="text-center">Entries used</th> |
| 81 | <th class="text-center">Max entries</th> |
| 82 | <th class="text-center">LookedUp</th> |
| 83 | <th class="text-center">Matched</th> |
| 84 | <th class="text-center">Has Counters</th> |
| 85 | <th class="text-center">Support Aging</th> |
| 86 | <th class="text-left">Match fields</th> |
| 87 | <th class="text-left">Actions</th> |
| 88 | </thead> |
| 89 | <tr *ngFor="let table of tableData" |
| 90 | (click)="selectCallback($event, table)" |
| 91 | [ngClass]="{selected: table.table === selId, 'data-change': isChanged(table.table)}" |
| 92 | class="clickable"> |
| 93 | <td class="text-center">{{table.table}}</td> |
| 94 | <td class="text-center">{{table.active}}</td> |
| 95 | <td class="text-center">{{table.maxsize}}</td> |
| 96 | <td *ngIf="table.haslookedup === 'true'; else hasLookedupNa" class="text-center">{{table.lookedup}}</td> |
| 97 | <ng-template #hasLookedupNa> |
| 98 | <td class="text-center">N/A</td> |
| 99 | </ng-template> |
| 100 | <td class="text-center">{{table.matched}}</td> |
| 101 | <td class="text-center"> |
| 102 | <onos-icon |
| 103 | [iconId]="pipeconfModelTable(table.table)?.hasCounters?'active':'inactive'" |
| 104 | [classes]="pipeconfModelTable(table.table)?.hasCounters?'active':'active-rect'" |
| 105 | [iconSize]="20"> |
| 106 | </onos-icon> |
| 107 | </td> |
| 108 | <td class="text-center"> |
| 109 | <onos-icon |
| 110 | [iconId]="pipeconfModelTable(table.table)?.supportAging?'active':'inactive'" |
| 111 | [classes]="pipeconfModelTable(table.table)?.supportAging?'active':'active-rect'" |
| 112 | [iconSize]="20"> |
| 113 | </onos-icon> |
| 114 | </td> |
| 115 | <td *ngIf="pipeconfModelTable(table.table)?.matchFields.length > 0; else noMatchFields"> |
| 116 | <p *ngFor="let mf of pipeconfModelTable(table.table)?.matchFields">{{mf.field}}</p> |
| 117 | </td> |
| 118 | <ng-template #noMatchFields> |
| 119 | <td>No match fields</td> |
| 120 | </ng-template> |
| 121 | <td *ngIf="pipeconfModelTable(table.table)?.actions.length !== 0; else noActions"> |
| 122 | <p *ngFor="let act of pipeconfModelTable(table.table)?.actions">{{act}}</p> |
| 123 | </td> |
| 124 | <ng-template #noActions> |
| 125 | <td>No table actions</td> |
| 126 | </ng-template> |
| 127 | </tr> |
| 128 | </table> |
| 129 | </div> |
| 130 | </div> |
| 131 | <onos-pipeconfdetails id="{{selId}}" [actions]="pipeconfData?.pipelineModel.actions" [pipeconfTable]="selectedTable" (closeEvent)="deselectRow($event)"></onos-pipeconfdetails> |
| 132 | </div> |