tachybase_todo/packages/plugins/@tachybase/plugin-external-data-source/src/client/index.tsx
sealday ede7ead8b1 chore(version): release v0.21.34 (#1045)
Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1045
2024-05-24 01:06:06 +08:00

21 lines
760 B
TypeScript

import { Plugin } from '@tachybase/client';
import { PluginDataSourceManagerClient } from '@tachybase/plugin-data-source-manager/client';
import { MysqlDataSourceSettingsForm } from './forms/msql';
import { PgDataSourceSettingsForm } from './forms/pg';
import { tval } from './locale';
export class PluginExternalDataSourceClient extends Plugin {
async load() {
this.app.pm
.get(PluginDataSourceManagerClient)
.registerType('postgres', { DataSourceSettingsForm: PgDataSourceSettingsForm, label: tval('PostgreSQL') });
this.app.pm
.get(PluginDataSourceManagerClient)
.registerType('mysql', { DataSourceSettingsForm: MysqlDataSourceSettingsForm, label: tval('MySQL') });
}
}
export default PluginExternalDataSourceClient;