summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-04-28 15:34:04 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-04-28 15:35:03 +0800
commiteadc4be1d995158248f1bfcff63c482059b57f71 (patch)
treee4660c767240780bc10c4e22dce293f189f739f5 /usecaseui-portal/src/app/views
parente978667f57e600c89e7ee421366dc37ef2685121 (diff)
fix: Fix the bug that the model msg is error when deleting the vnf package
Change-Id: I95baaba0184434c0609a9efe1cf0161377726eeb Issue-ID: USECASEUI-305 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r--usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts
index 6bfdf498..98f40637 100644
--- a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts
+++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts
@@ -14,10 +14,10 @@
limitations under the License.
*/
import { HttpClient, HttpRequest, HttpResponse } from '@angular/common/http';
-import { Component, OnInit, HostBinding, TemplateRef, ViewChild } from '@angular/core';
+import { Component, OnInit, HostBinding, ViewChild } from '@angular/core';
import { onboardService } from '../../core/services/onboard.service';
import { slideToRight } from '../../shared/utils/animates';
-import { NzMessageService, UploadFile, NzModalRef, NzModalService } from 'ng-zorro-antd';
+import { NzMessageService, UploadFile, NzModalService } from 'ng-zorro-antd';
import { filter } from 'rxjs/operators';
@Component({
@@ -338,8 +338,12 @@ export class OnboardVnfVmComponent implements OnInit {
}
this.myhttp[API](pkgid)
.subscribe((data) => {
- this.notification.notificationSuccess(this.currentTab, 'OnboardingState', pkgid);
resolve()
+ if(data.status === 'FAILED'){
+ this.notification.notificationFailed(this.currentTab, 'delete', pkgid);
+ }else {
+ this.notification.notificationSuccess(this.currentTab, 'delete', pkgid);
+ }
//refresh list after successful deletion
switch (this.currentTab) {
case 'NS':
@@ -354,7 +358,7 @@ export class OnboardVnfVmComponent implements OnInit {
}
}, (err) => {
console.log(err);
- this.notification.notificationFailed(this.currentTab, 'OnboardingState', pkgid);
+ this.notification.notificationFailed(this.currentTab, 'delete', pkgid);
})
}
}