superset icon indicating copy to clipboard operation
superset copied to clipboard

superset_text.yml not loading the PREFERRED_DATABASES icons

Open geanttechnology opened this issue 10 months ago • 1 comments

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

- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

geanttechnology avatar May 02 '24 21:05 geanttechnology

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 ...

hainenber avatar May 05 '24 16:05 hainenber