{
"/api/usecaseui-server/v1": {
- "target": "http://10.15.0.11:8082",
+ "target": "http://192.168.235.56:30280",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
return this.http.get<any>(url);\r
}\r
getSlicingCreateProgress(taskId: string) {\r
- const url = this.url.slicingCreateProgress.replace('{taskId', taskId);\r
+ const url = this.url.slicingCreateProgress.replace('{taskId}', taskId);\r
return this.http.get<any>(url);\r
}\r
\r
this.isSpinning = true;
this.getInfo();
this.getProgress();
- }else {
+ } else {
clearTimeout(this.timer);
this.isGetData = false;
}
} else {
this.isGetData = true;
}
- const { result_body, result_header: {result_code } } = res;
+ const { result_body, result_header: { result_code } } = res;
if (+result_code === 200) {
this.data = [];
- Object.keys(result_body).forEach( item => {
+ Object.keys(result_body).forEach(item => {
let currentProgress = 1
let status = 'process';
- if(+result_body[item] === 100){
+ if (+result_body[item] === 100) {
currentProgress = 2;
status = 'finish'
}
- const title = item === 'an_progress'? 'An': (item === 'tn_progress'? 'Tn' : 'Cn')
+ const title = item === 'an_progress' ? 'An' : (item === 'tn_progress' ? 'Tn' : 'Cn')
let obj = { [item]: result_body[item], currentProgress, title, status };
this.data.push(obj)
})
this.data = [this.data];
let flag: boolean = false;
- Object.values(result_body).forEach ( item => {
- if(item !== 100) {
+ Object.values(result_body).forEach(item => {
+ if (item !== 100) {
flag = true;
}
})
- if(flag) {
- this.timer = setTimeout( () => {
+ if (flag) {
+ this.timer = setTimeout(() => {
this.getProgress()
}, 5000)
}
this.cancel.emit(this.showProcess)
}
}
-
\ No newline at end of file