mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-24 23:40:22 +08:00
🐛 fix(sidebar): 隐藏达梦等数据源不支持的数据库管理入口
- 新增数据库级 DDL 能力判定,统一收敛新建库、重命名库、删库菜单显示 - 修正 Sidebar V1/V2 右键菜单,避免达梦和 Oracle-like 数据源暴露误导入口 - 补充能力与菜单回归测试,覆盖达梦、Oracle 和 OceanBase Oracle 协议 Refs #496
This commit is contained in:
@@ -76,4 +76,28 @@ describe('dataSourceCapabilities', () => {
|
||||
supportsApproximateTableCount: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('hides database-level DDL actions for Dameng and Oracle-like datasources', () => {
|
||||
expect(getDataSourceCapabilities({ type: 'dameng' })).toMatchObject({
|
||||
type: 'dameng',
|
||||
supportsCreateDatabase: false,
|
||||
supportsRenameDatabase: false,
|
||||
supportsDropDatabase: false,
|
||||
});
|
||||
expect(getDataSourceCapabilities({ type: 'oracle' })).toMatchObject({
|
||||
type: 'oracle',
|
||||
supportsCreateDatabase: false,
|
||||
supportsRenameDatabase: false,
|
||||
supportsDropDatabase: false,
|
||||
});
|
||||
expect(getDataSourceCapabilities({
|
||||
type: 'oceanbase',
|
||||
oceanBaseProtocol: 'oracle',
|
||||
})).toMatchObject({
|
||||
type: 'oracle',
|
||||
supportsCreateDatabase: false,
|
||||
supportsRenameDatabase: false,
|
||||
supportsDropDatabase: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user