apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.06k stars 13.61k forks source link

superset_text.yml not loading the PREFERRED_DATABASES icons #28325

Open geanttechnology opened 5 months ago

geanttechnology commented 5 months ago

Bug description

I have created a file named superset_text.yml and appended the following DB drivers and respective icons:

DB_IMAGES:
  postgresql: "/static/assets/images/postgresql.png"
  oracle: "/static/assets/images/oracle.png"
  mysql: "/static/assets/images/mariadb.png"
  vertica: "/static/assets/images/vertica.png"
  redshift: "/static/assets/images/redshift.png"
  databricks: "/static/assets/images/databricks.png"
  clickhouse: "/static/assets/images/clickhouse.png"
  google-biquery: "/static/assets/images/google-biquery.png"

But it is not being picked up by the Databases listed in PREFERRED_DATABASES in the config file

How to reproduce the bug

Add the following in the config file:

PREFERRED_DATABASES: list[str] = [
    "PostgreSQL",
    "Oracle",
    "MySQL",
    "Vertica",
    "AWS Redshift",
    "Databricks",
    "ClickHouse",
    "Google BigQuery",
    # etc.
]

Then create a file named superset_text.yml and append the following code snippet:

DB_IMAGES:
  postgresql: "/static/assets/images/postgresql.png"
  oracle: "/static/assets/images/oracle.png"
  mysql: "/static/assets/images/mariadb.png"
  vertica: "/static/assets/images/vertica.png"
  redshift: "/static/assets/images/redshift.png"
  databricks: "/static/assets/images/databricks.png"
  clickhouse: "/static/assets/images/clickhouse.png"
  google-biquery: "/static/assets/images/google-biquery.png"

Then go to the Superset UI and try to add and new database source. The preferred databases should be listed but they do not have the right icons.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

hainenber commented 5 months ago

This feature seems to be not implemented yet and is only in placeholder mode

https://github.com/apache/superset/blob/f5843fe588112c5c303215945a36fda0845c9e99/superset-frontend/src/utils/textUtils.ts#L21

It'd be an interesting feature to implement but I don't know the context behind its incompleteness. Wonder if any PMC could shed some lights ...