summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-11-08 17:34:00 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-11-08 17:34:13 +0800
commit5a45365c037a43d2c0a04ffb96b3f91f7e49b6ac (patch)
treea5d1730dcb5ed5b6c8b819854476394879da42d9
parentaf41cf8c45aad0a940c45141cb9d5572423d60b9 (diff)
Fix VNF Performance Query Bugs
Change-Id: Ibc9c8cbd5425bff5b0158bb7ee2a3a8f25a05e89 Issue-ID: USECASEUI-166 Signed-off-by: zhangab <zhanganbing@chinamobile.com>
-rw-r--r--usecaseui-portal/src/app/alarm/alarm.component.ts6
-rw-r--r--usecaseui-portal/src/app/components/graphiclist/graphiclist.component.html6
-rw-r--r--usecaseui-portal/src/app/components/graphiclist/graphiclist.component.ts17
-rw-r--r--usecaseui-portal/src/app/components/performance-details/performance-details.component.ts19
-rw-r--r--usecaseui-portal/src/app/myhttp.service.ts18
-rw-r--r--usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.html8
-rw-r--r--usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.ts45
7 files changed, 60 insertions, 59 deletions
diff --git a/usecaseui-portal/src/app/alarm/alarm.component.ts b/usecaseui-portal/src/app/alarm/alarm.component.ts
index 9fe870bb..9b454b02 100644
--- a/usecaseui-portal/src/app/alarm/alarm.component.ts
+++ b/usecaseui-portal/src/app/alarm/alarm.component.ts
@@ -45,7 +45,7 @@ export class AlarmComponent implements OnInit {
ngOnInit() {
this.getAlarmFormData();
this.getSourceNames();
- // this.getstatuscount();
+ this.getstatuscount();
}
// Filter box
@@ -98,9 +98,7 @@ export class AlarmComponent implements OnInit {
this.startTime = this.datePipe.transform(result[0], 'yyyy-MM-dd HH:mm:ss');
this.endTime = this.datePipe.transform(result[1], 'yyyy-MM-dd HH:mm:ss');
}
- sort(e){
- }
// total
alarmList = {
all: 0,
@@ -275,7 +273,9 @@ export class AlarmComponent implements OnInit {
]
}
};
+ sort(e){
+ }
//Detail page title display
detailshow = false;
// Show hidden animation
diff --git a/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.html b/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.html
index 3789c598..c5c3a3ed 100644
--- a/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.html
+++ b/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.html
@@ -34,8 +34,8 @@
<th nzWidth="20%">Source Name</th>
<th nzWidth="20%">Event Name</th>
<th nzWidth="20%">ReportingEntityName</th>
- <!-- <th nzWidth="20%">Report Time</th> -->
- <th nzWidth="10%">Action</th>
+ <th nzWidth="15%">Report Time</th>
+ <th nzWidth="5%">Action</th>
</tr>
</thead>
<tbody>
@@ -45,7 +45,7 @@
<td>{{item.sourceName}}</td>
<td>{{item.eventName}}</td>
<td>{{item.reportingEntityName}}</td>
- <!-- <td>{{item.sequence}}</td> -->
+ <td>{{item.startEpochMicrosec | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td><a class="action" (click)="detailShow(item)"><i class="details"></i></a></td>
</tr>
<!-- </ng-template> -->
diff --git a/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.ts b/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.ts
index c3153c8e..01e716db 100644
--- a/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.ts
+++ b/usecaseui-portal/src/app/components/graphiclist/graphiclist.component.ts
@@ -25,7 +25,7 @@ import { DatePipe } from "@angular/common"
providers: [DatePipe]
})
export class GraphiclistComponent implements OnInit {
- public startTime: string = '';
+ public startTime: string ='';
public endTime: string = '';
public currentPage: number = 1;
public pageSize: number = 10;
@@ -46,28 +46,23 @@ export class GraphiclistComponent implements OnInit {
}
ngOnInit() {
- this.getPerformanceFormData();
}
- ngOnchanges(changes){
+ ngOnChanges(changes){
this.getPerformanceFormData();
- console.log(this.vnfname)
-
}
getPerformanceFormData() {
- this.myhttp.getAlarmFormData(this.currentPage, this.pageSize, this.vnfname, this.startTime, this.endTime).subscribe((data) => {
- console.log(data)
- this.list = data.alarms;
+ this.myhttp.getPerformanceFormData(this.currentPage, this.pageSize, this.vnfname, this.startTime, this.endTime).subscribe((data) => {
+ this.list = data.performances;
})
}
// Date screening
dateRange = [ addDays(new Date(), -30), new Date() ];
onChange(result: Date): void {
- this.startTime = this.datePipe.transform(result[0], 'yyyy-MM-dd-HH:mm:ss');
- this.endTime = this.datePipe.transform(result[1], 'yyyy-MM-dd-HH:mm:ss');
+ this.startTime = this.datePipe.transform(result[0], 'yyyy-MM-dd HH:mm:ss');
+ this.endTime = this.datePipe.transform(result[1], 'yyyy-MM-dd HH:mm:ss');
}
sort(e){
-
}
@Input () vnfname;
@Output() detailData = new EventEmitter();
diff --git a/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts b/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts
index 2e174474..83467172 100644
--- a/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts
+++ b/usecaseui-portal/src/app/components/performance-details/performance-details.component.ts
@@ -14,20 +14,23 @@ export class PerformanceDetailsComponent implements OnInit {
constructor(private myhttp:MyhttpService) { }
ngOnInit() {
- this.getAlarmDetailData(this.detailId);
+
}
ngOnChanges(changes){
- // console.log(changes);
+ console.log(this.detailId)
+ this.getPerformanceHeaderDetail(this.detailId);
}
datailheaderdata: any = {};
dataillistdata: any = [];
- getAlarmDetailData(id){
- this.myhttp.getAlarmDetailData(id).subscribe((data)=>{
- console.log(data)
- this.datailheaderdata = data.alarmsHeader;
- this.dataillistdata = data.list;
- })
+ getPerformanceHeaderDetail(id){
+ if(id){
+ this.myhttp.getPerformanceHeaderDetail(id).subscribe((data)=>{
+ console.log(data)
+ this.datailheaderdata = data.performanceHeader;
+ this.dataillistdata = data.list;
+ })
+ }
}
moredetailShow = false;
@Input() detailId;
diff --git a/usecaseui-portal/src/app/myhttp.service.ts b/usecaseui-portal/src/app/myhttp.service.ts
index 0f5f2241..0496eed9 100644
--- a/usecaseui-portal/src/app/myhttp.service.ts
+++ b/usecaseui-portal/src/app/myhttp.service.ts
@@ -73,7 +73,7 @@ export class MyhttpService {
customers: this.baseUrl + "/uui-lcm/customers",
serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions",
- servicesTableData: this.baseUrl + '/uui-sotn/getServiceInstanceList',
+ servicesTableData: this.baseUrl + '/uui-lcm/service-instances',
serviceTemplates: this.baseUrl + "/uui-lcm/service-templates",
templateParameters: this.baseUrl + "/uui-lcm/service-templates/" + "*_*" + "?toscaModelPath=",
nstemplateParameters: this.baseUrl + "/uui-lcm/fetchNsTemplateData",
@@ -282,9 +282,9 @@ export class MyhttpService {
}
-// alarm data
+ // alarm data
getAlarmFormData(currentPage: number, pageSize: number, sourceName?: string, priority?: string, startTime?: string, endTime?: string, vfStatus?: string) {
- return this.http.get<any>('/api/usecaseui-server/v1/alarm/' + '/' + currentPage + '/' + pageSize + '/' + sourceName + '/' + priority + '/' + startTime + '/' + endTime + '/' + vfStatus);
+ return this.http.get<any>('/api/usecaseui-server/v1/alarm/' + '/' + currentPage + '/' + pageSize + '?sourceName=' + sourceName + '&priority=' + priority + '&startTime=' + startTime + '&endTime=' + endTime + '&vfStatus=' + vfStatus);
}
getSourceNames() {
@@ -300,16 +300,20 @@ export class MyhttpService {
return this.http.get<any>(httpurl);
}
- // performancevnf data
+ // performance data
getqueryAllSourceNames() {
let httpurl = this.baseUrl + "/api/usecaseui-server/v1/performance/queryAllSourceNames";
return this.http.get<any>(httpurl);
}
- getperformanceSsourceNames(currentPage: number, pageSize: number, sourceName: string) {
- let httpurl = this.baseUrl + "/api/usecaseui-server/v1/performanceSsourceNames" + "/" + currentPage + "/" + pageSize + "/" + sourceName;
+ getperformanceSourceNames(currentPage: number, pageSize: number, sourceName: string) {
+ let httpurl = this.baseUrl + "/api/usecaseui-server/v1/performanceSsourceNames" + "/" + currentPage + "/" + pageSize + "?sourceName=" + sourceName;
return this.http.get<any>(httpurl);
}
getPerformanceFormData(currentPage: number, pageSize: number, sourceName?: string, startTime?: string, endTime?: string) {
- return this.http.get<any>('/api/usecaseui-server/v1/performance' + '/' + currentPage + '/' + pageSize + '/' + sourceName + '/' + startTime + '/' + endTime);
+ return this.http.get<any>('/api/usecaseui-server/v1/performance' + '/' + currentPage + '/' + pageSize + '?sourceName=' + sourceName + '&startTime=' + startTime + '&endTime=' + endTime);
+ }
+ getPerformanceHeaderDetail(id) {
+ let httpurl = '/api/usecaseui-server/v1/performance/getPerformanceHeaderDetail/' + id;
+ return this.http.get<any>(httpurl);
}
}
diff --git a/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.html b/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.html
index d308d808..2899b6a6 100644
--- a/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.html
+++ b/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.html
@@ -33,17 +33,17 @@
</div>
<div class="content" [@showHideAnimate]="state">
<div class="vnfs">
- <div class="vnf" *ngFor="let item of vnfsData">
+ <div class="vnf" *ngFor="let item of totalRecords">
<img src="../../../assets/images/VNF3.png" title="VF" (click)="graphicShow2(item)">
- <h3>{{item.name}}</h3>
+ <h3>{{item}}</h3>
<div class="intro">
- {{item.text}}
+ {{item}}
</div>
</div>
<div class="empty" *ngFor="let empty of emptys"></div>
</div>
<div class="pages">
- <nz-pagination [(nzPageIndex)]="namecurrentPage" [nzTotal]="vnfsdataTotal" [nzSize]="'small'" [(nzPageSize)]="namepageSize" [nzPageSizeOptions]="[10,15,20,25,30]" nzShowSizeChanger nzShowQuickJumper></nz-pagination>
+ <nz-pagination [(nzPageIndex)]="currentPage" [nzTotal]="vnfsdataTotal" [nzSize]="'small'" [(nzPageSize)]="pageSize" [nzPageSizeOptions]="[10,15,20,25,30]" nzShowSizeChanger nzShowQuickJumper></nz-pagination>
</div>
</div>
<div [@showHideAnimate]="state2">
diff --git a/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.ts b/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.ts
index 3e08c2d4..934cfd16 100644
--- a/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.ts
+++ b/usecaseui-portal/src/app/performance/performance-vnf/performance-vnf.component.ts
@@ -26,24 +26,26 @@ import { MyhttpService } from '../../myhttp.service';
export class PerformanceVnfComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState;
public sourceNameList: Array<any> = ['---auto---'];
- public namecurrentPage: number = 1;
- public namepageSize: number = 10;
public sourceName: string = '';
public vnfsdataTotal: number;
+ public startTime: string = '';
+ public endTime: string = '';
+ public currentPage: number = 1;
+ public pageSize: number = 10;
+ list: any;
constructor(
private myhttp: MyhttpService) { }
ngOnInit() {
this.getqueryAllSourceNames();
- this.getperformanceSsourceNames()
+ this.getperformanceSsourceNames();
}
sourceNameSelected = this.sourceNameList[0];
getqueryAllSourceNames() {
this.myhttp.getqueryAllSourceNames().subscribe((data) => {
- // console.log(data)
for (let i = 0; i < data.length; i++) {
this.sourceNameList.push(data[i]);
}
@@ -51,7 +53,6 @@ export class PerformanceVnfComponent implements OnInit {
})
}
choseSourceName(item) {
- console.log(item);
this.sourceNameSelected = item;
if (item == "---auto---") {
this.sourceName = '';
@@ -59,23 +60,22 @@ export class PerformanceVnfComponent implements OnInit {
this.sourceName = item;
}
}
+ // vnfs data
+ totalRecords = [];
+ //Fill the box
+ emptys = [];
getperformanceSsourceNames() {
- this.myhttp.getperformanceSsourceNames(this.namecurrentPage, this.namepageSize, this.sourceName).subscribe((data) => {
- this.vnfsData = data.vnfdata;
- this.vnfsdataTotal = data.total;
- if (Number.isInteger(this.vnfsData.length / 5)) {
+ this.myhttp.getperformanceSourceNames(this.currentPage, this.pageSize, this.sourceName).subscribe((data) => {
+ this.totalRecords = data.totalRecords;
+ this.vnfsdataTotal = data.names;
+ if (Number.isInteger(this.totalRecords.length / 5)) {
this.emptys = new Array(0);
} else {
- this.emptys = new Array(5 - this.vnfsData.length % 5);
+ this.emptys = new Array(5 - this.totalRecords.length % 5);
}
- // console.log(this.emptys);
})
}
- // vnfs data
- vnfsData = [];
- emptys = []; //Fill the box
-
//Detail page title display
graphicshow = false;
detailshow = false;
@@ -91,32 +91,31 @@ export class PerformanceVnfComponent implements OnInit {
this.detailshow = false;
}
// Selected name
-
- graphicShow(item) {
+
+ graphicShow() {
this.state = 'hide';
this.state2 = 'show';
this.state3 = 'hide';
this.graphicshow = true;
this.detailshow = false;
}
- vnfname: number;
- graphicShow2(item){
+ vnfname: string;
+ graphicShow2(item) {
this.state = 'hide';
this.state2 = 'show';
this.state3 = 'hide';
this.graphicshow = true;
this.detailshow = false;
- this.vnfname = item.name;
+ this.vnfname = item;
}
// Selected id
- detailId: number;
+ detailId: string;
detailShow(item) {
this.state = 'hide';
this.state2 = 'hide';
this.state3 = 'show';
this.graphicshow = true;
this.detailshow = true;
- this.detailId = item.id;
+ this.detailId = item.id.id;
}
-
}