Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[webapp] bugfix monitors pageable not work #2602

Merged
merged 6 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 0 additions & 32 deletions web-app/src/app/service/monitor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,38 +114,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,
Expand Down
Loading