diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts index 2bb994871..154712d4d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/plugin.ts @@ -156,20 +156,24 @@ export class PluginDataSourceManagerServer extends Plugin { const plugin = this; const mapDataSourceWithCollection = (dataSourceModel, appendCollections = true) => { + const dataSource = app.dataSourceManager.dataSources.get(dataSourceModel.get('key')); const dataSourceStatus = plugin.dataSourceStatus[dataSourceModel.get('key')]; + // @ts-ignore + const isDBInstance = !!dataSource.collectionManager.db; + const item: any = { key: dataSourceModel.get('key'), displayName: dataSourceModel.get('displayName'), status: dataSourceStatus, + type: dataSourceModel.get('type'), + isDBInstance, }; if (dataSourceStatus === 'loading-failed' || dataSourceStatus === 'reloading-failed') { item['errorMessage'] = plugin.dataSourceErrors[dataSourceModel.get('key')].message; } - const dataSource = app.dataSourceManager.dataSources.get(dataSourceModel.get('key')); - if (!dataSource) { return item; }