mirror of
https://github.com/apache/superset.git
synced 2026-05-26 02:05:19 +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:
@@ -14,6 +14,7 @@ const propTypes = {
|
||||
onClick: PropTypes.func,
|
||||
hovered: PropTypes.bool,
|
||||
tooltipOnClick: PropTypes.func,
|
||||
warning: PropTypes.string,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
@@ -75,6 +76,19 @@ export default class ControlHeader extends React.Component {
|
||||
{this.props.label}
|
||||
</span>
|
||||
{' '}
|
||||
{(this.props.warning) &&
|
||||
<span>
|
||||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip id={'error-tooltip'}>{this.props.warning}</Tooltip>
|
||||
}
|
||||
>
|
||||
<i className="fa fa-exclamation-circle text-danger" />
|
||||
</OverlayTrigger>
|
||||
{' '}
|
||||
</span>
|
||||
}
|
||||
{(this.props.validationErrors.length > 0) &&
|
||||
<span>
|
||||
<OverlayTrigger
|
||||
|
||||
Reference in New Issue
Block a user