hughhhh commented on code in PR #20317:
URL: https://github.com/apache/superset/pull/20317#discussion_r892897302


##########
superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx:
##########
@@ -244,9 +244,23 @@ class DatasourceControl extends React.PureComponent {
     return (
       <Styles data-test="datasource-control" className="DatasourceControl">
         <div className="data-container">
-          <Icons.DatasetPhysical className="dataset-svg" />
-          {/* Add a tooltip only for long dataset names */}
-          {!isMissingDatasource && datasource.name.length > 25 ? (
+          {isValidDatasourceType ? (
+            <Icons.ConsoleSqlOutlined className="datasource-svg" />
+          ) : (
+            <Icons.DatasetPhysical className="datasource-svg" />
+          )}
+          {isValidDatasourceType ? (

Review Comment:
   we need to check if the datasource.type is a `DatasourceType.Query` here, if 
so then show the image in sql as the name



##########
superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx:
##########
@@ -244,9 +244,23 @@ class DatasourceControl extends React.PureComponent {
     return (
       <Styles data-test="datasource-control" className="DatasourceControl">
         <div className="data-container">
-          <Icons.DatasetPhysical className="dataset-svg" />
-          {/* Add a tooltip only for long dataset names */}
-          {!isMissingDatasource && datasource.name.length > 25 ? (
+          {isValidDatasourceType ? (
+            <Icons.ConsoleSqlOutlined className="datasource-svg" />
+          ) : (
+            <Icons.DatasetPhysical className="datasource-svg" />
+          )}
+          {isValidDatasourceType ? (

Review Comment:
   we need to check if the datasource.type is `DatasourceType.Query` here, if 
so then show the image in sql as the name



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to