web: make table pagination size user-configurable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -8,7 +8,7 @@ import { Event, EventsApi } from "@goauthentik/api";
|
||||
import { AKResponse } from "../../api/Client";
|
||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { EventWithContext } from "../../api/Events";
|
||||
import { PAGE_SIZE } from "../../constants";
|
||||
import { uiConfig } from "../../common/config";
|
||||
import "../../pages/events/EventInfo";
|
||||
import "../Tabs";
|
||||
import "../buttons/Dropdown";
|
||||
@ -32,12 +32,12 @@ export class ObjectChangelog extends Table<Event> {
|
||||
@property()
|
||||
targetModelName!: string;
|
||||
|
||||
apiEndpoint(page: number): Promise<AKResponse<Event>> {
|
||||
async apiEndpoint(page: number): Promise<AKResponse<Event>> {
|
||||
return new EventsApi(DEFAULT_CONFIG).eventsEventsList({
|
||||
action: "model_",
|
||||
page: page,
|
||||
ordering: this.order,
|
||||
pageSize: PAGE_SIZE,
|
||||
pageSize: (await uiConfig()).pagination.perPage,
|
||||
contextModelApp: this.targetModelApp,
|
||||
contextModelName: this.targetModelName,
|
||||
contextModelPk: this.targetModelPk.toString(),
|
||||
|
||||
Reference in New Issue
Block a user