mirror of
https://github.com/apache/superset.git
synced 2026-05-29 20:29:34 +00:00
Allowing config flag to turn off javascript controls (#4400)
* Allowing config flag to turn off javascript controls
* lint
* one line, avoiding mutation
* Setting JS fields as readOnly
(cherry picked from commit a373db24f0)
This commit is contained in:
@@ -97,6 +97,11 @@ function jsFunctionControl(label, description, extraDescr = null, height = 100,
|
||||
{extraDescr}
|
||||
</div>
|
||||
),
|
||||
mapStateToProps: state => ({
|
||||
warning: !state.common.conf.ENABLE_JAVASCRIPT_CONTROLS ?
|
||||
t('This functionality is disabled in your environment for security reasons.') : null,
|
||||
readOnly: !state.common.conf.ENABLE_JAVASCRIPT_CONTROLS,
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user