diff options
author | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-10 18:01:19 +0800 |
---|---|---|
committer | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-10 18:02:37 +0800 |
commit | c7a9cb23b403083f6a8b9d5b9a8a6de25e5c1502 (patch) | |
tree | 7cfd0303a68d1e16e6bb70f80a879a2a937fe5b5 /usecaseui-portal/src | |
parent | f87f67dbc1d5ba8dc7991d1552f6637d8ef12f65 (diff) |
Service instance lifecycle management
Change-Id: I5513d8f59b02ae400e5b406e46a27967af23621d
Issue-ID: USECASEUI-218
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src')
-rw-r--r-- | usecaseui-portal/src/app/app.component.html | 7 | ||||
-rw-r--r-- | usecaseui-portal/src/app/services/services-list/services-list.component.html | 6 | ||||
-rw-r--r-- | usecaseui-portal/src/app/services/services-list/services-list.component.ts | 102 | ||||
-rw-r--r-- | usecaseui-portal/src/assets/images/UUIMenuBar.png | bin | 122390 -> 119620 bytes | |||
-rw-r--r-- | usecaseui-portal/src/assets/images/uui-logo130.png | bin | 0 -> 8661 bytes | |||
-rw-r--r-- | usecaseui-portal/src/index.html | 2 | ||||
-rw-r--r-- | usecaseui-portal/src/styles.less | 5 |
7 files changed, 90 insertions, 32 deletions
diff --git a/usecaseui-portal/src/app/app.component.html b/usecaseui-portal/src/app/app.component.html index c7288e50..d99843c2 100644 --- a/usecaseui-portal/src/app/app.component.html +++ b/usecaseui-portal/src/app/app.component.html @@ -15,7 +15,10 @@ --> <nz-layout> <nz-sider nzWidth='330' style="overflow: auto; height: 100vh; position: fixed; left: 0;background: url('../assets/images/UUIMenuBar.png')"> - <ul nz-menu [nzTheme]="'dark'" [nzMode]="'inline'" style="width: 330px;margin-top: 200px"> + <div style="width: 330px;height:240px;text-align: center"> + <img src="../assets/images/uui-logo130.png" alt="" style="margin-top: 40px"> + </div> + <ul nz-menu [nzTheme]="'dark'" [nzMode]="'inline'" style="width: 330px"> <li nz-menu-item [ngClass]="{'activeMenuBar':activeMenuBar[0] == true}" (click)="thisActive(0)"> <a routerLink="home"> <span title> @@ -39,7 +42,7 @@ </li> <hr> <li nz-menu-item [ngClass]="{'activeMenuBar':activeMenuBar[2]== true}" (click)="thisActive(2)"> - <a routerLink="fcaps"> + <a href="#" onclick="window.open('http://172.30.1.80:5601/app/kibana#/dashboards')"> <span title> <i> <img src="{{activeMenuBar[2] == true ? '../assets/images/monitor-icon-active.png':'../assets/images/monitor-icon.png'}}" alt="home"> 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 7fe4564d..43d96f1a 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 @@ -190,8 +190,8 @@ </p> </td> <td> - <span [ngClass]="{'healing':data.statusClass=='1004'}">{{data.tips}}</span> - <nz-progress *ngIf=" item.status == 'Healing' " [nzPercent]="item.rate"></nz-progress> + <span [ngClass]="{'healing':data.statusClass=='1004'}">{{item.tips}}</span> + <nz-progress *ngIf=" item.status == 'In Progress' " [nzPercent]="item.rate"></nz-progress> </td> <td> <i [ngClass]="{'cannotclick':data.serviceDomain!='Network Service' || data.status == 'In Progress'||(data.status=='Failed' && data.operationType=='1001')||(data.status=='Failed' && data.operationType=='1002')}" @@ -407,7 +407,7 @@ <span class="ant-notification-notice-icon"> <img src="../../../assets/images/execute-inproess.png" alt="instance temination is starting"> </span> - <div class="ant-notification-notice-message">NS {{"i18nTextDefine_InstanceTeminationStarting" | translate}}</div> + <div class="ant-notification-notice-message">NS {{"i18nTextDefine_InstanceHealingStarting" | translate}}</div> <div class="ant-notification-notice-description"> <div class="notificationlist"> <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> 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 d5eace7e..55e339f1 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 @@ -49,7 +49,7 @@ export class ServicesListComponent implements OnInit { templateTypeSelected ="CCVPN"; orchestratorSelected = {name:null,id:null}; listSortMasters=JSON.parse(sessionStorage.getItem('listSortMasters')); - language="en"; + language = sessionStorage.getItem("DefaultLang"); iconMore=false; serviceMunber = [ { @@ -330,7 +330,9 @@ export class ServicesListComponent implements OnInit { let operationType = item["operationType"]; this.queryNsProgress(jobid,id,updata,operationType).then(()=>{ item["rate"] = 100; - item["status"] = "Successful"; + item["status"] = this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; item["tips"] = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==item["operationType"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+item["status"]; }) }else{ @@ -349,7 +351,9 @@ export class ServicesListComponent implements OnInit { } this.queryProgress(obj,updata).then(()=>{ item["rate"] = 100; - item["status"] = "Successful"; + item["status"] = this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; item["tips"] = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==item["operationType"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+item["status"]; }) } @@ -634,7 +638,9 @@ deleteOk(templatedeletestarting,templateDeleteSuccessFaild) { this.createSuccessNotification(templateCreateSuccessFaild); newData.tips = this.listSortMasters["operationTypes"].find((its) => { return its["sortCode"] == newData["statusClass"] && its["language"] == this.language - })["sortValue"] + '\xa0\xa0\xa0' + newData["status"]; + })["sortValue"] + '\xa0\xa0\xa0' +this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; let hasUndone = this.tableData.some((item) => { return item.rate < 100; }); @@ -670,6 +676,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { serviceDomain:this.templateTypeSelected, childServiceInstances:[], status:"Creating", + statusClass: 1001, rate:0, tips:"" } @@ -691,7 +698,11 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { newData.rate = 100; newData.status = "Successful"; this.createSuccessNotification(templateCreateSuccessFaild); - newData.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==newData["statusClass"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+newData["status"]; + newData.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == newData["statusClass"] && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; let hasUndone = this.tableData.some((item)=>{ return item.rate < 100; }) @@ -724,6 +735,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { serviceDomain:this.templateTypeSelected, childServiceInstances:[], status:"Creating", + statusClass: 1001, rate:0, tips:"" } @@ -746,6 +758,11 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { if(jobid == "failed"){ this.createSuccessNotification(templateCreateSuccessFaild); newData.status = "failed"; + newData.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == newData["statusClass"] && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2002 && its["language"] == this.language + })["sortValue"]; return false; } let operationType="1001"; @@ -764,7 +781,11 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { newData.rate = 100; newData.status = "Successful"; this.createSuccessNotification(templateCreateSuccessFaild); - newData.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==newData["statusClass"] && its["language"]==this.language})["sortValue"]+'\xa0\xa0\xa0'+newData["status"]; + newData.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == newData["statusClass"] && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; let hasUndone = this.tableData.some((item)=>{ return item.rate < 100; }) @@ -811,7 +832,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { service.rate = 0; service.status = "In Progress"; service.statusClass = "1003"; - service.tips= "Scaling"; + service.tips = ""; this.myhttp.scaleE2eService(id,requestBody) .subscribe((data)=>{ if(data.status == "FAILED"){ @@ -827,16 +848,24 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { } let updata = (prodata)=>{ service.rate = prodata.progress; - service.tips = "Scaling" + '\xa0\xa0\xa0' +service["rate"]+"%"; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' +service["rate"]+"%"; if(service["rate"] > 100){ service["status"]=prodata.status; - service.tips = "Scaling"+ '\xa0\xa0\xa0' + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service["statusClass"] && its["language"] == this.language + })["sortValue"]+ '\xa0\xa0\xa0' + service["status"]; } } this.queryProgress(obj,updata).then(()=>{ service.rate = 100; service.status = "Successful"; - service.tips = "Scaling"+ '\xa0\xa0\xa0' + service["status"]; + 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"] == 2001 && its["language"] == this.language + })["sortValue"]; this.scaleSuccessNotification(templateScaleSuccessFaild); }) }) @@ -846,7 +875,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { console.log(service); service.rate = 0; service.status = "In Progress"; - service.tips = "Healing"; + service.tips = ""; service.statusClass = "1004"; let id = service.nsInstanceId || service["service-instance-id"] || service["vnfNsInstanceId"]; this.myhttp.healNsService(id,requestBody) @@ -854,6 +883,11 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { if(data.status == "FAILED"){ console.log("heal nsvnf 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.healSuccessNotification(templatehealSuccessFaild); return false; } @@ -861,18 +895,26 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { let operationType = "1004"; let updata = (prodata)=>{ service.rate = prodata.progress; - service.tips = "Healing" + '\xa0\xa0\xa0' +service.rate+"%"; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' +service.rate+"%"; console.log(service.rate) if(service["rate"] > 100){ service["status"]=prodata.status; - service.tips = "Healing" + '\xa0\xa0\xa0' + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + '\xa0\xa0\xa0' + service["status"]; } } this.queryNsProgress(jobid,null,updata,operationType).then((data1)=>{ console.log(data1); service.rate = 100; service.status = "Successful"; - service.tips = "Healing" + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; this.healSuccessNotification(templatehealSuccessFaild); }); }) @@ -883,7 +925,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { let querypros = []; // service.rate = 0; service.status = "In Progress"; - service.tips = "Deleting"; + service.tips = ""; service.statusClass = "1002"; service["childServiceInstances"].push({"service-instance-id":service["service-instance-id"]}); let deletePros = service["childServiceInstances"].map((item)=>{ @@ -898,7 +940,9 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { if(data.status == "FAILED"){ console.log("delete service failed :" + JSON.stringify(data)); service.status = "failed"; - service.tips = "Deleting" + service["status"]; + 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"]; return false; } let obj = {serviceId:params.serviceInstanceId,operationId:data.operationId,operationType:"1002"} @@ -906,10 +950,10 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { allprogress[prodata.operationId] = prodata.progress; let average = ((arr)=>{return eval(arr.join("+"))/arr.length})(Object.values(allprogress)); service["rate"]=average; - service.tips = "Deleting" + '\xa0\xa0\xa0' +service["rate"]+"%"; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + '\xa0\xa0\xa0' +service["rate"]+"%"; if(service["rate"] > 100){ service["status"]=prodata.status; - service.tips = "Deleting" + '\xa0\xa0\xa0' + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + '\xa0\xa0\xa0' + service["status"]; } } querypros.push(this.queryProgress(obj,updata)); @@ -923,7 +967,9 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { console.log(data); service.rate = 100; service.status = "Successful"; - service.tips = "Deleting" + service.status; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; this.deleteSuccessNotification(templateDeleteSuccessFaild); let hasUndone = this.tableData.some((item)=>{ return item.rate < 100; @@ -939,7 +985,7 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { deleteNsService(service,templateDeleteSuccessFaild) { service.rate = 0; service.status = "In Progress"; - service.tips = "Deleting"; + service.tips = ""; service.statusClass = "1002"; let id = service.nsInstanceId || service["service-instance-id"]; let operationType ="1002"; @@ -950,15 +996,17 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { this.stopNsService(id,requestBody).then((jobid)=>{ if(jobid == "failed"){ service.status = "failed"; - service.tips = "Deleting" + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2002 && its["language"] == this.language + })["sortValue"]; return false; } let updata = (prodata)=>{ service.rate = prodata.progress; - service.tips = "Deleting" + '\xa0\xa0\xa0' +service.rate+"%"; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + '\xa0\xa0\xa0' +service.rate+"%"; if(service["rate"] > 100){ service["status"]=prodata.status; - service.tips = "Deleting" + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + service["status"]; } } return this.queryNsProgress(jobid,null,updata,operationType); @@ -968,12 +1016,16 @@ e2eCloseCreate(obj,templateCreatestarting,templateCreateSuccessFaild) { console.log(data); service.rate = 100; service.status = "Successful"; - service.tips = "Deleting" + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; this.deleteSuccessNotification(templateDeleteSuccessFaild); if(data.status == "FAILED"){ console.log("delete ns service failed :" + JSON.stringify(data)); service.status = "failed"; - service.tips = "Deleting" +'\xa0\xa0\xa0' + service["status"]; + service.tips = this.listSortMasters["operationTypes"].find((its)=>{ return its["sortCode"]==service.statusClass && its["language"]==this.language})["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2002 && its["language"] == this.language + })["sortValue"]; this.deleteSuccessNotification(templateDeleteSuccessFaild); return false; } diff --git a/usecaseui-portal/src/assets/images/UUIMenuBar.png b/usecaseui-portal/src/assets/images/UUIMenuBar.png Binary files differindex bb923858..7faade31 100644 --- a/usecaseui-portal/src/assets/images/UUIMenuBar.png +++ b/usecaseui-portal/src/assets/images/UUIMenuBar.png diff --git a/usecaseui-portal/src/assets/images/uui-logo130.png b/usecaseui-portal/src/assets/images/uui-logo130.png Binary files differnew file mode 100644 index 00000000..2843b006 --- /dev/null +++ b/usecaseui-portal/src/assets/images/uui-logo130.png diff --git a/usecaseui-portal/src/index.html b/usecaseui-portal/src/index.html index d2fc65f8..a2d2186f 100644 --- a/usecaseui-portal/src/index.html +++ b/usecaseui-portal/src/index.html @@ -17,7 +17,7 @@ <html lang="en"> <head> <meta charset="utf-8"> - <title>Uui2</title> + <title>UUI</title> <base href="./"> <meta name="viewport" content="width=device-width, initial-scale=1"> diff --git a/usecaseui-portal/src/styles.less b/usecaseui-portal/src/styles.less index 32bad49a..a5a95a1d 100644 --- a/usecaseui-portal/src/styles.less +++ b/usecaseui-portal/src/styles.less @@ -73,7 +73,7 @@ nz-table { } } -// ÏêÇéÒ³ÃÔÄã±í¸ñÑùʽ +// ����ҳ��������ʽ .detailInformatioin { nz-table { .ant-table-small { @@ -767,6 +767,9 @@ nz-notification-container .ant-notification{ } } } + .ant-notification-notice-close,.ant-notification-notice-close:hover{ + color: #ffffff!important; + } } } } |