mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
refactor: [migration] convert iframe chart into dashboard markdown component (#10590)
* refactor: [migration] convert iframe chart into dashboard markdown component * remove 3 viz_types * fix comments
This commit is contained in:
@@ -33,8 +33,6 @@ import { CreatableSelect } from 'src/components/Select/SupersetStyledSelect';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
|
||||
import { EXPLORE_ONLY_VIZ_TYPE } from '../constants';
|
||||
|
||||
const propTypes = {
|
||||
can_overwrite: PropTypes.bool,
|
||||
onHide: PropTypes.func.isRequired,
|
||||
@@ -134,8 +132,6 @@ class SaveModal extends React.Component {
|
||||
this.setState({ alert: null });
|
||||
}
|
||||
render() {
|
||||
const canNotSaveToDash =
|
||||
EXPLORE_ONLY_VIZ_TYPE.indexOf(this.state.vizType) > -1;
|
||||
return (
|
||||
<Modal show onHide={this.props.onHide}>
|
||||
<Modal.Header closeButton>
|
||||
@@ -225,9 +221,7 @@ class SaveModal extends React.Component {
|
||||
id="btn_modal_save_goto_dash"
|
||||
bsSize="sm"
|
||||
disabled={
|
||||
canNotSaveToDash ||
|
||||
!this.state.newSliceName ||
|
||||
!this.state.newDashboardName
|
||||
!this.state.newSliceName || !this.state.newDashboardName
|
||||
}
|
||||
onClick={this.saveOrOverwrite.bind(this, true)}
|
||||
>
|
||||
|
||||
@@ -74,7 +74,6 @@ const DEFAULT_ORDER = [
|
||||
'line_multi',
|
||||
'treemap',
|
||||
'box_plot',
|
||||
'separator',
|
||||
'sunburst',
|
||||
'sankey',
|
||||
'word_cloud',
|
||||
@@ -85,7 +84,6 @@ const DEFAULT_ORDER = [
|
||||
'bubble',
|
||||
'deck_geojson',
|
||||
'horizon',
|
||||
'markup',
|
||||
'deck_multi',
|
||||
'compare',
|
||||
'partition',
|
||||
@@ -95,7 +93,6 @@ const DEFAULT_ORDER = [
|
||||
'world_map',
|
||||
'paired_ttest',
|
||||
'para',
|
||||
'iframe',
|
||||
'country_map',
|
||||
];
|
||||
|
||||
|
||||
@@ -71,8 +71,6 @@ export const sqlaAutoGeneratedMetricNameRegex = /^(sum|min|max|avg|count|count_d
|
||||
export const sqlaAutoGeneratedMetricRegex = /^(LONG|DOUBLE|FLOAT)?(SUM|AVG|MAX|MIN|COUNT)\([A-Z0-9_."]*\)$/i;
|
||||
export const druidAutoGeneratedMetricRegex = /^(LONG|DOUBLE|FLOAT)?(SUM|MAX|MIN|COUNT)\([A-Z0-9_."]*\)$/i;
|
||||
|
||||
export const EXPLORE_ONLY_VIZ_TYPE = ['separator', 'markup'];
|
||||
|
||||
export const TIME_FILTER_LABELS = {
|
||||
time_range: t('Time Range'),
|
||||
granularity_sqla: t('Time Column'),
|
||||
|
||||
Reference in New Issue
Block a user