feat: 安装向导页支持滚动并新增 MySQL/Redis 连接测试
Install 页作为独立满屏路由自身承载纵向滚动,修复内容超出视口无法滚动; MySQL/Redis 卡片新增测试连接按钮,后端新增 /api/install/test-connection(仅安装模式可用, 不建库不落盘;MySQL 库不存在也视为可连接因安装时会自动建库)。
This commit is contained in:
@@ -119,6 +119,38 @@ export class InstallStorageDto {
|
||||
ossAccessKeySecret?: string;
|
||||
}
|
||||
|
||||
export class TestConnectionDto {
|
||||
@ApiProperty({ enum: ['mysql', 'redis'] })
|
||||
@IsIn(['mysql', 'redis'])
|
||||
target!: 'mysql' | 'redis';
|
||||
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
host!: string;
|
||||
|
||||
@ApiProperty()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
port!: number;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
database?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
username?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
password?: string;
|
||||
}
|
||||
|
||||
export class InstallRequestDto {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
|
||||
Reference in New Issue
Block a user