This is an automated email from the ASF dual-hosted git repository. gongchao pushed a commit to branch bugfix-page in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit 7eb86ae5b4d00bf072ae6cf2c7522f0aa7216404 Author: tomsun28 <[email protected]> AuthorDate: Sun Aug 25 15:22:19 2024 +0800 [webapp] bugfix monitors pageable not work Signed-off-by: tomsun28 <[email protected]> --- .../monitor/monitor-list/monitor-list.component.ts | 2 +- web-app/src/app/service/monitor.service.ts | 32 ---------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts index 6169fe880..a686d786e 100644 --- a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts +++ b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.ts @@ -506,7 +506,7 @@ export class MonitorListComponent implements OnInit, OnDestroy { const currentSort = sort.find(item => item.value !== null); const sortField = (currentSort && currentSort.key) || null; const sortOrder = (currentSort && currentSort.value) || null; - // this.changeMonitorTable(sortField, sortOrder); + this.changeMonitorTable(sortField, sortOrder); } // begin: app type search filter diff --git a/web-app/src/app/service/monitor.service.ts b/web-app/src/app/service/monitor.service.ts index 6b698be61..e337c58c6 100644 --- a/web-app/src/app/service/monitor.service.ts +++ b/web-app/src/app/service/monitor.service.ts @@ -110,38 +110,6 @@ export class MonitorService { return this.http.get<Message<Monitor[]>>(`${monitors_uri}/${app}`); } - public getMonitors( - app: string | undefined, - tag: string | undefined, - pageIndex: number, - pageSize: number, - sortField?: string | null, - sortOrder?: string | null - ): Observable<Message<Page<Monitor>>> { - pageIndex = pageIndex ? pageIndex : 0; - pageSize = pageSize ? pageSize : 8; - // HttpParams is unmodifiable, so we need to save the return value of append/set - let httpParams = new HttpParams(); - httpParams = httpParams.appendAll({ - pageIndex: pageIndex, - pageSize: pageSize - }); - if (app != undefined) { - httpParams = httpParams.append('app', app.trim()); - } - if (tag != undefined) { - httpParams = httpParams.append('tag', tag); - } - if (sortField != null && sortOrder != null) { - httpParams = httpParams.appendAll({ - sort: sortField, - order: sortOrder == 'ascend' ? 'asc' : 'desc' - }); - } - const options = { params: httpParams }; - return this.http.get<Message<Page<Monitor>>>(monitors_uri, options); - } - public searchMonitors( app: string | undefined, tag: string | undefined, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
