aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-09-04 15:23:44 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-09-04 15:23:56 +0800
commitf4db02a7196dab797cac3b2a43c12a462818e2f4 (patch)
treeac73b6cdbdfb947e8ea649e661f58f5c7e14a2cc
parentbcc5435732dbc13940ce8bb624644f087a81809c (diff)
feat: services-list page code optimization
Change-Id: I69ce94f5add562896bb760e6e4974621c3a3e9be Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/services-list.component.html4
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/services-list.component.ts60
2 files changed, 2 insertions, 62 deletions
diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.html b/usecaseui-portal/src/app/views/services/services-list/services-list.component.html
index 206ecd8f..a995b485 100644
--- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.html
+++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.html
@@ -75,7 +75,6 @@
<span style="display:inline-block;"> {{"i18nTextDefine_UseCase" | translate}} : </span>
<nz-select style="width: 176px;float: right;" [(ngModel)]="templateTypeSelected" nzAllowClear
(ngModelChange)="choseTemplateType()">
- <!-- <nz-option *ngFor="let item of templateType" [nzValue]="item" [nzLabel]="item"></nz-option> -->
<nz-option nzValue="SOTN" nzLabel="SOTN"></nz-option>
<nz-option nzValue="CCVPN" nzLabel="CCVPN"></nz-option>
<nz-option nzValue="E2E Service" nzLabel="E2E Service"></nz-option>
@@ -193,9 +192,6 @@
<span> {{"i18nTextDefine_Update" | translate}} </span>
</li>
</ul>
- <!-- <i *ngIf="data.serviceDomain=='E2E Service'||data.serviceDomain=='Network Service' " class="anticon anticon-cloud-upload-o" (click)="updataService(data)"></i> -->
- <!-- <i [ngClass]="{'cannotclick':data.status == 'processing'||data.status=='Deleting'||data.status=='Creating'||data.status=='Healing'}"
- *ngIf="data.serviceDomain=='Network Service' " class="anticon anticon-reload" (click)="healService(data)"></i> -->
</td>
</tr>
<tr class="childtr" [nzExpand]="data.expand" *ngFor="let item of data.childServiceInstances">
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();
});