Serviceaccounts: feat - tabview for serviceaccounts (#43573)

This commit is contained in:
Eric Leijonmarck
2022-01-05 15:32:38 +01:00
committed by GitHub
parent 5c88acd5aa
commit 0aa905bb1f
16 changed files with 435 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ export * from './dashboard';
export * from './acl';
export * from './apiKeys';
export * from './user';
export * from './serviceaccount';
export * from './datasources';
export * from './plugins';
export * from './organization';

View File

@@ -0,0 +1,76 @@
import { OrgRole, Unit } from '.';
import { SelectableValue } from '@grafana/data';
export interface OrgServiceAccount {
avatarUrl: string;
email: string;
lastSeenAt: string;
lastSeenAtAge: string;
login: string;
name: string;
orgId: number;
role: OrgRole;
serviceAccountId: number;
}
export interface ServiceAccount {
id: number;
label: string;
avatarUrl: string;
login: string;
email: string;
name: string;
orgId?: number;
}
export interface ServiceAccountDTO {
id: number;
login: string;
email: string;
name: string;
isGrafanaAdmin: boolean;
isDisabled: boolean;
isAdmin?: boolean;
updatedAt?: string;
authLabels?: string[];
avatarUrl?: string;
orgId?: number;
lastSeenAtAge?: string;
licensedRole?: string;
permissions?: string[];
teams?: Unit[];
orgs?: Unit[];
}
export interface ServiceAccountsState {
serviceAccounts: OrgServiceAccount[];
searchQuery: string;
searchPage: number;
isLoading: boolean;
}
export interface ServiceAccountSession {
id: number;
createdAt: string;
clientIp: string;
isActive: boolean;
seenAt: string;
}
export interface ServiceAccountOrg {
name: string;
orgId: number;
role: OrgRole;
}
export type ServiceAccountFilter = Record<string, string | boolean | SelectableValue[]>;
export interface ServiceaccountListAdminState {
serviceaccounts: ServiceAccountDTO[];
query: string;
perPage: number;
page: number;
totalPages: number;
showPaging: boolean;
filters: ServiceAccountFilter[];
isLoading: boolean;
}