mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Searchable service accounts (#45844)
* WIP * draft of WIP * feat: search and filtering works 🌈 * Update pkg/models/org_user.go * Apply suggestions from code review * refactor: remove unsed function * refactor: formatting * Apply suggestions from code review Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com> * WIP * comment * Update public/app/features/serviceaccounts/ServiceAccountsListPage.tsx Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> * review comments * wip * working search and initial load of service accounts * number of tokens working * removed api call * Apply suggestions from code review * added accescontrol param * accesscontrol prefix corrected Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com> Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { WithAccessControlMetadata } from '@grafana/data';
|
||||
import { SelectableValue, WithAccessControlMetadata } from '@grafana/data';
|
||||
import { ApiKey, OrgRole, Role } from '.';
|
||||
|
||||
export interface OrgServiceAccount extends WithAccessControlMetadata {
|
||||
@@ -43,12 +43,19 @@ export interface ServiceAccountProfileState {
|
||||
tokens: ApiKey[];
|
||||
}
|
||||
|
||||
export type ServiceAccountFilter = Record<string, string | boolean | SelectableValue[]>;
|
||||
export interface ServiceAccountsState {
|
||||
serviceAccounts: ServiceAccountDTO[];
|
||||
searchQuery: string;
|
||||
searchPage: number;
|
||||
isLoading: boolean;
|
||||
roleOptions: Role[];
|
||||
serviceAccountToRemove: ServiceAccountDTO | null;
|
||||
builtInRoles: Record<string, Role[]>;
|
||||
|
||||
// search / filtering
|
||||
query: string;
|
||||
perPage: number;
|
||||
page: number;
|
||||
totalPages: number;
|
||||
showPaging: boolean;
|
||||
filters: ServiceAccountFilter[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user