redshift driver should be only for premium

This commit is contained in:
SPRINX0\prochazka 2024-11-01 10:17:13 +01:00
parent a74b789a8c
commit 8f57d3a316
2 changed files with 10 additions and 4 deletions

View File

@ -42,13 +42,17 @@
return res;
}
function filterByEdition(arr) {
return arr.filter(x => !x.premiumOnly || isProApp());
}
export function buildExtensions(plugins) {
const extensions = {
plugins,
fileFormats: buildFileFormats(plugins),
themes: buildThemes(plugins),
drivers: buildDrivers(plugins),
quickExports: buildQuickExports(plugins),
fileFormats: filterByEdition(buildFileFormats(plugins)),
themes: filterByEdition(buildThemes(plugins)),
drivers: filterByEdition(buildDrivers(plugins)),
quickExports: filterByEdition(buildQuickExports(plugins)),
};
return extensions;
}
@ -63,6 +67,7 @@
import * as dbgateTools from 'dbgate-tools';
import * as sqlTree from 'dbgate-sqltree';
import { apiCall } from '../utility/api';
import { isProApp } from '../utility/proTools';
let pluginsDict = {};
const installedPlugins = useInstalledPlugins();

View File

@ -264,6 +264,7 @@ const redshiftDriver = {
engine: 'redshift@dbgate-plugin-postgres',
title: 'Amazon Redshift',
defaultPort: 5439,
premiumOnly: true,
databaseUrlPlaceholder: 'e.g. redshift-cluster-1.xxxx.redshift.amazonaws.com:5439/dev',
showConnectionField: (field, values) =>
['databaseUrl', 'user', 'password', 'isReadOnly', 'useSeparateSchemas'].includes(field),