Skip to content

Commit

Permalink
Merge pull request #15399 from CartoDB/connectors-ui-config
Browse files Browse the repository at this point in the history
DB connectors appear in the UI if they are configured
  • Loading branch information
Alejandra Arri committed Jan 17, 2020
2 parents 1f9cae1 + 7a81dd0 commit 0ad4846
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sudo make install
- Add required tips parameter to fix street geocoding in advanced mode ([CartoDB/support#2265](https://github.com/CartoDB/support/issues/2265))
- Use plpython3u for PG12+ ([#15228](https://github.com/CartoDB/cartodb/pull/15228))
- Unique name for Kuvizs [#15385](https://github.com/CartoDB/cartodb/pull/15385)
- Check if the connector is configured to add it to the Connectors UI [#15399](https://github.com/CartoDB/cartodb/pull/15399)


4.32.0 (2019-12-27)
Expand Down
4 changes: 4 additions & 0 deletions app/helpers/frontend_config_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def frontend_config_hash(user = current_user)
oauth_mechanism_bigquery: Cartodb.get_config(:oauth, 'bigquery', 'oauth_mechanism'),
arcgis_enabled: Cartodb.get_config(:datasources, 'arcgis_enabled'),
salesforce_enabled: Cartodb.get_config(:datasources, 'salesforce_enabled'),
mysql_enabled: Cartodb.get_config(:connectors, 'mysql', 'enabled'),
postgres_enabled: Cartodb.get_config(:connectors, 'postgres', 'enabled'),
sqlserver_enabled: Cartodb.get_config(:connectors, 'sqlserver', 'enabled'),
hive_enabled: Cartodb.get_config(:connectors, 'hive', 'enabled'),
datasource_search_twitter: nil,
max_asset_file_size: Cartodb.config[:assets]["max_file_size"],
watcher_ttl: Cartodb.config[:watcher].try("fetch", 'ttl', 60),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,31 +205,31 @@ module.exports = {
},
PostgreSQL: {
view: ImportDataView,
enabled: function (config, userModel) { return true; },
enabled: function (config, userModel) { return config.get('postgres_enabled'); },
fallback: require('./fallbacks/import-notenabled-fallback.tpl'),
name: 'postgresql',
title: 'PostgreSQL',
type: 'database'
},
MySQL: {
view: ImportDataView,
enabled: function (config, userModel) { return true; },
enabled: function (config, userModel) { return config.get('mysql_enabled'); },
fallback: require('./fallbacks/import-notenabled-fallback.tpl'),
name: 'mysql',
title: 'MySQL',
type: 'database'
},
SQLServer: {
view: ImportDataView,
enabled: function (config, userModel) { return true; },
enabled: function (config, userModel) { return config.get('sqlserver_enabled'); },
fallback: require('./fallbacks/import-notenabled-fallback.tpl'),
name: 'sqlserver',
title: 'SQL Server',
type: 'database'
},
Hive: {
view: ImportDataView,
enabled: function (config, userModel) { return true; },
enabled: function (config, userModel) { return config.get('hive_enabled'); },
fallback: require('./fallbacks/import-notenabled-fallback.tpl'),
name: 'hive',
title: 'Hive',
Expand Down

0 comments on commit 0ad4846

Please sign in to comment.