Add dropdown to select NFVO 26/82926/5
authorBharath Thiruveedula <bharath.thiruveedula@verizon.com>
Thu, 21 Mar 2019 12:50:46 +0000 (18:20 +0530)
committerBharath Thiruveedula <bharath.thiruveedula@verizon.com>
Mon, 25 Mar 2019 08:45:13 +0000 (14:15 +0530)
Change-Id: I2a38e4f148f19340d1e799fe6d989efca6a418c2
Issue-ID: USECASEUI-241
Depends-on: I3f3c638cd01921e0aeaa8d55423d89f83d0f7337
Signed-off-by: Bharath Thiruveedula <bharath.thiruveedula@verizon.com>
Co-Authored-By: Sirisha Gopigiri <sirisha.gopigiri@verizon.com>
usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/appUUI.js
usecaseui-portal/src/app/components/e2e-creation/e2e-creation.component.ts
usecaseui-portal/src/app/dataInterface.ts
usecaseui-portal/src/app/myhttp.service.ts
usecaseui-portal/src/app/services/services-list/services-list.component.html
usecaseui-portal/src/app/services/services-list/services-list.component.ts

index 031cbb5..295b20a 100644 (file)
@@ -36,4 +36,4 @@ app.config(function ($routeProvider) {
 });
 
 // 请求数据地址
-var global_url = "/api/usecaseui-server/v1";
+var global_url = "/api/usecaseui-server/v1/";
index 289d122..3d2bfc5 100644 (file)
@@ -179,7 +179,10 @@ export class E2eCreationComponent implements OnInit {
         })
         this.service.parameters.resources.push(nsService);
       })
-
+      this.service.parameters.requestInputs['orchestrator'] = this.createParams.orchestrator.name;
+      if(this.createParams.isSol005Interface){
+          this.service.parameters.requestInputs['isSol005Interface'] = this.createParams.isSol005Interface;
+      }
       this.e2eCloseCreate.emit({service:this.service}); 
 
     }else if(type == "ns"){
index e092bd0..7b8d529 100644 (file)
@@ -1,5 +1,5 @@
 enum baseUrl{
-    baseUrl = '/api/usecaseui-server/v1'  //online
+    baseUrl = '/api/usecaseui/server/v1'  //online
     // baseUrl = 'http://172.19.44.223/api/usecaseui-server/v1'     //local one
     // baseUrl = 'http://10.73.191.100:8082'    //local two
 }
index 753c05f..199c99e 100644 (file)
@@ -26,6 +26,7 @@ export class MyhttpService {
   url = {
     listSortMasters:this.baseUrl+"/listSortMasters",
     customers: this.baseUrl + "/uui-lcm/customers",
+    orchestrators: this.baseUrl + "/uui-lcm/orchestrators",
     serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions",
     servicesTableData: this.baseUrl + '/uui-lcm/service-instances',
     serviceTemplates: this.baseUrl + "/uui-lcm/service-templates",
@@ -67,6 +68,11 @@ export class MyhttpService {
     return this.http.get<any>(this.url.customers);
   }
 
+  // Get all Orchestrators
+  getAllOrchestrators() {
+    return this.http.get<any>(this.url.orchestrators);
+  }
+
   // Get relevant serviceType
   getServiceTypes(customer) {
     let url = this.url.serviceType.replace("*_*", customer.id);
index 57e7446..4a1a44d 100644 (file)
             </div>
         </div>
 
+        <div *ngIf="templateTypeSelected == 'E2E Service'">
+            <div class="select-list">
+                <span style="display:inline-block;width:70px;">Orchestrator: </span>
+                <nz-select style="width: 176px;float: right;" [(ngModel)]="orchestratorSelected" nzAllowClear>
+                    <nz-option *ngFor="let item of orchestratorList" [nzValue]="item" [nzLabel]="item.name"></nz-option>
+                </nz-select>
+            </div>
+        </div>
         <div *ngIf="templateTypeSelected == 'E2E Service'||templateTypeSelected == 'Network Service'">
             <div class="select-list">
                 <span style="display:inline-block;width:70px;">TEMPLATE: </span>
                 </nz-select>
             </div>
         </div>
+        <div *ngIf="templateTypeSelected == 'E2E Service'">
+            <div class="check-box" style="margin:30px; height: 50px">
+                <input class="check-box-style" style="zoom: 1.8; width: 70px" type="checkbox" [(ngModel)]="isSol005Interface" value="true" nzAllowClear>
+                <label class="label" style="font-size: 20px; color: rgb(60,79,140,.5)">Sol005</label>
+            </div>
+        </div>
     </nz-modal>
 </div>
 <nz-layout style=" padding: 20px 32px; ">
index 4263c20..0b550ca 100644 (file)
@@ -34,8 +34,11 @@ export class ServicesListComponent implements OnInit {
     this.inputNamests();
   }
   // customer servicetype
+  isSol005Interface = false;
   customerList = [];
+  orchestratorList = [];
   customerSelected = {name:null,id:null};
+  orchestratorSelected = {name:null,id:null};
   serviceTypeList = [];
   serviceTypeSelected = {name:null};
   listSortMasters=JSON.parse(sessionStorage.getItem('listSortMasters'));
@@ -74,6 +77,18 @@ export class ServicesListComponent implements OnInit {
       })
   }
 
+  getallOrchestrators(){
+    this.myhttp.getAllOrchestrators()
+      .subscribe((data)=>{
+        this.orchestratorList = data.map((item)=>{return {name:item["name"],id:item["name"]}});
+        if(this.orchestratorList.length==0){
+          console.log("orchestratorList.length == 0",this.orchestratorList);
+          return false;
+        }
+        this.orchestratorSelected = this.orchestratorList[0];
+      })
+  }
+
   choseCustomer(item){
     this.customerSelected = item;
     this.myhttp.getServiceTypes(this.customerSelected)
@@ -88,6 +103,7 @@ export class ServicesListComponent implements OnInit {
         // console.log(this.listServiceTypes);
       })
   }
+
   choseServiceType(item){
     this.serviceTypeSelected = item;
     this.getTableData();
@@ -98,11 +114,13 @@ export class ServicesListComponent implements OnInit {
   isVisible = false;
   createModal(): void {
     this.isVisible = true;
+    this.getallOrchestrators();
     this.getAlltemplates();
   }
   //
   templateTypeSelected = "SOTN";
   choseTemplateType(){
+    this.getallOrchestrators();
     this.getAlltemplates();
   }
   //
@@ -153,7 +171,7 @@ export class ServicesListComponent implements OnInit {
       this.createshow = true;
       this.listDisplay = true;
     }else if(this.templateTypeSelected=="E2E Service"||this.templateTypeSelected=="Network Service"){
-      this.createData = {commonParams:{customer:this.customerSelected, serviceType:this.serviceTypeSelected, templateType:this.templateTypeSelected},template:this.template4};
+      this.createData = {commonParams:{customer:this.customerSelected, serviceType:this.serviceTypeSelected, templateType:this.templateTypeSelected},template:this.template4, orchestrator:this.orchestratorSelected, isSol005Interface:this.isSol005Interface};
       this.createshow2 = true;
             this.listDisplay = true;
     }
@@ -440,6 +458,7 @@ export class ServicesListComponent implements OnInit {
             this.detailshow2 = true;
         }
         this.listDisplay = true;
+    this.detailshow = true;
     this.detailData = service;
     console.log(service);
   }