aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>2020-09-12 19:36:54 +0530
committermukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>2020-09-12 19:36:54 +0530
commiteadf8cdd026c9aa70213cf05ce7a0a6cbf9bd6b2 (patch)
tree488f0b2bb9af6946b7a1e4f7f206307646f87a24
parent00c46908a047a0c51f02785db0064998ca771341 (diff)
Dynamic hot onboarding bpmn-infraDynamic_BPMN
Issue-ID: SO-3104 Signed-off-by: mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com> Change-Id: Id258794c6ba29cb4a344a2a3c421283e2894b4ea
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/src/app/onboard/onboard.component.ts19
1 files changed, 14 insertions, 5 deletions
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/onboard/onboard.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/onboard/onboard.component.ts
index 8e80a1a3ed..2d5ec3cfd1 100644
--- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/onboard/onboard.component.ts
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/onboard/onboard.component.ts
@@ -69,9 +69,10 @@ export class OnboardComponent implements OnInit {
let data = this.myform.value;
this.saveServiceRecipes(JSON.stringify(data));
this.myform.reset();
- }
- if(this.fileList.length > 0) {
+ } else if(this.fileList.length > 0) {
this.handleUpload();
+ } else {
+ this.popup.error("Please fill valid data.");
}
}
@@ -82,6 +83,8 @@ export class OnboardComponent implements OnInit {
if(file.name.includes(".war")) {
this.fileName = file.name;
this.fileList = this.fileList.concat(file);
+ } else {
+ this.popup.error("Invalid file format.");
}
}
return false;
@@ -92,13 +95,16 @@ export class OnboardComponent implements OnInit {
.subscribe((data: any) => {
console.log(JSON.stringify(data));
if(data != null) {
- if(data.errMsg) {
+ if (data.id && data.id != "") {
+ this.popup.info("Data stored in database.");
+ } else if(data.errMsg) {
this.popup.error(data.errMsg);
}
}
this.spinner.hide();
},error => {
console.log(error);
+ this.popup.error("Unable to store bpmn data, Error code:" + error.status);
this.spinner.hide();
});
}
@@ -114,17 +120,20 @@ export class OnboardComponent implements OnInit {
});
this.data.onboardBPMNInfra(formData)
.subscribe((data: any) => {
+ this.spinner.hide();
console.log(JSON.stringify(data));
if(data != null) {
- if(data.result == true) {
+ if(data.result == "true") {
this.popup.info(data.message);
+ } else if(data.errMsg) {
+ this.popup.error(data.errMsg);
} else {
this.popup.error(data.message);
}
}
- this.spinner.hide();
},error => {
console.log(error);
+ this.popup.error("Unable to upload bpmn file, Error code:" + error.status);
this.spinner.hide();
});
}