fix: fix the bug of mutiple requests 74/116274/1
authorwangyuerg <wangyuerg@chinamobile.com>
Thu, 10 Dec 2020 07:26:13 +0000 (15:26 +0800)
committerwangyuerg <wangyuerg@chinamobile.com>
Thu, 10 Dec 2020 07:26:30 +0000 (15:26 +0800)
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com>
Change-Id: Ie110d3245c7eb120edf1148653df1e14b1860ea6
Issue-ID: USECASEUI-444

usecaseui-portal/src/app/views/home/home.component.ts
usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html
usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts
usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts

index 75ebb18..1b01dff 100644 (file)
@@ -59,10 +59,6 @@ export class HomeComponent implements OnInit {
     this.seriverChart.resize(this.services.nativeElement.offsetHeight, 250)
   }
 
-  ngOnDestroy() {
-    this.resizeMark.unsubscribe()
-  }
-
   // services
   serviceNumber: number = 0;
   serviceChartData: Object;
index 3d65623..62a7d8c 100644 (file)
@@ -8,7 +8,7 @@
         <span> {{"i18nTextDefine_Customer" | translate}} : </span>
         <nz-select [(ngModel)]="currentCustomer.id" nzAllowClear
             (ngModelChange)="customerChange(currentCustomer.id)">
-            <nz-option *ngFor="let item of customerList" [nzValue]="item.name" [nzLabel]="item.name"></nz-option>
+            <nz-option *ngFor="let item of customerList" [nzValue]="item.id" [nzLabel]="item.name"></nz-option>
         </nz-select>
     </div>
     <div class="select-list">
index 9d0dd61..5369f85 100644 (file)
@@ -145,14 +145,10 @@ export class CreateModelComponent implements OnInit {
     this.http.getTemplateParameters(types, chosedtemplates)
         .subscribe((data) => {
           this.loadingAnimateShow = false;
-          if (!data || !data.status) {
-            this.temParametersTips = true;
-            this.isVisible = true;
-            this.msg.error('Back end data format error')
-          }
-          else if (data.status == "FAILED") {
+          if (!data || !data.status || data.status == "FAILED") {
             this.temParametersTips = true;
             this.isVisible = true;
+            this.msg.error('Template parsing failed');
           } else {
             this.cancel.emit(false);
             this.temParametersTips = false;
index d706247..a448bcf 100644 (file)
@@ -31,6 +31,13 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
 
     ngOnInit() {}
 
+    ngOnDestroy() {
+        console.log(this.progressingTimer)
+        this.progressingTimer.forEach((item) => {
+            clearInterval(item.timer)
+        })
+    }
+
     selectedValue: string = BUSINESS_STATUS[0];
     listOfData: any[] = [];
     pageIndex: number = 1;