summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts13
-rw-r--r--usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html2
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html4
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts27
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts76
5 files changed, 87 insertions, 35 deletions
diff --git a/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts b/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts
index 1c5017c4..7d877371 100644
--- a/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts
+++ b/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts
@@ -42,6 +42,9 @@ export class MonitorFacpsServiceComponent implements OnInit {
data: []
}
],
+ tooltip: {
+ trigger: 'axis',
+ },
},
};
@@ -73,6 +76,7 @@ export class MonitorFacpsServiceComponent implements OnInit {
containLabel: true,
},
xAxis: {
+ type: "category",
axisTick: {
show: false,
},
@@ -80,6 +84,15 @@ export class MonitorFacpsServiceComponent implements OnInit {
show: false,
},
axisLabel: {
+ interval: 0,
+ show: true,
+ textStyle: {
+ color: "#a9a9a9", //更改坐标轴文字颜色
+ fontSize: 10 //更改坐标轴文字大小
+ },
+ rotate: 40,
+ showMinLabel: true,//显示最小值
+ showMaxLabel: true,//显示最大值
color: "#3C4F8C",
},
data: this.initData.option.xAxis.data,
diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html
index 2c7b11a5..889e705b 100644
--- a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html
+++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html
@@ -151,7 +151,7 @@
<td>{{item.size}}</td>
<td>{{item.createTime}}</td>
<td>{{item.active ? 'Active' : 'Inactive'}}</td>
- <td>{{item.type || '--'}}</td>
+ <td>{{item.modelType || '--'}}</td>
<td>
<button nz-button nzType="primary" class="buy-button" (click)="showDeleteConfirm(item.id)">
Delete
diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html
index 64924b9f..2fe58cfc 100644
--- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html
+++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html
@@ -29,9 +29,7 @@
[name]="item.key"
*ngIf="item.type === 'input'"
[(ngModel)]="cloud_leased_line_info[item.key]"
- [ngClass]="{'error-input-border' : validateRulesShow[i] === true}"
[placeholder]="item.placeholder ? item.placeholder : ''"
- (blur)="item.required ? this.Util.validator(item.title,item.key,cloud_leased_line_info[item.key],i,rulesText,validateRulesShow) : this.Util.validator()"
/>
</nz-tooltip>
<nz-select
@@ -55,9 +53,7 @@
[id]="item.key"
[name]="item.key"
[(ngModel)]="cloud_leased_line_info[item.key].bandwidth"
- [ngClass]="{'error-input-border' : validateRulesShow[i] === true}"
[placeholder]="item.placeholder ? item.placeholder : ''"
- (blur)="item.required ? this.Util.validator(item.title,item.key,cloud_leased_line_info[item.key],i,rulesText,validateRulesShow) : this.Util.validator()"
/>
</div>
<div>
diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts
index 90bcf9b0..a8c617ae 100644
--- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts
+++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts
@@ -21,7 +21,6 @@ export class CloudLeasedLineModalComponent implements OnInit {
@Input() cloudLeasedLineShowFlag: boolean;
@Output() cancelEmitter = new EventEmitter<boolean>();
comunicationFormItems = COMMUNICATION_FORM_ITEMS;
- validateRulesShow: any[] = [];
isLoadingOne = false;
nodeLists: any[] = [];
cloudPointOptions: any[] = [];
@@ -81,11 +80,31 @@ export class CloudLeasedLineModalComponent implements OnInit {
}
submit(): void {
+ const paramOnj = { ...this.cloud_leased_line_info };
+ for (const iterator in paramOnj) {
+ if (this.isString(paramOnj[iterator]) && !paramOnj[iterator]) {
+ this.nzMessage.error(`Please enter ${iterator}`);
+ return;
+ }
+ if (!this.isString(paramOnj[iterator])) {
+ const { name, bandwidth} = paramOnj[iterator];
+ if (!name) {
+ this.nzMessage.error(`Please enter accessPointOne Name`);
+ return;
+ }
+
+ if (bandwidth !== 0 && !/^\+?[1-9][0-9]*$/.test(bandwidth)) {
+ this.nzMessage.error(`Please enter a positive integer accessPointOne bandwidth`);
+ return;
+ }
+ }
+ }
+
this.myHttp.createIntentInstance({
...this.cloud_leased_line_info
}).subscribe(
(data) => {
- console.log(data);
+ this.nzMessage.success('Create IntentInstance Success!');
this.cancel();
},
(err) => {
@@ -107,4 +126,8 @@ export class CloudLeasedLineModalComponent implements OnInit {
};
this.cancelEmitter.emit();
}
+
+ isString(val) {
+ return Object.prototype.toString.call(val) === '[object String]';
+ }
} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts
index 28e312af..dd7949b4 100644
--- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts
+++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts
@@ -64,17 +64,16 @@ export class CloudLeasedLineComponent implements OnInit {
}
this.listOfData = data.list.map((item, index) => {
- if (item.status === 'Incomplete') {
+ if (this.statusObj[item.status] === 'Incomplete') {
const updateStatus = (prodata) => {
item.status = prodata.status || item.status;
};
- const obj = { serviceId: item.id };
+ const obj = { instanceId: item.instanceId };
this.queryStatus(obj, index, updateStatus).then(() => {
- item.status = "Completed";
- this.getCloudLeasedLineList();
+ item.status = '1';
});
- }
+ }
return item;
});
}, (err) => {
@@ -85,27 +84,33 @@ export class CloudLeasedLineComponent implements OnInit {
queryStatus(obj: any, index: number, callback: any) {
return new Promise((res) => {
const requery = () => {
- const param = [obj.id];
+ const param = {
+ ids: [obj.instanceId]
+ };
this.myHttp.getInstanceStatus(param).subscribe((response) => {
- if (
- response.data.status && response.data.status === 'Incomplete') {
- callback(response.data);
- let progressSetTimeOut = setTimeout(() => {
- requery();
- }, this.intervalTime);
- this.progressingTimer.push({
- id: obj.id,
- timer: progressSetTimeOut,
- });
- } else {
- this.progressingTimer.forEach((item) => {
- if (item.serviceId === obj.serviceId) {
- clearInterval(item.timer);
- }
- });
- res(response.data);
- }
- });
+ const { code, data:{ IntentInstances } } = response;
+ if (code !== 200 || !IntentInstances || IntentInstances.length === 0) {
+ return;
+ }
+ const intentInstance = IntentInstances[0];
+ if (this.statusObj[intentInstance.status] === 'Incomplete') {
+ callback(intentInstance);
+ let progressSetTimeOut = setTimeout(() => {
+ requery();
+ }, this.intervalTime);
+ this.progressingTimer.push({
+ instanceId: obj.instanceId,
+ timer: progressSetTimeOut,
+ });
+ } else {
+ this.progressingTimer.forEach((item) => {
+ if (item.instanceId === obj.instanceId) {
+ clearInterval(item.timer);
+ }
+ });
+ res(intentInstance);
+ }
+ });
};
requery();
});
@@ -159,7 +164,12 @@ export class CloudLeasedLineComponent implements OnInit {
this.myHttp.activeIntentInstance({
instanceId: row.instanceId
}).subscribe((data) => {
- console.log(data);
+ const { code, message } = data;
+ if (code !== 200) {
+ this.nzMessage.error(message);
+ return;
+ }
+ this.getCloudLeasedLineList();
}, (err) => {
console.log(err);
});
@@ -169,7 +179,12 @@ export class CloudLeasedLineComponent implements OnInit {
this.myHttp.invalidIntentInstance({
instanceId: row.instanceId
}).subscribe((data) => {
- console.log(data);
+ const { code, message } = data;
+ if (code !== 200) {
+ this.nzMessage.error(message);
+ return;
+ }
+ this.getCloudLeasedLineList();
}, (err) => {
console.log(err);
});
@@ -177,7 +192,12 @@ export class CloudLeasedLineComponent implements OnInit {
deleteCloudLeasedLine(row): void {
this.myHttp.deleteIntentInstance(row.instanceId).subscribe((data) => {
- console.log(data);
+ const { code, message } = data;
+ if (code !== 200) {
+ this.nzMessage.error(message);
+ return;
+ }
+ this.getCloudLeasedLineList();
}, (err) => {
console.log(err);
});