feat(core): add admin panel page (#7115)

The path is `/admin-panel`
This commit is contained in:
JimmFly
2024-05-31 09:42:22 +00:00
parent 004390f40c
commit b13151b480
15 changed files with 821 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
query getServerRuntimeConfig {
serverRuntimeConfig {
id
module
key
description
value
type
updatedAt
}
}

View File

@@ -385,6 +385,25 @@ query oauthProviders {
}`,
};
export const getServerRuntimeConfigQuery = {
id: 'getServerRuntimeConfigQuery' as const,
operationName: 'getServerRuntimeConfig',
definitionName: 'serverRuntimeConfig',
containsFile: false,
query: `
query getServerRuntimeConfig {
serverRuntimeConfig {
id
module
key
description
value
type
updatedAt
}
}`,
};
export const getUserFeaturesQuery = {
id: 'getUserFeaturesQuery' as const,
operationName: 'getUserFeatures',
@@ -818,6 +837,20 @@ query subscription {
}`,
};
export const updateServerRuntimeConfigsMutation = {
id: 'updateServerRuntimeConfigsMutation' as const,
operationName: 'updateServerRuntimeConfigs',
definitionName: 'updateRuntimeConfigs',
containsFile: false,
query: `
mutation updateServerRuntimeConfigs($updates: JSONObject!) {
updateRuntimeConfigs(updates: $updates) {
key
value
}
}`,
};
export const updateSubscriptionMutation = {
id: 'updateSubscriptionMutation' as const,
operationName: 'updateSubscription',

View File

@@ -0,0 +1,6 @@
mutation updateServerRuntimeConfigs($updates: JSONObject!) {
updateRuntimeConfigs(updates: $updates) {
key
value
}
}

View File

@@ -533,6 +533,24 @@ export type OauthProvidersQuery = {
};
};
export type GetServerRuntimeConfigQueryVariables = Exact<{
[key: string]: never;
}>;
export type GetServerRuntimeConfigQuery = {
__typename?: 'Query';
serverRuntimeConfig: Array<{
__typename?: 'ServerRuntimeConfigType';
id: string;
module: string;
key: string;
description: string;
value: Record<string, string>;
type: RuntimeConfigType;
updatedAt: string;
}>;
};
export type GetUserFeaturesQueryVariables = Exact<{ [key: string]: never }>;
export type GetUserFeaturesQuery = {
@@ -916,6 +934,19 @@ export type SubscriptionQuery = {
} | null;
};
export type UpdateServerRuntimeConfigsMutationVariables = Exact<{
updates: Scalars['JSONObject']['input'];
}>;
export type UpdateServerRuntimeConfigsMutation = {
__typename?: 'Mutation';
updateRuntimeConfigs: Array<{
__typename?: 'ServerRuntimeConfigType';
key: string;
value: Record<string, string>;
}>;
};
export type UpdateSubscriptionMutationVariables = Exact<{
idempotencyKey: Scalars['String']['input'];
plan?: InputMaybe<SubscriptionPlan>;
@@ -1139,6 +1170,11 @@ export type Queries =
variables: OauthProvidersQueryVariables;
response: OauthProvidersQuery;
}
| {
name: 'getServerRuntimeConfigQuery';
variables: GetServerRuntimeConfigQueryVariables;
response: GetServerRuntimeConfigQuery;
}
| {
name: 'getUserFeaturesQuery';
variables: GetUserFeaturesQueryVariables;
@@ -1371,6 +1407,11 @@ export type Mutations =
variables: SetWorkspacePublicByIdMutationVariables;
response: SetWorkspacePublicByIdMutation;
}
| {
name: 'updateServerRuntimeConfigsMutation';
variables: UpdateServerRuntimeConfigsMutationVariables;
response: UpdateServerRuntimeConfigsMutation;
}
| {
name: 'updateSubscriptionMutation';
variables: UpdateSubscriptionMutationVariables;