From 8cb633afd4497c6d5d581d8f8c7c07ee2e08f542 Mon Sep 17 00:00:00 2001 From: guochuyicmri Date: Sat, 11 May 2019 23:57:49 +0800 Subject: Service instance lifecycle management Change-Id: I68bbc10d0df26e43bc3b78c8db5cf208359bfa82 Issue-ID: USECASEUI-218 Signed-off-by: guochuyicmri --- .../services-list/services-list.component.html | 26 ++++++++-- .../services-list/services-list.component.less | 42 +++++++++++----- .../services-list/services-list.component.ts | 53 +++++++++++++++++---- usecaseui-portal/src/assets/i18n/cn.json | 1 + usecaseui-portal/src/assets/i18n/en.json | 1 + .../src/assets/images/damaged-icon.png | Bin 0 -> 1751 bytes .../src/assets/images/execute-faild.png | Bin 1620 -> 1545 bytes .../src/assets/images/execute-inproess.png | Bin 2005 -> 2217 bytes .../src/assets/images/execute-success.png | Bin 1557 -> 1613 bytes .../src/assets/images/scale-active.png | Bin 0 -> 862 bytes usecaseui-portal/src/assets/images/scale.png | Bin 0 -> 881 bytes usecaseui-portal/src/assets/images/shibai-icon.png | Bin 0 -> 958 bytes .../src/assets/images/update-active.png | Bin 0 -> 761 bytes usecaseui-portal/src/assets/images/update.png | Bin 0 -> 779 bytes .../src/assets/images/wancheng-icon.png | Bin 0 -> 991 bytes usecaseui-portal/src/styles.less | 26 ++++++++++ 16 files changed, 124 insertions(+), 25 deletions(-) create mode 100644 usecaseui-portal/src/assets/images/damaged-icon.png create mode 100644 usecaseui-portal/src/assets/images/scale-active.png create mode 100644 usecaseui-portal/src/assets/images/scale.png create mode 100644 usecaseui-portal/src/assets/images/shibai-icon.png create mode 100644 usecaseui-portal/src/assets/images/update-active.png create mode 100644 usecaseui-portal/src/assets/images/update.png create mode 100644 usecaseui-portal/src/assets/images/wancheng-icon.png (limited to 'usecaseui-portal/src') 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 24b2af67..c6626379 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 @@ -150,7 +150,14 @@ {{data.tips}} + 'scaling':data.statusClass=='1003','healing':data.statusClass=='1004'}" + *ngIf="data.tips != 'Available' && data.tips != 'Unavailable'">{{data.tips}} + + Available + + + Unavailable + @@ -163,14 +170,14 @@ (click)="iconMoreShow(data,tableData)" style="transform: rotate(90deg);"> @@ -264,6 +271,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -329,6 +337,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -424,6 +433,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -455,6 +465,7 @@ {{ thisCreateService['serviceDomain'] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -489,6 +500,7 @@ {{ thisCreateService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -523,6 +535,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -551,6 +564,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -579,6 +593,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
@@ -607,6 +622,7 @@ {{ thisService["serviceDomain"] }} +
{{"i18nTextDefine_Close" | translate}}
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.less b/usecaseui-portal/src/app/services/services-list/services-list.component.less index c1cf7598..b7499724 100644 --- a/usecaseui-portal/src/app/services/services-list/services-list.component.less +++ b/usecaseui-portal/src/app/services/services-list/services-list.component.less @@ -238,8 +238,7 @@ hr { .icon-more{ position: absolute; width: 115px; - height: 135px; - //height: 156px; + height: 90px; top:50px; padding:15px 0 0 15px; background: #ffffff; @@ -250,10 +249,28 @@ hr { margin-bottom:10px; line-height: 20px; text-align: left; + cursor: pointer; + .anticon{ + width: 18px; + height: 18px; + background: url("../../../assets/images/scale.png") no-repeat; + } + .anticon.anticon-update{ + background: url("../../../assets/images/update.png") no-repeat; + } span{ margin-left: 5px; } } + li:hover{ + color: #0DA9E2; + .anticon{ + background: url("../../../assets/images/scale-active.png") no-repeat; + } + .anticon.anticon-update{ + background: url("../../../assets/images/update-active.png") no-repeat; + } + } } } tr.childtr { @@ -275,7 +292,7 @@ hr { height: 100vh; background-color: #f3f3f3; overflow-y: auto; - padding: 20px 32px; + //padding: 20px 32px; z-index: 3; } .createComponent { @@ -291,29 +308,32 @@ hr { } /*2019.01.14*/ .e2eColor,.nsColor,.ccvpnColor,.sotnColor,.voLTEColor{ - color: #FFFFFF; + color: #3671AB; width:120px; height: 34px; line-height: 34px; margin-bottom: 0!important; text-align: center; - background:linear-gradient(131deg,rgba(79,151,239,1) 0%,rgba(48,217,196,1) 100%); + background:linear-gradient(131deg,rgba(147,196,255,1) 0%,rgba(120,241,226,1) 100%); border-radius:4px } .nsColor{ - background:linear-gradient(135deg,rgba(252,167,91,1) 0%,rgba(253,203,106,1) 100%); + background:linear-gradient(135deg,rgba(253,187,127,1) 0%,rgba(250,215,153,1) 100%); border-radius:4px; + color: #A16C39; } -.ccvpnColor{ - background:linear-gradient(135deg,rgba(81,113,251,1) 0%,rgba(201,123,254,1) 100%); +.ccvpnColor{ + background:linear-gradient(135deg,rgba(198,222,251,1) 0%,rgba(217,215,252,1) 100%); border-radius:4px; + color: #7C74BB; } .sotnColor{ - background:linear-gradient(133deg,rgba(24,179,170,1) 0%,rgba(70,216,178,1) 100%); + background:rgba(201,243,239,1); border-radius:4px; + color: #30B0A0; } -.voLTEColor{ - background:#0AD251; +.voLTEColor{ + background:rgba(201,243,239,1); } .vnfColor,.siteColor,.SDWANColor{ color:rgba(60,79,140,0.5); 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 55e339f1..06991b47 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 @@ -54,23 +54,23 @@ export class ServicesListComponent implements OnInit { serviceMunber = [ { "serviceDomain": "E2E", - "Success": 16, - "failed": 4, - "InProgress": 11, + "Success": 0, + "failed": 0, + "InProgress": 0, "detailName":"i18nTextDefine_End_To_End_Service" }, { "serviceDomain": "NS", - "Success": 21, - "failed": 2, - "InProgress": 17, + "Success": 0, + "failed": 0, + "InProgress": 0, "detailName":"i18nTextDefine_Network_Service" }, { "serviceDomain": "CCVPN", - "Success": 36, - "failed": 15, - "InProgress": 6, + "Success": 0, + "failed": 0, + "InProgress": 0, "detailName":"i18nTextDefine_Cross_Domain_and_Cross_Layer_VPN" } ]; @@ -361,6 +361,36 @@ export class ServicesListComponent implements OnInit { return item; }) console.log(this.tableData) + this.tableData.map((item,index) => { + if(item.serviceDomain == 'E2E Service'){ + if(item.operationResult == 2001){ + this.serviceMunber[0]["Success"]+=1; + }else if(item.operationResult == 2002){ + this.serviceMunber[0]["failed"]+=1; + }else if(item.operationResult == 2003){ + this.serviceMunber[0]["InProgress"]+=1; + } + } + else if(item.serviceDomain == 'Network Service'){ + if(item.operationResult == 2001){ + this.serviceMunber[1]["Success"]+=1; + }else if(item.operationResult == 2002){ + this.serviceMunber[1]["failed"]+=1; + }else if(item.operationResult == 2003){ + this.serviceMunber[1]["InProgress"]+=1; + } + } + else if(item.serviceDomain == 'CCVPN'){ + if(item.operationResult == 2001){ + this.serviceMunber[2]["Success"]+=1; + }else if(item.operationResult == 2002){ + this.serviceMunber[2]["failed"]+=1; + }else if(item.operationResult == 2003){ + this.serviceMunber[2]["InProgress"]+=1; + } + } + }) + console.log(this.serviceMunber) },(err)=>{ console.log(err); }) @@ -838,6 +868,11 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { if(data.status == "FAILED"){ console.log("scale E2e service failed :" + JSON.stringify(data)); service.status = "failed"; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2002 && its["language"] == this.language + })["sortValue"]; this.scaleSuccessNotification(templateScaleSuccessFaild); return false; } diff --git a/usecaseui-portal/src/assets/i18n/cn.json b/usecaseui-portal/src/assets/i18n/cn.json index 3983d099..9686dea3 100644 --- a/usecaseui-portal/src/assets/i18n/cn.json +++ b/usecaseui-portal/src/assets/i18n/cn.json @@ -81,6 +81,7 @@ "i18nTextDefine_InstanceUpdateStarting":"更新开始", "i18nTextDefine_InstanceUpdatedSuccessfully":"更新成功", "i18nTextDefine_InstanceUpdateFailed":"更新失败", + "i18nTextDefine_Close":"关闭", "ccvpn-creation-component":"--:", "i18nTextDefine_InstanceCreation":"实例创建", diff --git a/usecaseui-portal/src/assets/i18n/en.json b/usecaseui-portal/src/assets/i18n/en.json index 255134f8..26e95fda 100644 --- a/usecaseui-portal/src/assets/i18n/en.json +++ b/usecaseui-portal/src/assets/i18n/en.json @@ -81,6 +81,7 @@ "i18nTextDefine_InstanceUpdateStarting":"instance update is starting.", "i18nTextDefine_InstanceUpdatedSuccessfully":"instance was updated successfully.", "i18nTextDefine_InstanceUpdateFailed":"instance update failed!!!", + "i18nTextDefine_Close":"close", "ccvpn-creation-component":"--:", "i18nTextDefine_InstanceCreation":"Instance Creation", diff --git a/usecaseui-portal/src/assets/images/damaged-icon.png b/usecaseui-portal/src/assets/images/damaged-icon.png new file mode 100644 index 00000000..37a016bc Binary files /dev/null and b/usecaseui-portal/src/assets/images/damaged-icon.png differ diff --git a/usecaseui-portal/src/assets/images/execute-faild.png b/usecaseui-portal/src/assets/images/execute-faild.png index 91ab52fe..c7bfce06 100644 Binary files a/usecaseui-portal/src/assets/images/execute-faild.png and b/usecaseui-portal/src/assets/images/execute-faild.png differ diff --git a/usecaseui-portal/src/assets/images/execute-inproess.png b/usecaseui-portal/src/assets/images/execute-inproess.png index 6a1beb3b..7a11d6cd 100644 Binary files a/usecaseui-portal/src/assets/images/execute-inproess.png and b/usecaseui-portal/src/assets/images/execute-inproess.png differ diff --git a/usecaseui-portal/src/assets/images/execute-success.png b/usecaseui-portal/src/assets/images/execute-success.png index 36d67efd..aaf46c35 100644 Binary files a/usecaseui-portal/src/assets/images/execute-success.png and b/usecaseui-portal/src/assets/images/execute-success.png differ diff --git a/usecaseui-portal/src/assets/images/scale-active.png b/usecaseui-portal/src/assets/images/scale-active.png new file mode 100644 index 00000000..0ff69f30 Binary files /dev/null and b/usecaseui-portal/src/assets/images/scale-active.png differ diff --git a/usecaseui-portal/src/assets/images/scale.png b/usecaseui-portal/src/assets/images/scale.png new file mode 100644 index 00000000..1cd508bd Binary files /dev/null and b/usecaseui-portal/src/assets/images/scale.png differ diff --git a/usecaseui-portal/src/assets/images/shibai-icon.png b/usecaseui-portal/src/assets/images/shibai-icon.png new file mode 100644 index 00000000..374f6270 Binary files /dev/null and b/usecaseui-portal/src/assets/images/shibai-icon.png differ diff --git a/usecaseui-portal/src/assets/images/update-active.png b/usecaseui-portal/src/assets/images/update-active.png new file mode 100644 index 00000000..75eeecc0 Binary files /dev/null and b/usecaseui-portal/src/assets/images/update-active.png differ diff --git a/usecaseui-portal/src/assets/images/update.png b/usecaseui-portal/src/assets/images/update.png new file mode 100644 index 00000000..d6788024 Binary files /dev/null and b/usecaseui-portal/src/assets/images/update.png differ diff --git a/usecaseui-portal/src/assets/images/wancheng-icon.png b/usecaseui-portal/src/assets/images/wancheng-icon.png new file mode 100644 index 00000000..4d672a81 Binary files /dev/null and b/usecaseui-portal/src/assets/images/wancheng-icon.png differ diff --git a/usecaseui-portal/src/styles.less b/usecaseui-portal/src/styles.less index a5a95a1d..3cdc7112 100644 --- a/usecaseui-portal/src/styles.less +++ b/usecaseui-portal/src/styles.less @@ -742,7 +742,11 @@ nz-notification-container .ant-notification{ background: rgba(255,255,255,0); opacity: 1!important; color: #ffffff; + position: relative; + background-image: url("assets/images/notificationmodel.png"); + background-repeat: no-repeat; .ant-notification-notice-content{ + position: relative; .ant-notification-notice-icon{} .ant-notification-notice-message{ margin-left: 88px; @@ -752,6 +756,8 @@ nz-notification-container .ant-notification{ } .ant-notification-notice-description{ margin-left: 88px; + width: 68%; + display: inline-block; .notificationlist{ height: 25px; line-height: 25px; @@ -766,10 +772,30 @@ nz-notification-container .ant-notification{ } } } + .close-icons{ + position: absolute; + width: 100px; + text-align: center; + display: inline-block; + color: #D9DEF1; + top: 0; + line-height: 120px; + font-size: 18px; + } } .ant-notification-notice-close,.ant-notification-notice-close:hover{ color: #ffffff!important; } + .ant-notification-notice-close{ + width: 80px; + height: 100%; + position: absolute; + border-left: 1px solid #717171; + top: 0; + .ant-notification-notice-close-x{ + display: none; + } + } } } } -- cgit 1.2.3-korg