diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-12-20 12:19:50 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2019-12-20 12:19:55 +0800 |
commit | e2362aed3f00ae47ac30c5d084bd5092b49a7a2d (patch) | |
tree | 63e82decaf55d8c3813a92d1ca6728313ec8258b /usecaseui-portal | |
parent | 6b2c1c6071bc4a389859917ad2b2dece0b598046 (diff) |
fix: fix bugs of taskprogress interface
Change-Id: Ic8c37b6d5f1841da91c688baaac5bf57bc584899
Issue-ID: USECASEUI-368
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal')
3 files changed, 11 insertions, 12 deletions
diff --git a/usecaseui-portal/proxy.conf.json b/usecaseui-portal/proxy.conf.json index 8074f68d..0e71b7de 100644 --- a/usecaseui-portal/proxy.conf.json +++ b/usecaseui-portal/proxy.conf.json @@ -1,6 +1,6 @@ { "/api/usecaseui-server/v1": { - "target": "http://10.15.0.11:8082", + "target": "http://192.168.235.56:30280", "secure": false, "logLevel": "debug", "changeOrigin": true diff --git a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts index a8873d99..a9ef2591 100644 --- a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts +++ b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts @@ -100,7 +100,7 @@ export class SlicingTaskServices { return this.http.get<any>(url);
}
getSlicingCreateProgress(taskId: string) {
- const url = this.url.slicingCreateProgress.replace('{taskId', taskId);
+ const url = this.url.slicingCreateProgress.replace('{taskId}', taskId);
return this.http.get<any>(url);
}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts index d47618a5..308c19ba 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts @@ -33,7 +33,7 @@ export class CheckProcessModelComponent implements OnInit { this.isSpinning = true; this.getInfo(); this.getProgress(); - }else { + } else { clearTimeout(this.timer); this.isGetData = false; } @@ -81,29 +81,29 @@ export class CheckProcessModelComponent implements OnInit { } 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) } @@ -118,4 +118,3 @@ export class CheckProcessModelComponent implements OnInit { this.cancel.emit(this.showProcess) } } -
\ No newline at end of file |