diff --git a/src/modules/app.provider.ts b/src/modules/app.provider.ts index 4ed6284..18b2a4a 100644 --- a/src/modules/app.provider.ts +++ b/src/modules/app.provider.ts @@ -135,6 +135,16 @@ BI.provider('dec.connection.provider.datebase', function () { return false; } + function filterPluginDataTypeByPriority() { + const originTypes = [...BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES)]; + const sortDataTypes = BI.sortBy(originTypes, (index, value: any) => { + return value.priority || 0; + }) + return BI.uniqWith(sortDataTypes, (current, other) => { + return current.text == other.text; + }); + } + this.registerDatabaseType = (config: any) => { if (coverBaseDatabase(config)) return; @@ -162,6 +172,6 @@ BI.provider('dec.connection.provider.datebase', function () { } return this.resolves[type] || jdbcResolve }, - customDatabaseType: BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES), + customDatabaseType: filterPluginDataTypeByPriority(), }); });