diff options
author | 2019-09-04 15:23:44 +0800 | |
---|---|---|
committer | 2019-09-04 15:23:56 +0800 | |
commit | f4db02a7196dab797cac3b2a43c12a462818e2f4 (patch) | |
tree | ac73b6cdbdfb947e8ea649e661f58f5c7e14a2cc /usecaseui-portal/src/app/views/services/services-list/services-list.component.ts | |
parent | bcc5435732dbc13940ce8bb624644f087a81809c (diff) |
feat: services-list page code optimization
Change-Id: I69ce94f5add562896bb760e6e4974621c3a3e9be
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/services-list/services-list.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/services-list/services-list.component.ts | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts index d4f5c2b5..72cacc7e 100644 --- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts @@ -1114,8 +1114,8 @@ export class ServicesListComponent implements OnInit { } deleteService(service, templateDeleteSuccessFaild) { - let allprogress = {}; // - let querypros = []; // + let allprogress = {}; + let querypros = []; service.rate = 0; service.status = "In Progress"; service.tips = ""; @@ -1280,19 +1280,6 @@ export class ServicesListComponent implements OnInit { queryProgress(obj, callback) { let mypromise = new Promise((res, rej) => { - // let data = { - // operationStatus:{ - // "operationId": "XXXXXX", - // "operation": "create|delete|update|scale", - // "result": "finished|error|processing", - // "reason": "", - // "userId": "", - // "operationContent": "Be creating pop.", - // "progress": 0, - // "operateAt": "", - // "finishedAt": "" - // } - // } let errorNums = 180; let requery = () => { this.myhttp.getProgress(obj) @@ -1302,7 +1289,6 @@ export class ServicesListComponent implements OnInit { return false; } if (data.operationStatus == null || data.operationStatus.progress == undefined) { - // console.log(data); errorNums--; if (errorNums == 0) { callback({ progress: 255, status: "time over" }); @@ -1326,17 +1312,6 @@ export class ServicesListComponent implements OnInit { res(data.operationStatus); } }) - // setTimeout(()=>{ - // console.log(data.operationStatus.progress) - // data.operationStatus.progress++; - // if(data.operationStatus.progress<100){ - // callback(data.operationStatus); - // requery() - // }else{ - // callback(data.operationStatus); - // res(data.operationStatus) - // } - // },100) } requery(); }) @@ -1345,25 +1320,6 @@ export class ServicesListComponent implements OnInit { queryNsProgress(jobid, id, callback, operationType) { let mypromise = new Promise((res, rej) => { - // let data = { - // "jobId": "string", - // "responseDescriptor": { - // "status": "string", - // "progress": 0, - // "statusDescription": "string", - // "errorCode": "string", - // "responseId": "string", - // "responseHistoryList": [ - // { - // "status": "string", - // "progress": "string", - // "statusDescription": "string", - // "errorCode": "string", - // "responseId": "string" - // } - // ] - // } - // } let errorNums = 180; let requery = () => { this.myhttp.getNsProgress(jobid, id, operationType) @@ -1373,7 +1329,6 @@ export class ServicesListComponent implements OnInit { return false; } if (data.responseDescriptor == null || data.responseDescriptor.progress == undefined) { - // console.log(data); errorNums--; if (errorNums == 0) { callback({ progress: 255, status: "time over" }); @@ -1397,17 +1352,6 @@ export class ServicesListComponent implements OnInit { res(data); } }) - // setTimeout(()=>{ - // console.log(data.responseDescriptor.progress) - // data.responseDescriptor.progress++; - // if(data.responseDescriptor.progress<100){ - // callback(data.responseDescriptor); - // requery() - // }else{ - // callback(data); - // res(data) - // } - // },100) }; requery(); }); |