Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2020-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-int-app-main"> |
| 17 | <div class="tabular-header"> |
| 18 | <h2 style="font-weight: bold">In-band Network Telemetry (INT) Control |
| 19 | Application</h2> |
| 20 | </div> |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 21 | <hr> |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 22 | <div class="tabular-header"> |
| 23 | <h2> |
Yi Tseng | c4f90a5 | 2020-10-04 22:33:22 -0700 | [diff] [blame] | 24 | INT Watchlist Rules |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 25 | </h2> |
Yi Tseng | c4f90a5 | 2020-10-04 22:33:22 -0700 | [diff] [blame] | 26 | <div> |
| 27 | <form [formGroup]="formSend" (ngSubmit)="sendIntIntentString()"> |
| 28 | <div class="input-panel"> |
| 29 | <h3> |
| 30 | Create New Watchlist Rule |
| 31 | </h3> |
| 32 | <div> |
| 33 | <label> |
| 34 | <input type="text" placeholder="Source IP prefix" |
| 35 | [ngClass]="{ 'is-invalid': formSend.controls.ip4SrcPrefix.errors }" |
| 36 | class="form-control" formControlName="ip4SrcPrefix"> |
| 37 | |
| 38 | </label> |
| 39 | <label> |
| 40 | <input type="text" placeholder="Dest IP prefix" |
| 41 | [ngClass]="{ 'is-invalid': formSend.controls.ip4DstPrefix.errors }" |
| 42 | class="form-control" formControlName="ip4DstPrefix"> |
| 43 | </label> |
| 44 | <label> |
| 45 | <input type="text" placeholder="Source port" |
| 46 | [ngClass]="{ 'is-invalid': formSend.controls.l4SrcPort.errors }" |
| 47 | class="form-control" formControlName="l4SrcPort"> |
| 48 | </label> |
| 49 | <label> |
| 50 | <input type="text" placeholder="Destination port" |
| 51 | [ngClass]="{ 'is-invalid': formSend.controls.l4DstPort.errors }" |
| 52 | class="form-control" formControlName="l4DstPort"> |
| 53 | </label> |
| 54 | <label> |
| 55 | Protocol |
| 56 | <select name="protocol" formControlName="protocol"> |
| 57 | <option selected disabled hidden |
| 58 | style="display: none" value=''></option> |
| 59 | <option value="TCP">TCP</option> |
| 60 | <option value="UDP">UDP</option> |
| 61 | </select> |
| 62 | </label> |
| 63 | <div *ngIf="formSend.controls.ip4DstPrefix.errors" class="invalid-feedback"> |
| 64 | <div class="error-text" *ngIf="formSend.controls.ip4DstPrefix.errors.required"> Destination |
| 65 | IP is required |
| 66 | </div> |
| 67 | <div class="error-text" *ngIf="formSend.controls.ip4DstPrefix.errors.pattern">Destination IP |
| 68 | must be a valid IP address |
| 69 | </div> |
| 70 | </div> |
| 71 | <div *ngIf="formSend.controls.ip4SrcPrefix.errors" class="invalid-feedback"> |
| 72 | <div class="error-text" *ngIf="formSend.controls.ip4SrcPrefix.errors.required">Source IP is |
| 73 | required |
| 74 | </div> |
| 75 | <div class="error-text" *ngIf="formSend.controls.ip4SrcPrefix.errors.pattern">Source IP must |
| 76 | be a valid IP address |
| 77 | </div> |
| 78 | </div> |
| 79 | <div *ngIf="formSend.controls.l4DstPort.errors" class="invalid-feedback"> |
| 80 | <div class="error-text" *ngIf="formSend.controls.l4DstPort.errors.pattern">Destination Port |
| 81 | must be a valid Port |
| 82 | </div> |
| 83 | </div> |
| 84 | <div *ngIf="formSend.controls.l4SrcPort.errors" class="invalid-feedback"> |
| 85 | <div class="error-text" *ngIf="formSend.controls.l4SrcPort.errors.pattern">Source Port must |
| 86 | be a valid Port |
| 87 | </div> |
| 88 | </div> |
| 89 | </div> |
| 90 | <div> |
| 91 | <div class="myrow"> |
| 92 | <div *ngFor="let data of metaData"> |
| 93 | <div class="mygrid"> |
| 94 | <label> |
| 95 | <input type="checkbox" |
| 96 | (change)="onCheckboxChange(data.value, $event.target.checked)"/> |
| 97 | {{ data.name }} |
| 98 | </label> |
| 99 | </div> |
| 100 | </div> |
| 101 | </div> |
| 102 | </div> |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 103 | </div> |
Yi Tseng | c4f90a5 | 2020-10-04 22:33:22 -0700 | [diff] [blame] | 104 | <div class="button-panel"> |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 105 | <button class="int-app-button"> |
Yi Tseng | c4f90a5 | 2020-10-04 22:33:22 -0700 | [diff] [blame] | 106 | Apply Watchlist Rule |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 107 | </button> |
| 108 | </div> |
| 109 | </form> |
| 110 | </div> |
| 111 | </div> |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 112 | |
| 113 | <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 114 | <div class='int-app-main-intents'> |
| 115 | <div class="tabular-header"> |
| 116 | <h2>Installed Watchlist Rules ({{tableData.length}} total)</h2> |
| 117 | <div class="ctrl-btns"> |
| 118 | <div class="refresh" (click)="toggleRefresh()"> |
| 119 | <onos-icon classes="{{ autoRefresh?'active refresh':'refresh'}}" iconId="refresh" iconSize="42" |
| 120 | toolTip="{{ autoRefreshTip }}"></onos-icon> |
| 121 | </div> |
| 122 | <!-- tooltip tt-msg="uninstallTip" --> |
| 123 | <div (click)="delIntIntent()"> |
| 124 | <onos-icon classes="{active: ctrlBtnState.selection}" iconId="garbage" |
| 125 | iconSize="42"></onos-icon> |
| 126 | </div> |
| 127 | </div> |
| 128 | </div> |
| 129 | |
| 130 | <div id="summary-list" class="summary-list" onosTableResize> |
| 131 | <div class="table-header"> |
| 132 | <table> |
| 133 | <tr> |
| 134 | <td colId="available" class="table-icon"></td> |
| 135 | <td colId="type" class="table-icon"></td> |
| 136 | <td colId="id">ID</td> |
| 137 | <td colId="srcAddr" sortable>Src Address</td> |
| 138 | <td colId="dstAddr" sortable>Dst Address</td> |
| 139 | <td colId="srcPort" sortable>Src Port</td> |
| 140 | <td colId="dstPort" sortable>Dst Port</td> |
| 141 | <td colId="protocol" sortable>Protocol</td> |
| 142 | <td colId="metadata" sortable>Metadata</td> |
| 143 | </tr> |
| 144 | </table> |
| 145 | </div> |
| 146 | <div class="table-body"> |
| 147 | <table> |
| 148 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 149 | <td colspan="9">{{ annots.noRowsMsg }}</td> |
| 150 | </tr> |
| 151 | <tr *ngFor="let row of tableData | filter : tableDataFilter" |
| 152 | (click)="selectCallback($event, row)" |
| 153 | [ngClass]="{selected: row.id === selId, 'data-change': isChanged(row.id)}"> |
| 154 | <td class="table-icon"> |
| 155 | <onos-icon classes="{{ row._iconid_available}}" |
| 156 | iconId={{row._iconid_available}}></onos-icon> |
| 157 | </td> |
| 158 | <td class="table-icon"> |
| 159 | <onos-icon classes="{{row._iconid_type? 'active-type':undefined}}" |
| 160 | iconId="{{row._iconid_type}}"></onos-icon> |
| 161 | </td> |
| 162 | <td>{{ row.id }}</td> |
| 163 | <td>{{ row.srcAddr }}</td> |
| 164 | <td>{{ row.dstAddr}}</td> |
| 165 | <td>{{ row.srcPort}}</td> |
| 166 | <td>{{ row.dstPort }}</td> |
| 167 | <td>{{ row.protocol }}</td> |
| 168 | <td>{{ row.metadata }}</td> |
| 169 | </tr> |
| 170 | </table> |
| 171 | </div> |
| 172 | </div> |
| 173 | </div> |
| 174 | </div> |