| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame^] | 1 | <!-- |
| 2 | Copyright 2020 TATA ELXSI |
| 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 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | --> |
| 18 | <ng-sidebar-container class="vnf-topology-sidebar-container"> |
| 19 | <!-- A sidebar --> |
| 20 | <ng-sidebar [(opened)]="sideBarOpened" position="left"> |
| 21 | <div class="sidebar-header"> |
| 22 | <span class="topology_title" *ngIf="showRightSideInfo === 'vnfdInfo'">{{'PAGE.TOPOLOGY.VNFD' | translate}}</span> |
| 23 | <span class="topology_title" *ngIf="showRightSideInfo === 'vduInfo'">{{'PAGE.TOPOLOGY.VDU' | translate}}</span> |
| 24 | <span class="topology_title" *ngIf="showRightSideInfo === 'intvlInfo'">{{'PAGE.TOPOLOGY.VIRTUALLINK' | translate}}</span> |
| 25 | <span class="topology_title" *ngIf="showRightSideInfo === 'cpInfo'">{{'PAGE.TOPOLOGY.CONNECTIONPOINT' | translate}}</span> |
| 26 | <span class="topology_title" *ngIf="showRightSideInfo === 'intcpInfo'">{{'PAGE.TOPOLOGY.INTCONNECTIONPOINT' | translate}}</span> |
| 27 | <button (click)="toggleSidebar()" class="close" type="button"> |
| 28 | <i class="fas fa-times-circle text-danger" aria-hidden="true"></i> |
| 29 | </button> |
| 30 | </div> |
| 31 | <div class="sidebar-body"> |
| 32 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="showRightSideInfo === 'vnfdInfo'"> |
| 33 | <div class="row"> |
| 34 | <div class="col-12 p-0"> |
| 35 | <form> |
| 36 | <div class="form-group row"> |
| 37 | <label class="col-sm-4 col-form-label">{{ 'SHORTNAME' | translate }}</label> |
| 38 | <div class="col-sm-8"> |
| 39 | <input type="text" class="form-control" placeholder="{{ 'SHORTNAME' | translate }}" name="shortName" |
| 40 | [(ngModel)]="vnfdInfo.shortName"> |
| 41 | </div> |
| 42 | </div> |
| 43 | <div class="form-group row"> |
| 44 | <label class="col-sm-4 col-form-label">{{ 'DESCRIPTION' | translate }}</label> |
| 45 | <div class="col-sm-8"> |
| 46 | <input type="text" class="form-control" placeholder="{{ 'DESCRIPTION' | translate }}" name="description" |
| 47 | [(ngModel)]="vnfdInfo.description"> |
| 48 | </div> |
| 49 | </div> |
| 50 | <div class="form-group row"> |
| 51 | <label class="col-sm-4 col-form-label">{{ 'VERSION' | translate }}</label> |
| 52 | <div class="col-sm-8"> |
| 53 | <input type="text" class="form-control" placeholder="{{ 'VERSION' | translate }}" name="version" |
| 54 | [(ngModel)]="vnfdInfo.version"> |
| 55 | </div> |
| 56 | </div> |
| 57 | <div class="form-group row"> |
| 58 | <label class="col-sm-4 col-form-label">{{ 'ID' | translate }}</label> |
| 59 | <div class="col-sm-8"> |
| 60 | <input type="text" class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| 61 | [(ngModel)]="vnfdInfo.id"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <div class="form-group row"> |
| 65 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 66 | <div class="col-sm-8"> |
| 67 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| 68 | [(ngModel)]="vnfdInfo.name"> |
| 69 | </div> |
| 70 | </div> |
| 71 | <button type="button" class="btn btn-primary btn-sm pull-right" (click)="saveVNFD()" placement="top" ngbTooltip="Save"> |
| 72 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 73 | </button> |
| 74 | </form> |
| 75 | </div> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="showRightSideInfo === 'vduInfo'"> |
| 79 | <div class="row"> |
| 80 | <div class="col-12 p-0"> |
| 81 | <form> |
| 82 | <div class="form-group row"> |
| 83 | <label class="col-sm-4 col-form-label">{{ 'COUNT' | translate }}</label> |
| 84 | <div class="col-sm-8"> |
| 85 | <input type="text" class="form-control" placeholder="{{ 'COUNT' | translate }}" name="count" |
| 86 | [(ngModel)]="vduInfo.count"> |
| 87 | </div> |
| 88 | </div> |
| 89 | <div class="form-group row"> |
| 90 | <label class="col-sm-4 col-form-label">{{ 'DESCRIPTION' | translate }}</label> |
| 91 | <div class="col-sm-8"> |
| 92 | <input type="text" class="form-control" placeholder="{{ 'DESCRIPTION' | translate }}" name="description" |
| 93 | [(ngModel)]="vduInfo.description"> |
| 94 | </div> |
| 95 | </div> |
| 96 | <div class="form-group row"> |
| 97 | <label class="col-sm-4 col-form-label">{{ 'IMAGE' | translate }}</label> |
| 98 | <div class="col-sm-8"> |
| 99 | <input type="text" class="form-control" placeholder="{{ 'IMAGE' | translate }}" name="image" |
| 100 | [(ngModel)]="vduInfo.image"> |
| 101 | </div> |
| 102 | </div> |
| 103 | <div class="form-group row"> |
| 104 | <label class="col-sm-4 col-form-label">{{ 'ID' | translate }}</label> |
| 105 | <div class="col-sm-8"> |
| 106 | <input type="text" class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| 107 | [(ngModel)]="vduInfo.id"> |
| 108 | </div> |
| 109 | </div> |
| 110 | <div class="form-group row"> |
| 111 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 112 | <div class="col-sm-8"> |
| 113 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| 114 | [(ngModel)]="vduInfo.name"> |
| 115 | </div> |
| 116 | </div> |
| 117 | <button type="button" class="btn btn-primary btn-sm pull-right" (click)="saveVDU(vduInfo.id)" placement="top" |
| 118 | ngbTooltip="Save"> |
| 119 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 120 | </button> |
| 121 | </form> |
| 122 | </div> |
| 123 | </div> |
| 124 | </div> |
| 125 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="showRightSideInfo === 'intvlInfo'"> |
| 126 | <div class="row"> |
| 127 | <div class="col-12 p-0"> |
| 128 | <form> |
| 129 | <div class="form-group row"> |
| 130 | <label class="col-sm-4 col-form-label">{{ 'SHORTNAME' | translate }}</label> |
| 131 | <div class="col-sm-8"> |
| 132 | <input type="text" class="form-control" placeholder="{{ 'SHORTNAME' | translate }}" name="shortName" |
| 133 | [(ngModel)]="intvlInfo.shortName"> |
| 134 | </div> |
| 135 | </div> |
| 136 | <div class="form-group row"> |
| 137 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 138 | <div class="col-sm-8"> |
| 139 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| 140 | [(ngModel)]="intvlInfo.name"> |
| 141 | </div> |
| 142 | </div> |
| 143 | <div class="form-group row"> |
| 144 | <label class="col-sm-4 col-form-label">{{ 'TYPE' | translate }}</label> |
| 145 | <div class="col-sm-8"> |
| 146 | <input type="text" class="form-control" placeholder="{{ 'TYPE' | translate }}" name="type" |
| 147 | [(ngModel)]="intvlInfo.type"> |
| 148 | </div> |
| 149 | </div> |
| 150 | <div class="form-group row"> |
| 151 | <label class="col-sm-4 col-form-label">{{ 'IPPROFILEREF' | translate }}</label> |
| 152 | <div class="col-sm-8"> |
| 153 | <input type="text" class="form-control" placeholder="{{ 'IP Profile Ref' | translate }}" |
| 154 | name="ipProfileRef" [(ngModel)]="intvlInfo.ipProfileRef"> |
| 155 | </div> |
| 156 | </div> |
| 157 | <div class="form-group row"> |
| 158 | <label class="col-sm-4 col-form-label">{{ 'ID' | translate }}</label> |
| 159 | <div class="col-sm-8"> |
| 160 | <input type="text" class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| 161 | [(ngModel)]="intvlInfo.id"> |
| 162 | </div> |
| 163 | </div> |
| 164 | <button type="button" class="btn btn-primary btn-sm pull-right" (click)="saveIntVL(intvlInfo.id)" placement="top" |
| 165 | ngbTooltip="Save"> |
| 166 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 167 | </button> |
| 168 | </form> |
| 169 | </div> |
| 170 | </div> |
| 171 | </div> |
| 172 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="showRightSideInfo === 'cpInfo'"> |
| 173 | <div class="row"> |
| 174 | <div class="col-12 p-0"> |
| 175 | <form> |
| 176 | <div class="form-group row"> |
| 177 | <label class="col-sm-4 col-form-label">{{ 'TYPE' | translate }}</label> |
| 178 | <div class="col-sm-8"> |
| 179 | <input type="text" class="form-control" placeholder="{{ 'TYPE' | translate }}" name="type" |
| 180 | [(ngModel)]="cpInfo.type"> |
| 181 | </div> |
| 182 | </div> |
| 183 | <div class="form-group row"> |
| 184 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 185 | <div class="col-sm-8"> |
| 186 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| 187 | [(ngModel)]="cpInfo.name"> |
| 188 | </div> |
| 189 | </div> |
| 190 | <button type="button" class="btn btn-primary btn-sm pull-right" (click)="saveCP(cpInfo.name)" placement="top" |
| 191 | ngbTooltip="Save"> |
| 192 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 193 | </button> |
| 194 | </form> |
| 195 | </div> |
| 196 | </div> |
| 197 | </div> |
| 198 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="showRightSideInfo === 'intcpInfo'"> |
| 199 | <div class="row"> |
| 200 | <div class="col-12 p-0"> |
| 201 | <form> |
| 202 | <div class="form-group row"> |
| 203 | <label class="col-sm-4 col-form-label">{{ 'SHORTNAME' | translate }}</label> |
| 204 | <div class="col-sm-8"> |
| 205 | <input type="text" class="form-control" name="shortName" [(ngModel)]="intcpInfo.shortName" disabled> |
| 206 | </div> |
| 207 | </div> |
| 208 | <div class="form-group row"> |
| 209 | <label class="col-sm-4 col-form-label">{{ 'TYPE' | translate }}</label> |
| 210 | <div class="col-sm-8"> |
| 211 | <input type="text" class="form-control" name="type" [(ngModel)]="intcpInfo.type" disabled> |
| 212 | </div> |
| 213 | </div> |
| 214 | <div class="form-group row"> |
| 215 | <label class="col-sm-4 col-form-label">{{ 'ID' | translate }}</label> |
| 216 | <div class="col-sm-8"> |
| 217 | <input type="text" class="form-control" name="id" [(ngModel)]="intcpInfo.id" disabled> |
| 218 | </div> |
| 219 | </div> |
| 220 | <div class="form-group row"> |
| 221 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 222 | <div class="col-sm-8"> |
| 223 | <input type="text" class="form-control" name="name" [(ngModel)]="intcpInfo.name" disabled> |
| 224 | </div> |
| 225 | </div> |
| 226 | </form> |
| 227 | </div> |
| 228 | </div> |
| 229 | </div> |
| 230 | </div> |
| 231 | </ng-sidebar> |
| 232 | <!-- Page content --> |
| 233 | <div ng-sidebar-content> |
| 234 | <button (click)="toggleSidebar()" class="btn btn-default" placement="right" ngbTooltip="{{'OPEN' | translate }}"> |
| 235 | <i class="fa fa-arrow-right detail-sidebar" aria-hidden="true"></i> |
| 236 | </button> |
| 237 | </div> |
| 238 | </ng-sidebar-container> |
| 239 | <div class="container-fluid text-dark"> |
| 240 | <div class="row bg-white vnf-composer-form"> |
| 241 | <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 pl-0 px-0"> |
| 242 | <div class="row"> |
| 243 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2"> |
| 244 | <fieldset class="p-2"> |
| 245 | <legend class="element-legend"> |
| 246 | {{'PAGE.TOPOLOGY.SELECTELEMENT' | translate}} |
| 247 | </legend> |
| 248 | <ul class="list-group list-group-flush dragable"> |
| 249 | <li class="list-group-item" draggable="true" (dragstart)="drag($event)" id="vdu"> |
| 250 | <img src="assets/images/VDU.svg" class="vnf-svg" draggable="false"/> |
| 251 | <span class="span-overflow-text font-weight-bold">{{'PAGE.TOPOLOGY.VDU' | translate}}</span> |
| 252 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 253 | </li> |
| 254 | <li class="list-group-item" draggable="true" (dragstart)="drag($event)" id="cp"> |
| 255 | <img src="assets/images/CP-VNF.svg" class="vnf-svg" draggable="false"/> |
| 256 | <span class="span-overflow-text font-weight-bold">{{'PAGE.TOPOLOGY.CP' | translate}}</span> |
| 257 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 258 | </li> |
| 259 | <li class="list-group-item" draggable="true" (dragstart)="drag($event)" id="intvl"> |
| 260 | <img src="assets/images/INTVL.svg" class="vnf-svg" draggable="false"/> |
| 261 | <span class="span-overflow-text font-weight-bold">{{'PAGE.TOPOLOGY.INTVL' | translate}}</span> |
| 262 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 263 | </li> |
| 264 | </ul> |
| 265 | </fieldset> |
| 266 | </div> |
| 267 | </div> |
| 268 | </div> |
| 269 | <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9"> |
| 270 | <div class="row"> |
| 271 | <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pl-0"> |
| 272 | <div class="btn-group list" role="group" aria-label="Basic example"> |
| 273 | <button type="button" class="btn btn-primary topology-btn" (click)="onFreeze()" |
| 274 | [class.pinned]="classApplied" placement="top" container="body" ngbTooltip="{{(classApplied ? 'UNFREEZE' : 'FREEZE') | translate}}"> |
| 275 | <i class="fas fa-thumbtack"></i> |
| 276 | </button> |
| 277 | <button type="button" class="btn btn-primary topology-btn" (click)="onEdit()" placement="top" |
| 278 | container="body" ngbTooltip="{{'EDIT' | translate}}"> |
| 279 | <i class="fas fa-edit"></i> |
| 280 | </button> |
| 281 | <button type="button" class="btn btn-primary topology-btn" (click)="showInfo()" placement="top" |
| 282 | container="body" ngbTooltip="{{'PAGE.TOPOLOGY.HELP' | translate}}"> |
| 283 | <i class="fas fa-info"></i> |
| 284 | </button> |
| 285 | </div> |
| 286 | </div> |
| 287 | <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right pr-0 badgegroup"> |
| 288 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 289 | <img src="assets/images/VDU.svg" class="vnf-svg" draggable="false"/> |
| 290 | <br>{{'PAGE.TOPOLOGY.VDU' | translate}}</span> |
| 291 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 292 | <img src="assets/images/CP-VNF.svg" class="vnf-svg" draggable="false"/> |
| 293 | <br>{{'PAGE.TOPOLOGY.CP' | translate}}</span> |
| 294 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 295 | <img src="assets/images/INTVL.svg" class="vnf-svg" draggable="false"/> |
| 296 | <br>{{'PAGE.TOPOLOGY.INTVL' | translate}}</span> |
| 297 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 298 | <img src="assets/images/INTCP.svg" class="vnf-svg" draggable="false"/> |
| 299 | <br>{{'PAGE.TOPOLOGY.INTCP' | translate}}</span> |
| 300 | </div> |
| 301 | </div> |
| 302 | <div class="row border-all"> |
| 303 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 svg-container"> |
| 304 | <svg preserveAspectRatio="xMidYMin slice" (drop)="drop($event)" (dragover)="allowDrop($event)" |
| 305 | id="graphContainer" #graphContainer> |
| 306 | </svg> |
| 307 | </div> |
| 308 | </div> |
| 309 | </div> |
| 310 | </div> |
| 311 | </div> |
| 312 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |