-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(admin): organize admin panel (#7840)
- Loading branch information
Showing
45 changed files
with
740 additions
and
949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ServerFeature } from './types'; | ||
|
||
export const ENABLED_FEATURES: Set<ServerFeature> = new Set(); | ||
export function ADD_ENABLED_FEATURES(feature: ServerFeature) { | ||
ENABLED_FEATURES.add(feature); | ||
} | ||
export { ServerFeature }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,47 @@ | ||
import { Field, ObjectType, registerEnumType } from '@nestjs/graphql'; | ||
|
||
import { DeploymentType } from '../../fundamentals'; | ||
|
||
export enum ServerFeature { | ||
Copilot = 'copilot', | ||
Payment = 'payment', | ||
OAuth = 'oauth', | ||
} | ||
|
||
registerEnumType(ServerFeature, { | ||
name: 'ServerFeature', | ||
}); | ||
|
||
registerEnumType(DeploymentType, { | ||
name: 'ServerDeploymentType', | ||
}); | ||
|
||
@ObjectType() | ||
export class ServerConfigType { | ||
@Field({ | ||
description: | ||
'server identical name could be shown as badge on user interface', | ||
}) | ||
name!: string; | ||
|
||
@Field({ description: 'server version' }) | ||
version!: string; | ||
|
||
@Field({ description: 'server base url' }) | ||
baseUrl!: string; | ||
|
||
@Field(() => DeploymentType, { description: 'server type' }) | ||
type!: DeploymentType; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
@Field({ description: 'server flavor', deprecationReason: 'use `features`' }) | ||
flavor!: string; | ||
|
||
@Field(() => [ServerFeature], { description: 'enabled server features' }) | ||
features!: ServerFeature[]; | ||
|
||
@Field({ description: 'enable telemetry' }) | ||
enableTelemetry!: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.