summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usecaseui-portal/src/app/shared/components/notification/notification.component.html16
-rw-r--r--usecaseui-portal/src/app/shared/components/notification/notification.component.ts4
-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
4 files changed, 37 insertions, 10 deletions
diff --git a/usecaseui-portal/src/app/shared/components/notification/notification.component.html b/usecaseui-portal/src/app/shared/components/notification/notification.component.html
index f20fd48c..0a40da9a 100644
--- a/usecaseui-portal/src/app/shared/components/notification/notification.component.html
+++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.html
@@ -5,7 +5,7 @@
<img src="{{notificationAttributes.imgPath}}" alt="{{notificationAttributes.status}}">
</span>
<!-- customer&onboard -->
- <div *ngIf="!isServicesList">
+ <div *ngIf="!isServicesList && !parentComponent">
<div class="ant-notification-notice-message">
{{(notificationAttributes.action === 'OnboardingState'? notificationAttributes.title : "i18nTextDefine_"+notificationAttributes.title) | translate}}&nbsp;
{{"i18nTextDefine_"+notificationAttributes.action | translate}}&nbsp;&nbsp;{{"i18nTextDefine_"+notificationAttributes.status | translate}}
@@ -45,6 +45,20 @@
</div>
<div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div>
</div>
+ <!-- slicing -->
+ <div *ngIf="!isServicesList && parentComponent">
+ <div class="ant-notification-notice-message">
+ {{ notificationAttributes.title}}&nbsp;
+ {{ notificationAttributes.action }}&nbsp;&nbsp;{{notificationAttributes.status}}
+ </div>
+ <div class="ant-notification-notice-description">
+ <div class="notificationlist">
+ <p>{{notificationAttributes.title}} id:&nbsp;</p>
+ <span>{{ notificationAttributes.name }}</span>
+ </div>
+ </div>
+ <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div>
+ </div>
</div>
</div>
</ng-template>
diff --git a/usecaseui-portal/src/app/shared/components/notification/notification.component.ts b/usecaseui-portal/src/app/shared/components/notification/notification.component.ts
index de0df083..18f91b35 100644
--- a/usecaseui-portal/src/app/shared/components/notification/notification.component.ts
+++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.ts
@@ -9,6 +9,7 @@ import { NzNotificationService } from 'ng-zorro-antd';
export class NotificationComponent implements OnInit {
@ViewChild('notificationModel')notificationModel: any;
@Input()isServicesList: boolean;
+ @Input()parentComponent: string;
@Input()customerSelected: object;
notificationAttributes: {
@@ -21,8 +22,7 @@ export class NotificationComponent implements OnInit {
constructor(private notification: NzNotificationService) { }
- ngOnInit() {
- }
+ ngOnInit() { }
setNotification({ title, imgPath, action, status, name }):void{
this.notificationAttributes = { title, imgPath, action, status, name };
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)
}
})
}