summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-06 21:34:38 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-06 21:34:53 +0800
commit5bdc5c68c3e7ebc24a7a5ca1e379c1e4ecead2fd (patch)
treea13e20ac6783baef435399991fca1162904ae3e7 /usecaseui-portal/src/app/views
parent75baba3816940c053bb00b208e37b5b0887d9b9c (diff)
feat: Added tooltip for failed requests
Change-Id: Iab417a0f2c641cde56c06abef6010d5a813f2935 Issue-ID: USECASEUI-368 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html5
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts22
2 files changed, 20 insertions, 7 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html
index 19c83728..666fa16b 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html
@@ -95,5 +95,6 @@
(paramsDataChange)="changeParams($event)"
>
</app-subnet-params-model>
-
-</nz-modal> \ No newline at end of file
+
+</nz-modal>
+<app-notification #notification [isServicesList]="false" [parentComponent]="'slicing'"></app-notification> \ No newline at end of file
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
index 9d0e3aec..ff64dfe1 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
@@ -1,4 +1,5 @@
-import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd';
import { SlicingTaskServices } from '../../../../../core/services/slicingTaskServices';
@Component({
@@ -11,8 +12,9 @@ export class SlicingTaskModelComponent implements OnInit {
@Input() moduleTitle: string;
@Input() taskId: string;
@Output() cancel = new EventEmitter<boolean>();
+ @ViewChild('notification') notification1: any;
- constructor(private http: SlicingTaskServices) { }
+ constructor(private http: SlicingTaskServices, private message: NzMessageService) { }
// 配置审核详情
checkDetail: any[] = [{}];
@@ -189,9 +191,12 @@ export class SlicingTaskModelComponent implements OnInit {
const { nsi_service_instances, record_number } = result_body;
this.slicingInstances.total = record_number;
this.slicingInstances.list.push(...nsi_service_instances);
- this.slicingInstances.isLoading = false;
- this.slicingInstances.flag = false;
+ } else {
+ this.message.error('Failed to get slicing instance ID')
}
+ this.slicingInstances.isLoading = false;
+ this.slicingInstances.flag = false;
+
})
}
@@ -203,6 +208,8 @@ export class SlicingTaskModelComponent implements OnInit {
const { result_header: { result_code }, result_body, record_number} = res;
if (+result_code === 200) {
this.subnetDataFormatting(result_body, record_number)
+ } else {
+ this.message.error('Failed to get slicing subnet instance ID')
}
})
this.slicingInstances.list.forEach (item => {
@@ -286,6 +293,8 @@ export class SlicingTaskModelComponent implements OnInit {
item.flag = false;
}
})
+ } else {
+ this.message.error('Failed to get slicing subnet instance ID');
}
})
}
@@ -335,11 +344,14 @@ export class SlicingTaskModelComponent implements OnInit {
}
let reqBody = {...checkDetail[0], business_demand_info: businessRequirement[0], nst_info: NSTinfo[0], nsi_nssi_info};
delete reqBody.service_snssai;
+ this.notification1.notificationStart('Task', 'Sumbit', this.taskId)
this.http.submitSlicing(reqBody).subscribe (res => {
const { result_header: { result_code } } = res;
if (+result_code === 200) {
- console.log('成功提交')
this.handleCancel();
+ this.notification1.notificationSuccess('Task', 'Sumbit', this.taskId)
+ } else {
+ this.notification1.notificationFailed('Task', 'Sumbit', this.taskId)
}
})
}