web: more admin overview components

This commit is contained in:
Jens Langhammer
2020-12-01 22:17:07 +01:00
parent b218ded241
commit 1779b4d888
9 changed files with 313 additions and 323 deletions

16
web/src/api/events.ts Normal file
View File

@ -0,0 +1,16 @@
import { DefaultClient } from "./client";
export class AuditEvent {
//audit/events/top_per_user/?filter_action=authorize_application
static topForUser(action: string): Promise<TopNEvent[]> {
return DefaultClient.fetch<TopNEvent[]>(["audit", "events", "top_per_user"], {
"filter_action": action,
});
}
}
export interface TopNEvent {
application: { [key: string]: string};
counted_events: number;
unique_users: number;
}