Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB connectors appear in the UI if they are configured #15399

Merged
merged 3 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,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'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we set default values for this in the platform repo? :)

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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "1.0.0-assets.149",
"version": "1.0.0-assets.149-fix-1",
"description": "CARTO UI frontend",
"repository": {
"type": "git",
Expand Down