ktmud commented on a change in pull request #17202:
URL: https://github.com/apache/superset/pull/17202#discussion_r743961441



##########
File path: 
superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx
##########
@@ -370,7 +381,23 @@ export default class AdhocMetricEditPopover extends 
React.PureComponent {
               />
             </FormItem>
           </Tabs.TabPane>
-          <Tabs.TabPane key={EXPRESSION_TYPES.SIMPLE} tab={t('Simple')}>
+          <Tabs.TabPane
+            key={EXPRESSION_TYPES.SIMPLE}
+            tab={
+              extra.disallow_adhoc_metrics ? (
+                <Tooltip
+                  title={t(
+                    'Simple ad-hoc metrics are not enabled for this dataset',

Review comment:
       How about use the same message for both "SIMPLE" and "CUSTOM SQL":
   
   ```
   Ad-hoc metrics are not supported by this dataset, use saved metrics instead.
   ```
   
   Having different messages kind of implies one can disallow SIMPLE and CUSTOM 
SQL separately.




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