| 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"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 36 | <label class="col-sm-4 col-form-label">{{ 'ID' | translate }}</label> |
| 37 | <div class="col-sm-8 p-0"> |
| 38 | <input type="text" class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 39 | [(ngModel)]="nsPackageDetails.id"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 40 | </div> |
| 41 | </div> |
| 42 | <div class="form-group row"> |
| 43 | <label class="col-sm-4 col-form-label">{{ 'NAME' | translate }}</label> |
| 44 | <div class="col-sm-8 p-0"> |
| 45 | <input type="text" class="form-control" placeholder="{{ 'NAME' | translate }}" name="name" |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 46 | [(ngModel)]="nsPackageDetails.name"> |
| 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 rows="5" cols="50" class="form-control" placeholder="{{ 'DESCRIPTION' | translate }}" |
| 53 | name="description" [(ngModel)]="nsPackageDetails.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)]="nsPackageDetails.version"> |
| 61 | </div> |
| 62 | </div> |
| 63 | <div class="form-group row"> |
| 64 | <label class="col-sm-4 col-form-label">{{ 'DESIGNER' | translate }}</label> |
| 65 | <div class="col-sm-8 p-0"> |
| 66 | <input type="text" class="form-control" placeholder="{{ 'DESIGNER' | translate }}" name="designer" |
| 67 | [(ngModel)]="nsPackageDetails.designer"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 68 | </div> |
| 69 | </div> |
| 70 | <button type="button" class="btn btn-primary" (click)="saveNSD()" placement="top" |
| 71 | 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="isShowVLDetails"> |
| 79 | <div class="row"> |
| 80 | <div class="col-12 p-0"> |
| 81 | <form autocomplete="off"> |
| 82 | <div class="form-group row"> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 83 | <label class="col-sm-4 p-0 col-form-label">{{ 'ID' | translate }}</label> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 84 | <div class="col-sm-8 p-0"> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 85 | <input type="text" readonly class="form-control" placeholder="{{ 'ID' | translate }}" name="id" |
| 86 | [(ngModel)]="virtualLinkDesc.id"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 87 | </div> |
| 88 | </div> |
| 89 | <div class="form-group row"> |
| 90 | <label class="col-sm-4 p-0 col-form-label">{{'PAGE.NSPACKAGE.NSCOMPOSE.MGMTNETWORK' | translate}}</label> |
| 91 | <div class="col-sm-8 p-0"> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 92 | <select class="form-control custom-select" name="mgmt-network" [(ngModel)]="virtualLinkDesc['mgmt-network']"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 93 | <option [value]="true">True</option> |
| 94 | <option [value]="false">False</option> |
| 95 | </select> |
| 96 | </div> |
| 97 | </div> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 98 | <button type="button" class="btn btn-primary" placement="top" ngbTooltip="Save" |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 99 | (click)="saveVL(virtualLinkDesc.id)"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 100 | <i class="fas fa-save"></i> {{'SAVE' | translate}} |
| 101 | </button> |
| 102 | </form> |
| 103 | </div> |
| 104 | </div> |
| 105 | </div> |
| 106 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="isShowVNFDetails"> |
| 107 | <div class="row"> |
| 108 | <div class="col-12 p-0"> |
| 109 | <table class="table table-bordered text-dark custom-table"> |
| 110 | <tbody> |
| 111 | <tr> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 112 | <th scope="row">id</th> |
| 113 | <td>{{ vnfData.id }}</td> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 114 | </tr> |
| 115 | <tr> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 116 | <th scope="row">vnfd-id</th> |
| 117 | <td>{{ vnfData['vnfd-id'] }}</td> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 118 | </tr> |
| 119 | </tbody> |
| 120 | </table> |
| 121 | </div> |
| 122 | </div> |
| 123 | </div> |
| 124 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2" *ngIf="isShowCPDetails"> |
| 125 | <div class="row"> |
| 126 | <div class="col-12 p-0"> |
| 127 | <table class="table table-bordered text-dark custom-table"> |
| 128 | <tbody> |
| 129 | <tr> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 130 | <th scope="row">id</th> |
| 131 | <td>{{ vnfData.id }}</td> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 132 | </tr> |
| 133 | <tr> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 134 | <th scope="row">vnfd-id</th> |
| 135 | <td>{{ vnfData['vnfd-id'] }}</td> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 136 | </tr> |
| 137 | <tr> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 138 | <th scope="row">constituent-base-element-id</th> |
| 139 | <td>{{ cpData['constituent-base-element-id'] }}</td> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 140 | </tr> |
| 141 | <tr> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 142 | <th scope="row">constituent-cpd-id</th> |
| 143 | <td>{{ cpData['constituent-cpd-id'] }}</td> |
| 144 | </tr> |
| 145 | <tr> |
| 146 | <th scope="row">virtual-link-profile-id</th> |
| 147 | <td>{{ virtualLinkProfileID }}</td> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 148 | </tr> |
| 149 | </tbody> |
| 150 | </table> |
| 151 | </div> |
| 152 | </div> |
| 153 | </div> |
| 154 | </div> |
| 155 | </ng-sidebar> |
| 156 | <!-- Page content --> |
| 157 | <div ng-sidebar-content> |
| 158 | <button (click)="toggleSidebar()" class="btn btn-default" placement="right" ngbTooltip="{{'OPEN' | translate }}"> |
| 159 | <i class="fa fa-arrow-right detail-sidebar" aria-hidden="true"></i> |
| 160 | </button> |
| 161 | </div> |
| 162 | </ng-sidebar-container> |
| 163 | <div class="container-fluid text-dark"> |
| 164 | <div class="row bg-white ns-composer-form"> |
| 165 | <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 pl-0 px-0"> |
| 166 | <div class="row"> |
| 167 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mb-2"> |
| 168 | <fieldset class="p-2"> |
| 169 | <legend class="vl-legend"> |
| 170 | {{'PAGE.TOPOLOGY.SELECTELEMENT' | translate}} |
| 171 | </legend> |
| 172 | <ul class="list-group list-group-flush dragable"> |
| 173 | <li class="list-group-item" draggable="true" (dragstart)="drag($event)" id="vl"> |
| 174 | <img src="assets/images/VL.svg" class="ns-svg" draggable="false"/> |
| 175 | <span class="span-overflow-text font-weight-bold">{{'PAGE.TOPOLOGY.VL' | translate}}</span> |
| 176 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 177 | </li> |
| 178 | </ul> |
| 179 | </fieldset> |
| 180 | </div> |
| 181 | </div> |
| 182 | <div class="row"> |
| 183 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> |
| 184 | <fieldset class="p-2"> |
| 185 | <legend class="vnfd-legend"> |
| 186 | {{'PAGE.TOPOLOGY.VNFD' | translate}} |
| 187 | </legend> |
| 188 | <ul class="list-group list-group-flush dragable scroll-box"> |
| 189 | <li id="list['id']" class="list-group-item" draggable="true" (dragstart)="drag($event)" |
| 190 | [attr.data-id]="list['id']" *ngFor="let list of vnfList" placement="top" |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 191 | container="body" ngbTooltip="{{ list['product-name'] }}"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 192 | <img src="assets/images/VNFD.svg" class="ns-svg" draggable="false"/> |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 193 | <span class="span-overflow-text font-weight-bold">{{ list['product-name'] }}</span> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 194 | <span class="drag-icon pull-right"><i class="fas fa-arrows-alt"></i></span> |
| 195 | </li> |
| 196 | </ul> |
| 197 | </fieldset> |
| 198 | </div> |
| 199 | </div> |
| 200 | </div> |
| 201 | <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9"> |
| 202 | <div class="row"> |
| 203 | <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pl-0"> |
| 204 | <div class="btn-group list" role="group" aria-label="Basic example"> |
| 205 | <button type="button" class="btn btn-primary topology-btn" (click)="onFreeze()" |
| 206 | [class.pinned]="classApplied" placement="top" container="body" ngbTooltip="{{(classApplied ? 'UNFREEZE' : 'FREEZE') | translate}}"> |
| 207 | <i class="fas fa-thumbtack"></i> |
| 208 | </button> |
| 209 | <button type="button" class="btn btn-primary topology-btn" (click)="onEdit()" placement="top" |
| 210 | container="body" ngbTooltip="{{'EDIT' | translate}}"> |
| 211 | <i class="fa fa-edit"></i> |
| 212 | </button> |
| 213 | <button type="button" class="btn btn-primary topology-btn" (click)="showInfo()" placement="top" |
| 214 | container="body" ngbTooltip="{{'PAGE.TOPOLOGY.HELP' | translate}}"> |
| 215 | <i class="fas fa-info"></i> |
| 216 | </button> |
| 217 | </div> |
| 218 | </div> |
| 219 | <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right pr-0 badgegroup"> |
| 220 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 221 | <img src="assets/images/VNFD.svg" class="ns-svg" draggable="false"/> |
| 222 | <br>{{'PAGE.TOPOLOGY.VNF' | translate}}</span> |
| 223 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 224 | <img src="assets/images/VL.svg" class="ns-svg" draggable="false"/> |
| 225 | <br>{{'PAGE.TOPOLOGY.VL' | translate}}</span> |
| 226 | <span class="badge badge-primary badge-pill bg-white text-body font-weight-bold"> |
| 227 | <img src="assets/images/CP.svg" class="ns-svg" draggable="false"/> |
| 228 | <br>{{'PAGE.TOPOLOGY.CP' | translate}}</span> |
| 229 | </div> |
| 230 | </div> |
| 231 | <div class="row border-all"> |
| 232 | <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 svg-container"> |
| 233 | <svg preserveAspectRatio="xMidYMin slice" (drop)="drop($event)" (dragover)="allowDrop($event)" |
| 234 | id="graphContainer" #graphContainer> |
| 235 | </svg> |
| 236 | </div> |
| 237 | </div> |
| 238 | </div> |
| 239 | </div> |
| 240 | </div> |
| 241 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |