mirror of
https://github.com/apache/superset.git
synced 2026-04-25 19:14:27 +00:00
chore: upgrade eslint, babel, and prettier (#12393)
This commit is contained in:
@@ -91,84 +91,82 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
filterAutocompleteOption,
|
||||
userDatasetOptions,
|
||||
onChangeAutoComplete,
|
||||
}) => {
|
||||
return (
|
||||
<StyledModal
|
||||
show={visible}
|
||||
title="Save or Overwrite Dataset"
|
||||
onHide={onHide}
|
||||
footer={
|
||||
<>
|
||||
{!shouldOverwriteDataset && (
|
||||
<Button
|
||||
disabled={disableSaveAndExploreBtn}
|
||||
buttonSize="medium"
|
||||
buttonStyle="primary"
|
||||
onClick={onOk}
|
||||
>
|
||||
{t('Save & Explore')}
|
||||
</Button>
|
||||
)}
|
||||
{shouldOverwriteDataset && (
|
||||
<>
|
||||
<Button buttonSize="medium" onClick={handleOverwriteCancel}>
|
||||
Back
|
||||
</Button>
|
||||
<Button
|
||||
className="md"
|
||||
buttonSize="medium"
|
||||
buttonStyle="primary"
|
||||
onClick={handleOverwriteDataset}
|
||||
disabled={disableSaveAndExploreBtn}
|
||||
>
|
||||
{t('Overwrite & Explore')}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
>
|
||||
<Styles>
|
||||
}) => (
|
||||
<StyledModal
|
||||
show={visible}
|
||||
title="Save or Overwrite Dataset"
|
||||
onHide={onHide}
|
||||
footer={
|
||||
<>
|
||||
{!shouldOverwriteDataset && (
|
||||
<div className="smd-body">
|
||||
<div className="smd-prompt">
|
||||
Save this query as virtual dataset to continue exploring.
|
||||
</div>
|
||||
<Radio.Group
|
||||
onChange={handleSaveDatasetRadioBtnState}
|
||||
value={saveDatasetRadioBtnState}
|
||||
>
|
||||
<Radio className="smd-radio" value={1}>
|
||||
Save as new
|
||||
<Input
|
||||
className="smd-input"
|
||||
defaultValue={defaultCreateDatasetValue}
|
||||
onChange={handleDatasetNameChange}
|
||||
disabled={saveDatasetRadioBtnState !== 1}
|
||||
/>
|
||||
</Radio>
|
||||
<Radio className="smd-radio" value={2}>
|
||||
Overwrite existing
|
||||
<AutoComplete
|
||||
className="smd-autocomplete"
|
||||
options={userDatasetOptions}
|
||||
onSelect={handleOverwriteDatasetOption}
|
||||
onSearch={handleSaveDatasetModalSearch}
|
||||
onChange={onChangeAutoComplete}
|
||||
placeholder="Select or type dataset name"
|
||||
filterOption={filterAutocompleteOption}
|
||||
disabled={saveDatasetRadioBtnState !== 2}
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
<Button
|
||||
disabled={disableSaveAndExploreBtn}
|
||||
buttonSize="medium"
|
||||
buttonStyle="primary"
|
||||
onClick={onOk}
|
||||
>
|
||||
{t('Save & Explore')}
|
||||
</Button>
|
||||
)}
|
||||
{shouldOverwriteDataset && (
|
||||
<div className="smd-overwrite-msg">
|
||||
Are you sure you want to overwrite this dataset?
|
||||
</div>
|
||||
<>
|
||||
<Button buttonSize="medium" onClick={handleOverwriteCancel}>
|
||||
Back
|
||||
</Button>
|
||||
<Button
|
||||
className="md"
|
||||
buttonSize="medium"
|
||||
buttonStyle="primary"
|
||||
onClick={handleOverwriteDataset}
|
||||
disabled={disableSaveAndExploreBtn}
|
||||
>
|
||||
{t('Overwrite & Explore')}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</Styles>
|
||||
</StyledModal>
|
||||
);
|
||||
};
|
||||
</>
|
||||
}
|
||||
>
|
||||
<Styles>
|
||||
{!shouldOverwriteDataset && (
|
||||
<div className="smd-body">
|
||||
<div className="smd-prompt">
|
||||
Save this query as virtual dataset to continue exploring.
|
||||
</div>
|
||||
<Radio.Group
|
||||
onChange={handleSaveDatasetRadioBtnState}
|
||||
value={saveDatasetRadioBtnState}
|
||||
>
|
||||
<Radio className="smd-radio" value={1}>
|
||||
Save as new
|
||||
<Input
|
||||
className="smd-input"
|
||||
defaultValue={defaultCreateDatasetValue}
|
||||
onChange={handleDatasetNameChange}
|
||||
disabled={saveDatasetRadioBtnState !== 1}
|
||||
/>
|
||||
</Radio>
|
||||
<Radio className="smd-radio" value={2}>
|
||||
Overwrite existing
|
||||
<AutoComplete
|
||||
className="smd-autocomplete"
|
||||
options={userDatasetOptions}
|
||||
onSelect={handleOverwriteDatasetOption}
|
||||
onSearch={handleSaveDatasetModalSearch}
|
||||
onChange={onChangeAutoComplete}
|
||||
placeholder="Select or type dataset name"
|
||||
filterOption={filterAutocompleteOption}
|
||||
disabled={saveDatasetRadioBtnState !== 2}
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
)}
|
||||
{shouldOverwriteDataset && (
|
||||
<div className="smd-overwrite-msg">
|
||||
Are you sure you want to overwrite this dataset?
|
||||
</div>
|
||||
)}
|
||||
</Styles>
|
||||
</StyledModal>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user