this.width = document.documentElement.clientWidth
});
}
-
+ ngOnDestroy() {
+ clearInterval(this.progressOutTimer);
+ clearInterval(this.progressingTimer);
+ }
// customer servicetype
isSol005Interface = false;
orchestratorList = [];
}
];
+ requery;
+ progressOutTimer = setTimeout(() => {
+ this.requery();
+ }, 10000);
+ progressingTimer = setTimeout(() => {
+ this.requery();
+ }, 5000);
+
//The icon behind each row of data in the table expands
iconMoreShow(data, tableData) {
tableData.map((its) => {
let mypromise = new Promise((res, rej) => {
let operationTypeObj = {operationType:obj.operationType};
let errorNums = 180;
- let requery = () => {
+ this.requery = () => {
this.myhttp.getProgress(obj,operationTypeObj)
.subscribe((data) => {
if (data.status == "FAILED") {
callback({ progress: 255, status: "time over" });
return false;
}
- setTimeout(() => {
- requery();
- }, 10000)
+ this.progressOutTimer;
return false;
}
if (data.operationStatus.progress > 100) {
}
if (data.operationStatus.progress < 100) {
callback(data.operationStatus);
- setTimeout(() => {
- requery();
- }, 5000)
+ this.progressingTimer;
} else {
res(data.operationStatus);
}
})
}
- requery();
+ this.requery();
})
return mypromise;
}
"serviceInstanceId":id,
"operationType":operationType
}
- let requery = () => {
+ this.requery = () => {
this.myhttp.getNsProgress(jobid,paramsObj)
.subscribe((data) => {
if (data.status == "FAILED") {
callback({ progress: 255, status: "time over" });
return false;
}
- setTimeout(() => {
- requery();
- }, 10000)
+ this.progressOutTimer;
return false;
}
if (data.responseDescriptor.progress > 100 && data.responseDescriptor.status == "error") {
}
if (data.responseDescriptor.progress < 100) {
callback(data.responseDescriptor);
- setTimeout(() => {
- requery();
- }, 5000)
+ this.progressingTimer;
} else {
res(data);
}
})
};
- requery();
+ this.requery();
});
return mypromise;
}
-
}