summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-05-31 15:50:46 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-05-31 15:50:53 +0800
commitcf119161cc81a9a6eceaef288ff33c2a6a43349d (patch)
treec9ea7819baafe9b60af81b05c35415861f46ca96 /usecaseui-portal/src/app/services
parent89bd8b5842a3e1849c1888f2456e7c18f7551bf0 (diff)
Service instance topology front-end development
Change-Id: I6b42ffa8dbaf3dd41a0543c35597dd52f1338e81 Issue-ID: USECASEUI-224 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/services')
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/services/services-list/services-list.component.ts
index 959df390..5856442e 100644
--- a/usecaseui-portal/src/app/services/services-list/services-list.component.ts
+++ b/usecaseui-portal/src/app/services/services-list/services-list.component.ts
@@ -91,6 +91,7 @@ export class ServicesListComponent implements OnInit {
}
getallCustomers(){
console.log(this.listSortMasters);
+ console.log(this.language,"this.language");
this.myhttp.getAllCustomers()
.subscribe((data)=>{
this.customerList = data.map((item)=>{return {name:item["subscriber-name"],id:item["global-customer-id"]}});
@@ -613,6 +614,7 @@ export class ServicesListComponent implements OnInit {
}
deleteOk(templatedeletestarting,templateDeleteSuccessFaild) {
this.deleteModelVisible = false;
+ this.loadingAnimateShow = true;
if (this.thisService["serviceDomain"] == "Network Service") {
this.deleteNsService(this.thisService,templateDeleteSuccessFaild);
} else {
@@ -657,6 +659,7 @@ deleteOk(templatedeletestarting,templateDeleteSuccessFaild) {
}
this.createshow = false;
this.listDisplay = false;
+ this.loadingAnimateShow = true;
console.log(obj);
let newData; //Newly created service data for the main table
@@ -664,7 +667,8 @@ deleteOk(templatedeletestarting,templateDeleteSuccessFaild) {
"&serviceType=" + this.serviceTypeSelected2.name +
"&serviceDomain=" + this.templateTypeSelected;
this.createService(obj, createParams,templateCreatestarting,templateCreateSuccessFaild).then((data) => {
- console.log(data)
+ console.log(data);
+ this.loadingAnimateShow = false;
newData = { //Newly created service data in the main form
'service-instance-id': data["serviceId"],
'service-instance-name': obj.service.name,
@@ -721,6 +725,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
}
this.createshow2 = false; //
this.listDisplay = false; //
+ this.loadingAnimateShow = true;
console.log(obj);
let newData; //
let createParams = "?customerId="+this.customerSelected.id +
@@ -731,6 +736,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
"&invariantUuuid="+obj.service.serviceInvariantUuid;
this.createService(obj, createParams,templateCreatestarting,templateCreateSuccessFaild).then((data) => {
console.log(data);
+ this.loadingAnimateShow = false;
newData = { //
'service-instance-id':data["serviceId"],
'service-instance-name':obj.service.name,
@@ -786,12 +792,14 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
}
this.createshow2 = false; //
this.listDisplay = false; //
+ this.loadingAnimateShow = true;
console.log(obj);
let newData; //
// step1
this.myhttp.nsCreateInstance(obj.step1)
.subscribe((data)=>{
// console.log(data);
+ this.loadingAnimateShow = false;
newData = { //
'service-instance-id':data.nsInstanceId,
'service-instance-name':obj.step1.nsName,
@@ -873,6 +881,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
this.myhttp.createInstance(requestBody,createParams)
.subscribe((data)=>{
if(data.status == "FAILED"){
+ this.loadingAnimateShow = false;
res("Failed");
console.log("create e2e service Failed :" + JSON.stringify(data));
return false;
@@ -887,6 +896,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
this.myhttp.nsCreateInstance2(id,obj)
.subscribe((data)=>{
if(data.status == "FAILED"){
+ this.loadingAnimateShow = false;
console.log("instantiate ns service Failed :" + JSON.stringify(data));
res("Failed");
return false;
@@ -1075,6 +1085,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
return new Promise((res,rej)=>{
this.myhttp.deleteInstance(params)
.subscribe((data)=>{
+ this.loadingAnimateShow = false;
if(data.status == "FAILED"){
console.log("delete service Failed :" + JSON.stringify(data));
service.status = "Failed";
@@ -1186,6 +1197,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
let mypromise = new Promise((res,rej)=>{
this.myhttp.stopNsService(id,obj)
.subscribe((data)=>{
+ this.loadingAnimateShow = false;
if(data.status == "FAILED"){
console.log("stop ns service Failed :" + JSON.stringify(data));
res("Failed");