summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-05-22 10:17:10 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-05-22 10:17:19 +0800
commit8c1ae160f8f495c4ce0679203972112735faeccf (patch)
treeccd2584c56f296ca27cdbf79fe52a3675af7b922 /usecaseui-portal/src/app/services
parent8170823270d477f5edf9ce6363781c042f8e9b08 (diff)
Fix instance detail for CCVPN
Change-Id: I8f1bbbfa80d48ec91d3929069771638c9f5dbb8a Issue-ID: USECASEUI-222 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.html1
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.ts63
2 files changed, 64 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.html b/usecaseui-portal/src/app/services/services-list/services-list.component.html
index b0efa5f4..35504ae0 100644
--- a/usecaseui-portal/src/app/services/services-list/services-list.component.html
+++ b/usecaseui-portal/src/app/services/services-list/services-list.component.html
@@ -629,6 +629,7 @@
<div class="detailComponent" *ngIf="detailshow">
<app-ccvpn-detail [detailParams]="detailData"
[upDateShow]="upDateShow"
+ (closeUpdate)="closeCCVPNUpdate($event,templateUpdateSuccessFaild)"
(closeDetail)="detailshow = false;listDisplay = false;"></app-ccvpn-detail>
</div>
<div class="detailComponent" *ngIf="detailshow2">
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 45652529..22ea733c 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
@@ -1003,6 +1003,69 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) {
})
}
+ updateCcvpnNotification(template: TemplateRef<{}>): void {
+ console.log(template,"updateCcvpnNotification show");
+ this.notification.template(template);
+ // this.notification.template(template,{ nzDuration: 0 });
+ }
+ updateCcvpnSuccessNotification(template: TemplateRef<{}>): void {
+ console.log(template,"updateCcvpnSuccessNotification show");
+ this.notification.template(template);
+ // this.notification.template(template,{ nzDuration: 0 });
+ }
+
+ closeCCVPNUpdate(obj,templateUpdateSuccessFaild){
+ console.log(obj);
+ this.detailshow = false;
+ this.listDisplay = false;
+ this.upDateShow = false;
+ this.detailData["rate"] = 0;
+ this.detailData["status"] = "In Progress";
+ this.detailData['tips'] = "";
+ this.detailData["statusClass"] = "1005";
+ let id = this.detailData["service-instance-id"];
+ this.myhttp.updateccvpn(id, obj)
+ .subscribe((data) => {
+ if (data.status == "FAILED") {
+ console.log("scale E2e service Failed :" + JSON.stringify(data));
+ this.detailData["status"] = "Failed";
+ this.detailData["tips"] = this.listSortMasters["operationTypes"].find((its) => {
+ return its["sortCode"] == this.detailData["statusClass"] && its["language"] == this.language
+ })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
+ return its["sortCode"] == 2002 && its["language"] == this.language
+ })["sortValue"];
+ this.updateCcvpnSuccessNotification(templateUpdateSuccessFaild);
+ return false;
+ }
+ let obj = {
+ serviceId: id,
+ operationId: data.operationId
+ }
+ let updata = (prodata) => {
+ this.detailData["rate"] = prodata.progress;
+ this.detailData["tips"] = this.listSortMasters["operationTypes"].find((its) => {
+ return its["sortCode"] == this.detailData["statusClass"] && its["language"] == this.language
+ })["sortValue"] + '\xa0\xa0\xa0' +this.detailData["rate"]+"%";
+ if (this.detailData["rate"] > 100) {
+ this.detailData["status"] = prodata.status;
+ this.detailData["tips"] = this.listSortMasters["operationTypes"].find((its) => {
+ return its["sortCode"] == this.detailData["statusClass"] && its["language"] == this.language
+ })["sortValue"]+ '\xa0\xa0\xa0' + this.detailData["status"];
+ }
+ };
+ this.queryProgress(obj, updata).then(() => {
+ this.detailData["rate"] = 100;
+ this.detailData["status"] = "Successful";
+ this.detailData["tips"] = this.listSortMasters["operationTypes"].find((its) => {
+ return its["sortCode"] == this.detailData["statusClass"] && its["language"] == this.language
+ })["sortValue"]+ '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
+ return its["sortCode"] == 2001 && its["language"] == this.language
+ })["sortValue"];
+ this.updateCcvpnSuccessNotification(templateUpdateSuccessFaild);
+ })
+ })
+ }
+
deleteService(service,templateDeleteSuccessFaild) {
let allprogress = {}; //
let querypros = []; //