| 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="ns-topology-sidebar-container"> |
| 19 | <!-- A sidebar --> |
| 20 | <ng-sidebar [(opened)]="sideBarOpened" position="left"> |
| 21 | <div class="sidebar-header"> |
| 22 | <span class="topology_title" *ngIf="isShowNSDDetails">{{'PAGE.TOPOLOGY.NSD' | translate}}</span> |
| 23 | <span class="topology_title" *ngIf="isShowVLDetails">{{'PAGE.TOPOLOGY.VIRTUALLINK' | translate}}</span> |
| 24 | <span class="topology_title" *ngIf="isShowVNFDetails">{{'PAGE.TOPOLOGY.VNF' | translate}}</span> |
| 25 | <span class="topology_title" *ngIf="isShowCPDetails">{{'PAGE.TOPOLOGY.CONNECTIONPOINT' | translate}}</span> |
| 26 | <button (click)="toggleSidebar()" class="close" type="button"> |
| 27 | <i class="fas fa-times-circle text-danger" aria-hidden="true"></i> |
| 28 | </button> |
| 29 | </div> |
| 30 | <div class="sidebar-body"> |
| 31 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="isShowNSDDetails"> |
| 32 | <div class="row"> |
| 33 | <div class="col-12 p-0"> |
| 34 | <form autocomplete="off"> |
| 35 | <div class="form-group row"> |
| 36 | <label class="col-sm-4 col-form-label">{{ 'SHORTNAME' | translate }}</label> |
| 37 | <div class="col-sm-8 p-0"> |
| 38 | <input type="text" class="form-control" placeholder="{{ 'SHORTNAME' | translate }}" name="shortName" |
| 39 | [(ngModel)]="vnfdPackageDetails.shortName"> |
| 40 | </div> |
| 41 | </div> |
| 42 | <div class="form-group row"> |
| 43 | <label class="col-sm-4 col-form-label">{{ 'VENDOR' | translate }}</label> |
| 44 | <div class="col-sm-8 p-0"> |
| 45 | <input type="text" class="form-control" placeholder="{{ 'VENDOR' | translate }}" name="vendor" |
| 46 | [(ngModel)]="vnfdPackageDetails.vendor"> |
| 47 | </div> |
| 48 | </div> |
| 49 | <div class="form-group row"> |
| 50 | <label class="col-sm-4 col-form-label">{{ 'DESCRIPTION' | translate }}</label> |
| 51 | <div class="col-sm-8 p-0"> |
| 52 | <textarea type="text" class="form-control" placeholder="{{ 'DESCRIPTION' | translate }}" |
| 53 | name="description" [(ngModel)]="vnfdPackageDetails.description"></textarea> |
| 54 | </div> |
| 55 | </div> |
| 56 | <div class="form-group row"> |
| 57 | <label class="col-sm-4 col-form-label">{{ 'VERSION' | translate }}</label> |
| 58 | <div class="col-sm-8 p-0"> |
| 59 | <input type="text" class="form-control" placeholder="{{ 'VERSION' | translate }}" name="version" |
| 60 | [(ngModel)]="vnfdPackageDetails.version"> |
| 61 | </div> |
| 62 | </div> |
| 63 | <div class="form-group row"> |
| 64 | <label class="col-sm-4 col-form-label">{{ 'ID' | translate }}</label> |
| 65 | <div class="col-sm-8 p-0"> |
| 66 | <input type="text" class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| 67 | [(ngModel)]="vnfdPackageDetails.id"> |
| 68 | </div> |
| 69 | </div> |
| 70 | <div class="form-group row"> |
| 71 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 72 | <div class="col-sm-8 p-0"> |
| 73 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| 74 | [(ngModel)]="vnfdPackageDetails.name"> |
| 75 | </div> |
| 76 | </div> |
| 77 | <button type="button" class="btn btn-primary" (click)="saveNSD()" placement="top" |
| 78 | ngbTooltip="Save"> |
| 79 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 80 | </button> |
| 81 | </form> |
| 82 | </div> |
| 83 | </div> |
| 84 | </div> |
| 85 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="isShowVLDetails"> |
| 86 | <div class="row"> |
| 87 | <div class="col-12 p-0"> |
| 88 | <form autocomplete="off"> |
| 89 | <div class="form-group row"> |
| 90 | <label class="col-sm-4 p-0 col-form-label">{{ 'NAME' | translate }}</label> |
| 91 | <div class="col-sm-8 p-0"> |
| 92 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| 93 | [(ngModel)]="vlDetails.name"> |
| 94 | </div> |
| 95 | </div> |
| 96 | <div class="form-group row"> |
| 97 | <label class="col-sm-4 p-0 col-form-label">{{'PAGE.NSPACKAGE.NSCOMPOSE.MGMTNETWORK' | translate}}</label> |
| 98 | <div class="col-sm-8 p-0"> |
| 99 | <select class="form-control custom-select" name="mgmt-network" [(ngModel)]="vlDetails['mgmt-network']"> |
| 100 | <option [value]="true">True</option> |
| 101 | <option [value]="false">False</option> |
| 102 | </select> |
| 103 | </div> |
| 104 | </div> |
| 105 | <div class="form-group row"> |
| 106 | <label class="col-sm-4 p-0 col-form-label">{{'PAGE.NSPACKAGE.NSCOMPOSE.VIMNETWORKNAME' | translate}}</label> |
| 107 | <div class="col-sm-8 p-0"> |
| 108 | <input type="text" class="form-control" placeholder="Vim network name" name="vim-network-name" |
| 109 | [(ngModel)]="vlDetails['vim-network-name']"> |
| 110 | </div> |
| 111 | </div> |
| 112 | <div class="form-group row"> |
| 113 | <label class="col-sm-4 p-0 col-form-label">{{'TYPE' | translate}}</label> |
| 114 | <div class="col-sm-8 p-0"> |
| 115 | <input type="text" class="form-control" placeholder="Type" name="type" [(ngModel)]="vlDetails.type"> |
| 116 | </div> |
| 117 | </div> |
| 118 | <div class="form-group row"> |
| 119 | <label class="col-sm-4 p-0 col-form-label">{{ 'ID' | translate }}</label> |
| 120 | <div class="col-sm-8 p-0"> |
| 121 | <input type="text" class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| 122 | [(ngModel)]="vlDetails.id"> |
| 123 | </div> |
| 124 | </div> |
| 125 | <button type="button" class="btn btn-primary" placement="top" ngbTooltip="Save" |
| 126 | (click)="saveVL(vlDetails.id)"> |
| 127 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 128 | </button> |
| 129 | </form> |
| 130 | </div> |
| 131 | </div> |
| 132 | </div> |
| 133 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="isShowVNFDetails"> |
| 134 | <div class="row"> |
| 135 | <div class="col-12 p-0"> |
| 136 | <table class="table table-bordered text-dark custom-table"> |
| 137 | <tbody> |
| 138 | <tr> |
| 139 | <td>{{'PAGE.NSPACKAGE.NSCOMPOSE.MEMBER-VNF-INDEX' | translate}}</td> |
| 140 | <td>{{ vnfData['member-vnf-index'] }}</td> |
| 141 | </tr> |
| 142 | <tr> |
| 143 | <td>{{'PAGE.NSPACKAGE.NSCOMPOSE.VNFD-ID-REF' | translate}}</td> |
| 144 | <td>{{ vnfData['vnfd-id-ref'] }}</td> |
| 145 | </tr> |
| 146 | </tbody> |
| 147 | </table> |
| 148 | </div> |
| 149 | </div> |
| 150 | </div> |
| 151 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="isShowCPDetails"> |
| 152 | <div class="row"> |
| 153 | <div class="col-12 p-0"> |
| 154 | <table class="table table-bordered text-dark custom-table"> |
| 155 | <tbody> |
| 156 | <tr> |
| 157 | <td>{{'PAGE.NSPACKAGE.NSCOMPOSE.VLD-ID' | translate}}</td> |
| 158 | <td>{{ vlDetails['name'] }}</td> |
| 159 | </tr> |
| 160 | <tr> |
| 161 | <td>{{'PAGE.NSPACKAGE.NSCOMPOSE.VNFD-CP-REF' | translate}}</td> |
| 162 | <td>{{ cpData['vnfd-connection-point-ref'] }}</td> |
| 163 | </tr> |
| 164 | <tr> |
| 165 | <td>{{'MEMBERINDEX' | translate}}</td> |
| 166 | <td>{{ cpData['member-vnf-index-ref'] }}</td> |
| 167 | </tr> |
| 168 | <tr> |
| 169 | <td>{{'PAGE.NSPACKAGE.NSCOMPOSE.VNFD-ID-REF' | translate}}</td> |
| 170 | <td>{{ cpData['vnfd-id-ref'] }}</td> |
| 171 | </tr> |
| 172 | </tbody> |
| 173 | </table> |
| 174 | </div> |
| 175 | </div> |
| 176 | </div> |
| 177 | </div> |
| 178 | </ng-sidebar> |
| 179 | <!-- Page content --> |
| 180 | <div ng-sidebar-content> |
| 181 | <button (click)="toggleSidebar()" class="btn btn-default" placement="right" ngbTooltip="{{'OPEN' | translate }}"> |
| 182 | <i class="fa fa-arrow-right detail-sidebar" aria-hidden="true"></i> |
| 183 | </button> |
| 184 | </div> |
| 185 | </ng-sidebar-container> |
| 186 | <div class="container-fluid text-dark"> |
| 187 | <div class="row bg-white ns-composer-form"> |
| 188 | <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 pl-0 px-0"> |
| 189 | <div class="row"> |
| 190 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2"> |
| 191 | <fieldset class="p-2"> |
| 192 | <legend class="vl-legend"> |
| 193 | {{'PAGE.TOPOLOGY.SELECTELEMENT' | translate}} |
| 194 | </legend> |
| 195 | <ul class="list-group list-group-flush dragable"> |
| 196 | <li class="list-group-item" draggable="true" (dragstart)="drag($event)" id="vl"> |
| 197 | <img src="assets/images/VL.svg" class="ns-svg" draggable="false"/> |
| 198 | <span class="span-overflow-text font-weight-bold">{{'PAGE.TOPOLOGY.VL' | translate}}</span> |
| 199 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 200 | </li> |
| 201 | </ul> |
| 202 | </fieldset> |
| 203 | </div> |
| 204 | </div> |
| 205 | <div class="row"> |
| 206 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> |
| 207 | <fieldset class="p-2"> |
| 208 | <legend class="vnfd-legend"> |
| 209 | {{'PAGE.TOPOLOGY.VNFD' | translate}} |
| 210 | </legend> |
| 211 | <ul class="list-group list-group-flush dragable scroll-box"> |
| 212 | <li id="list['id']" class="list-group-item" draggable="true" (dragstart)="drag($event)" |
| 213 | [attr.data-id]="list['id']" *ngFor="let list of vnfList" placement="top" |
| 214 | container="body" ngbTooltip="{{ list['short-name'] }}"> |
| 215 | <img src="assets/images/VNFD.svg" class="ns-svg" draggable="false"/> |
| 216 | <span class="span-overflow-text font-weight-bold">{{ list['short-name'] }}</span> |
| 217 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 218 | </li> |
| 219 | </ul> |
| 220 | </fieldset> |
| 221 | </div> |
| 222 | </div> |
| 223 | </div> |
| 224 | <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9"> |
| 225 | <div class="row"> |
| 226 | <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pl-0"> |
| 227 | <div class="btn-group list" role="group" aria-label="Basic example"> |
| 228 | <button type="button" class="btn btn-primary topology-btn" (click)="onFreeze()" |
| 229 | [class.pinned]="classApplied" placement="top" container="body" ngbTooltip="{{(classApplied ? 'UNFREEZE' : 'FREEZE') | translate}}"> |
| 230 | <i class="fas fa-thumbtack"></i> |
| 231 | </button> |
| 232 | <button type="button" class="btn btn-primary topology-btn" (click)="onEdit()" placement="top" |
| 233 | container="body" ngbTooltip="{{'EDIT' | translate}}"> |
| 234 | <i class="fa fa-edit"></i> |
| 235 | </button> |
| 236 | <button type="button" class="btn btn-primary topology-btn" (click)="showInfo()" placement="top" |
| 237 | container="body" ngbTooltip="{{'PAGE.TOPOLOGY.HELP' | translate}}"> |
| 238 | <i class="fas fa-info"></i> |
| 239 | </button> |
| 240 | </div> |
| 241 | </div> |
| 242 | <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right pr-0 badgegroup"> |
| 243 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 244 | <img src="assets/images/VNFD.svg" class="ns-svg" draggable="false"/> |
| 245 | <br>{{'PAGE.TOPOLOGY.VNF' | translate}}</span> |
| 246 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 247 | <img src="assets/images/VL.svg" class="ns-svg" draggable="false"/> |
| 248 | <br>{{'PAGE.TOPOLOGY.VL' | translate}}</span> |
| 249 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 250 | <img src="assets/images/CP.svg" class="ns-svg" draggable="false"/> |
| 251 | <br>{{'PAGE.TOPOLOGY.CP' | translate}}</span> |
| 252 | </div> |
| 253 | </div> |
| 254 | <div class="row border-all"> |
| 255 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 svg-container"> |
| 256 | <svg preserveAspectRatio="xMidYMin slice" (drop)="drop($event)" (dragover)="allowDrop($event)" |
| 257 | id="graphContainer" #graphContainer> |
| 258 | </svg> |
| 259 | </div> |
| 260 | </div> |
| 261 | </div> |
| 262 | </div> |
| 263 | </div> |
| 264 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |