}
let id = item["nsInstanceId"] || item["service-instance-id"];
let jobid = item["jobId"] || item["operationId"];
- this.queryNsProgress(jobid,id,updata).then(()=>{
+ let operationType = item["operationType"];
+ this.queryNsProgress(jobid,id,updata,operationType).then(()=>{
item["rate"] = 100;
item["status"] = "Successful";
item["tips"] = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==item["operationType"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+item["status"];
}
let obj = {
serviceId:item["service-instance-id"],
- operationId:item["operationId"]
+ operationId:item["operationId"],
+ operationType:item["operationType"]
}
this.queryProgress(obj,updata).then(()=>{
item["rate"] = 100;
newData.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==newData["statusClass"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+newData["status"];
}
}
- let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"]};
+ let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"],operationType:"1001"};
return this.queryProgress(queryParams,updata);
}).then((data)=>{
console.log(data);
newData.tips =this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==newData["statusClass"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+newData["status"];
}
}
- let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"]};
+ let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"],operationType:"1001"};
querypros.push(this.queryProgress(queryParams,updata))
})
})
newData.tips =this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==newData["statusClass"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+newData["status"];
}
}
- let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"]};
+ let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"], operationType:"1001"};
querypros.push(this.queryProgress(queryParams,updata))
})
})
let createParams = "?customerId="+this.customerSelected.id +
"&serviceType="+this.serviceTypeSelected.name +
"&serviceDomain="+this.templateTypeSelected +
- "&parentServiceInstanceId=";
+ "&parentServiceInstanceId="+
+ "&uuid="+obj.service.serviceUuid+
+ "&invariantUuuid="+obj.service.serviceInvariantUuid;
this.createService(obj,createParams).then((data)=>{
console.log(data);
newData = { //
newData.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==newData["statusClass"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+newData["status"];
}
}
- let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"]};
+ let queryParams = {serviceId:data["serviceId"],operationId:data["operationId"],operationType:"1001"};
return this.queryProgress(queryParams,updata);
}).then((data)=>{
console.log(data);
newData.status = "failed";
return false;
}
+ let operationType="1001";
let updata = (prodata)=>{
newData.rate = prodata.progress;
newData.tips = newData["status"]+newData.rate+"%";
}
}
- return this.queryNsProgress(jobid,newData["service-instance-id"],updata);
+ return this.queryNsProgress(jobid,newData["service-instance-id"],updata,operationType);
}).then((data)=>{
console.log(data);
newData.rate = 100;
}
let obj = {
serviceId:id,
- operationId:data.operationId
+ operationId:data.operationId,
+ operationType:"1003"
}
let updata = (prodata)=>{
service.rate = prodata.progress;
return false;
}
let jobid = data.jobId;
+ let operationType = "1004";
let updata = (prodata)=>{
service.rate = prodata.progress;
if(service["rate"] > 100){
service.tips = "Healing" + service["status"];
}
}
- this.queryNsProgress(jobid,null,updata).then((data1)=>{
+ this.queryNsProgress(jobid,null,updata,operationType).then((data1)=>{
console.log(data1);
service.rate = 100;
service.status = "Successful";
service.tips = "Deleting" + service["status"];
return false;
}
- let obj = {serviceId:params.serviceInstanceId,operationId:data.operationId}
+ let obj = {serviceId:params.serviceInstanceId,operationId:data.operationId,operationType:"1002"}
let updata = (prodata)=>{
allprogress[prodata.operationId] = prodata.progress;
let average = ((arr)=>{return eval(arr.join("+"))/arr.length})(Object.values(allprogress));
service.tips = "Deleting";
service.statusClass = "1002";
let id = service.nsInstanceId || service["service-instance-id"];
+ let operationType ="1002";
let requestBody = {
terminationType : this.terminationType,
gracefulTerminationTimeout : this.gracefulTerminationTimeout
service.tips = "Deleting" + service["status"];
}
}
- return this.queryNsProgress(jobid,null,updata);
+ return this.queryNsProgress(jobid,null,updata,operationType);
}).then(()=>{
this.myhttp.nsDeleteInstance(id)
.subscribe((data)=>{
})
return mypromise;
}
- queryNsProgress(jobid,id,callback){
+ queryNsProgress(jobid,id,callback,operationType){
let mypromise = new Promise((res,rej)=>{
// let data = {
// "jobId": "string",
// }
let errorNums = 180;
let requery = ()=>{
- this.myhttp.getNsProgress(jobid,id)
+ this.myhttp.getNsProgress(jobid,id,operationType)
.subscribe((data)=>{
if(data.status == "FAILED"){
callback({progress:255,status:"failed"});