{
"/api/usecaseui-server/v1": {
- "target": "http://192.168.235.56:30280",
+ "target": "https://192.168.235.77:30283",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
enum baseUrl{
baseUrl = '/api/usecaseui-server/v1' //online
- // baseUrl = 'http://10.73.191.100:8082' //local two
+ // baseUrl = 'https://192.168.235.77:30283' //local two
}
interface servicesTableData {
let sameData = nsData.filter((nssdc) => { return !this.nsTableData.find((nsvfc) => { return nsvfc.id == nssdc.uuid }) });
this.nsTableData = this.nsTableData.concat(sameData);
}, (err) => {
- console.error(err);
+ this.msg.error(err);
this.isSpinning = false;
})
}, (err) => {
- console.error(err);
+ this.msg.error(err);
this.isSpinning = false;
})
}
<div class="select-list">
<span> {{"i18nTextDefine_Customer" | translate}} : </span>
<nz-select [(ngModel)]="currentCustomer.name" nzAllowClear
- (ngModelChange)="customerChange()">
+ (ngModelChange)="customerChange(currentCustomer)">
<nz-option *ngFor="let item of customerList" [nzValue]="item.name" [nzLabel]="item.name"></nz-option>
</nz-select>
</div>
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ServiceListService } from '../../../../core/services/serviceList.service';
+import { NzMessageService } from 'ng-zorro-antd';
@Component({
selector: 'app-create-model',
createData: Object = {};
loadingAnimateShow: boolean = false;
- constructor( private http: ServiceListService) {}
+ constructor(
+ private http: ServiceListService,
+ private msg: NzMessageService
+ ) {}
ngOnInit() {
this.serviceTypes = this.serviceTypeList;
getAlltemplates() {
this.http.getAllServiceTemplates(this.templateTypeSelected)
.subscribe((data) => {
- this.templates = data;
- if (this.templateTypeSelected == "Network Service") {
- this.templates = data.filter((d) => {
- return typeof d.packageInfo.csarName == "string";
- }).map((item) => {
- let cName = item.packageInfo.csarName.split("/").reverse()[0];
- return { name: cName, id: item.csarId, packageInfo: item.packageInfo }
- });
+ if(data.length!==0){
+ this.templates = data;
+ if (this.templateTypeSelected == "Network Service") {
+ this.templates = data.filter((d) => {
+ return typeof d.packageInfo.csarName == "string";
+ }).map((item) => {
+ let cName = item.packageInfo.csarName.split("/").reverse()[0];
+ return { name: cName, id: item.csarId, packageInfo: item.packageInfo }
+ });
+ }
+ this.currentTemplate = this.templates[0];
}
- this.currentTemplate = this.templates[0];
}, (err) => {
- console.log(err);
+ this.msg.error(err);
})
}
this.loadingAnimateShow = false;
}
- customerChange(): void {
+ customerChange(value): void {
+ this.currentCustomer = value;
this.getServiceType();
}
}
handleOk(): void {
+ if(this.templates.length === 0){
+ this.msg.warning('Template is required.');
+ return
+ }
if (this.templateTypeSelected === "SOTN" || this.templateTypeSelected === "CCVPN" || this.templateTypeSelected === "MDONS") {
this.createData = {
commonParams: {
</ul>
</td>
</tr>
- <tr class="childtr" [nzExpand]="data.expand" *ngFor="let item of data.childServiceInstances?data.childServiceInstances[0]:[]">
+ <tr class="childtr" [nzExpand]="data.expand" *ngFor="let item of data.childServiceInstances?data.childServiceInstances:[]">
<td></td>
<td></td>
<td>{{item["service-instance-id"] || item.nsInstanceId || item.vnfInstanceId}}</td>
if (typeof item == "string") {
item = JSON.parse(item);
}
-
item["iconMore"] = this.iconMore;
if (item["serviceDomain"] === "Network Service") {
if (item["vnfInfo"]) {
item["tips"] = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == item["operationType"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + item["status"];
+ this.getTableData();
}
}
let id = item["nsInstanceId"] || item["service-instance-id"];
item["tips"] = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == item["operationType"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + item["status"];
+ this.getTableData();
})
} else {
let updata = (prodata) => {
item["rate"] = prodata.progress || 0;
- if(item["rate"] > 100) item["status"] = prodata.status;
+ if(item["rate"] > 100) {
+ item["status"] = prodata.status;
+ this.getTableData();
+ }
item["tips"] = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] === item["operationType"] && its["language"] === this.language
})["sortValue"] + '\xa0\xa0\xa0' + (item["rate"] > 100? item["status"] : prodata.progress + '%');
item["tips"] = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == item["operationType"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + item["status"];
+ this.getTableData();
})
}
}
}
}
})
- console.log(this.tableData)
this.loading = false;
}, (err) => {
console.log(err);
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + newData["status"];
+ this.getTableData();
}
};
let queryParams = { serviceId: data["serviceId"], operationId: data["operationId"], operationType: "1001" };
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + newData["status"];
+ this.getTableData();
}
}
let queryParams = { serviceId: data["serviceId"], operationId: data["operationId"], operationType: "1001" };
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + newData["status"];
+ this.getTableData();
}
}
let queryParams = { serviceId: data["serviceId"], operationId: data["operationId"], operationType: "1001" };
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + newData["status"];
+ this.getTableData();
}
}
let hasUndone = this.tableData.some((item) => {
return item.rate < 100;
})
+ console.log(hasUndone,"------ hasUndone")
if (!hasUndone) {
setTimeout(() => {
this.getTableData();
if(slicing_business_list !==null && slicing_business_list.length >0){
this.listOfData = slicing_business_list.map((item, index) => {
if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) {
- let updata = (prodata: { operation_progress: string }) => {
+ let updata = (prodata: { operation_progress: string }) => {
item.last_operation_progress = prodata.operation_progress || item.last_operation_progress;
};
let obj = {