mirror of
https://github.com/apache/superset.git
synced 2024-09-06 05:47:43 -04:00
update dashboard edit modal (#11258)
This commit is contained in:
parent
2c649ac20f
commit
cd7392e618
@ -23,7 +23,7 @@ import Button from 'src/components/Button';
|
||||
import Dialog from 'react-bootstrap-dialog';
|
||||
import { AsyncSelect } from 'src/components/Select';
|
||||
import rison from 'rison';
|
||||
import { t, SupersetClient } from '@superset-ui/core';
|
||||
import { styled, t, SupersetClient } from '@superset-ui/core';
|
||||
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import { JsonEditor } from 'src/components/AsyncAceEditor';
|
||||
@ -33,6 +33,11 @@ import getClientErrorObject from '../../utils/getClientErrorObject';
|
||||
import withToasts from '../../messageToasts/enhancers/withToasts';
|
||||
import '../stylesheets/buttons.less';
|
||||
|
||||
const StyledJsonEditor = styled(JsonEditor)`
|
||||
border-radius: ${({ theme }) => theme.borderRadius}px;
|
||||
border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
|
||||
`;
|
||||
|
||||
const propTypes = {
|
||||
dashboardId: PropTypes.number.isRequired,
|
||||
show: PropTypes.bool,
|
||||
@ -306,7 +311,7 @@ class PropertiesModal extends React.PureComponent {
|
||||
<FormLabel htmlFor="json_metadata">
|
||||
{t('JSON Metadata')}
|
||||
</FormLabel>
|
||||
<JsonEditor
|
||||
<StyledJsonEditor
|
||||
showLoadingForImport
|
||||
name="json_metadata"
|
||||
defaultValue={this.defaultMetadataValue}
|
||||
@ -328,6 +333,9 @@ class PropertiesModal extends React.PureComponent {
|
||||
</Modal.Body>
|
||||
<Modal.Footer>
|
||||
<span className="float-right">
|
||||
<Button type="button" buttonSize="sm" onClick={onHide} cta>
|
||||
{t('Cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
buttonSize="sm"
|
||||
@ -338,9 +346,6 @@ class PropertiesModal extends React.PureComponent {
|
||||
>
|
||||
{saveLabel}
|
||||
</Button>
|
||||
<Button type="button" buttonSize="sm" onClick={onHide} cta>
|
||||
{t('Cancel')}
|
||||
</Button>
|
||||
<Dialog
|
||||
ref={ref => {
|
||||
this.dialog = ref;
|
||||
|
Loading…
Reference in New Issue
Block a user