mirror of
https://github.com/apache/superset.git
synced 2026-08-12 11:11:01 +00:00
chore: Moves messageToasts to the components folder (#14431)
* chore: Moves messageToasts to the components folder * Rebases
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import datasources from 'spec/fixtures/mockDatasource';
|
import datasources from 'spec/fixtures/mockDatasource';
|
||||||
import messageToasts from 'spec/javascripts/messageToasts/mockMessageToasts';
|
import messageToasts from 'src/components/MessageToasts/mockMessageToasts';
|
||||||
import {
|
import {
|
||||||
nativeFiltersInfo,
|
nativeFiltersInfo,
|
||||||
mockDataMaskInfo,
|
mockDataMaskInfo,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import datasources from 'spec/fixtures/mockDatasource';
|
import datasources from 'spec/fixtures/mockDatasource';
|
||||||
import messageToasts from 'spec/javascripts/messageToasts/mockMessageToasts';
|
import messageToasts from 'src/components/MessageToasts/mockMessageToasts';
|
||||||
import {
|
import {
|
||||||
nativeFiltersInfo,
|
nativeFiltersInfo,
|
||||||
mockDataMaskInfo,
|
mockDataMaskInfo,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import nativeFilters from 'src/dashboard/reducers/nativeFilters';
|
|||||||
import datasources from 'src/dashboard/reducers/datasources';
|
import datasources from 'src/dashboard/reducers/datasources';
|
||||||
import sliceEntities from 'src/dashboard/reducers/sliceEntities';
|
import sliceEntities from 'src/dashboard/reducers/sliceEntities';
|
||||||
import dashboardLayout from 'src/dashboard/reducers/undoableDashboardLayout';
|
import dashboardLayout from 'src/dashboard/reducers/undoableDashboardLayout';
|
||||||
import messageToasts from 'src/messageToasts/reducers';
|
import messageToasts from 'src/components/MessageToasts/reducers';
|
||||||
import saveModal from 'src/explore/reducers/saveModalReducer';
|
import saveModal from 'src/explore/reducers/saveModalReducer';
|
||||||
import explore from 'src/explore/reducers/exploreReducer';
|
import explore from 'src/explore/reducers/exploreReducer';
|
||||||
import sqlLab from 'src/SqlLab/reducers/sqlLab';
|
import sqlLab from 'src/SqlLab/reducers/sqlLab';
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import {
|
|||||||
|
|
||||||
import { setUnsavedChanges } from 'src/dashboard/actions/dashboardState';
|
import { setUnsavedChanges } from 'src/dashboard/actions/dashboardState';
|
||||||
import * as dashboardFilters from 'src/dashboard/actions/dashboardFilters';
|
import * as dashboardFilters from 'src/dashboard/actions/dashboardFilters';
|
||||||
import { ADD_TOAST } from 'src/messageToasts/actions';
|
import { ADD_TOAST } from 'src/components/MessageToasts/actions';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DASHBOARD_GRID_TYPE,
|
DASHBOARD_GRID_TYPE,
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "prettier",
|
|
||||||
"plugins": ["prettier"],
|
|
||||||
"rules": {
|
|
||||||
"prefer-template": 2,
|
|
||||||
"new-cap": 2,
|
|
||||||
"no-restricted-syntax": 2,
|
|
||||||
"guard-for-in": 2,
|
|
||||||
"prefer-arrow-callback": 2,
|
|
||||||
"func-names": 2,
|
|
||||||
"react/jsx-no-bind": 2,
|
|
||||||
"no-confusing-arrow": 2,
|
|
||||||
"jsx-a11y/no-static-element-interactions": 2,
|
|
||||||
"jsx-a11y/anchor-has-content": 2,
|
|
||||||
"react/require-default-props": 2,
|
|
||||||
"no-plusplus": 2,
|
|
||||||
"no-mixed-operators": 0,
|
|
||||||
"no-continue": 2,
|
|
||||||
"no-bitwise": 2,
|
|
||||||
"no-multi-assign": 2,
|
|
||||||
"no-restricted-properties": 2,
|
|
||||||
"no-prototype-builtins": 2,
|
|
||||||
"class-methods-use-this": 2,
|
|
||||||
"import/no-named-as-default": 2,
|
|
||||||
"react/no-unescaped-entities": 2,
|
|
||||||
"react/no-string-refs": 2,
|
|
||||||
"react/jsx-indent": 0,
|
|
||||||
"prettier/prettier": "error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -23,7 +23,7 @@ import configureMockStore from 'redux-mock-store';
|
|||||||
import thunk from 'redux-thunk';
|
import thunk from 'redux-thunk';
|
||||||
import shortid from 'shortid';
|
import shortid from 'shortid';
|
||||||
import * as featureFlags from 'src/featureFlags';
|
import * as featureFlags from 'src/featureFlags';
|
||||||
import { ADD_TOAST } from 'src/messageToasts/actions';
|
import { ADD_TOAST } from 'src/components/MessageToasts/actions';
|
||||||
import * as actions from 'src/SqlLab/actions/sqlLab';
|
import * as actions from 'src/SqlLab/actions/sqlLab';
|
||||||
import { defaultQueryEditor, query } from '../fixtures';
|
import { defaultQueryEditor, query } from '../fixtures';
|
||||||
|
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ import invert from 'lodash/invert';
|
|||||||
import mapKeys from 'lodash/mapKeys';
|
import mapKeys from 'lodash/mapKeys';
|
||||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||||
|
|
||||||
import { now } from '../../modules/dates';
|
import { now } from 'src/modules/dates';
|
||||||
import {
|
import {
|
||||||
addDangerToast as addDangerToastAction,
|
addDangerToast as addDangerToastAction,
|
||||||
addInfoToast as addInfoToastAction,
|
addInfoToast as addInfoToastAction,
|
||||||
addSuccessToast as addSuccessToastAction,
|
addSuccessToast as addSuccessToastAction,
|
||||||
addWarningToast as addWarningToastAction,
|
addWarningToast as addWarningToastAction,
|
||||||
} from '../../messageToasts/actions/index';
|
} from 'src/components/MessageToasts/actions';
|
||||||
import { getClientErrorObject } from '../../utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import COMMON_ERR_MESSAGES from '../../utils/errorMessages';
|
import COMMON_ERR_MESSAGES from 'src/utils/errorMessages';
|
||||||
|
|
||||||
export const RESET_STATE = 'RESET_STATE';
|
export const RESET_STATE = 'RESET_STATE';
|
||||||
export const ADD_QUERY_EDITOR = 'ADD_QUERY_EDITOR';
|
export const ADD_QUERY_EDITOR = 'ADD_QUERY_EDITOR';
|
||||||
|
|||||||
@@ -23,16 +23,16 @@ import { connect } from 'react-redux';
|
|||||||
import { t, supersetTheme, ThemeProvider } from '@superset-ui/core';
|
import { t, supersetTheme, ThemeProvider } from '@superset-ui/core';
|
||||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||||
import throttle from 'lodash/throttle';
|
import throttle from 'lodash/throttle';
|
||||||
import TabbedSqlEditors from './TabbedSqlEditors';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
import QueryAutoRefresh from './QueryAutoRefresh';
|
|
||||||
import QuerySearch from './QuerySearch';
|
|
||||||
import ToastPresenter from '../../messageToasts/containers/ToastPresenter';
|
|
||||||
import {
|
import {
|
||||||
LOCALSTORAGE_MAX_USAGE_KB,
|
LOCALSTORAGE_MAX_USAGE_KB,
|
||||||
LOCALSTORAGE_WARNING_THRESHOLD,
|
LOCALSTORAGE_WARNING_THRESHOLD,
|
||||||
LOCALSTORAGE_WARNING_MESSAGE_THROTTLE_MS,
|
LOCALSTORAGE_WARNING_MESSAGE_THROTTLE_MS,
|
||||||
} from '../constants';
|
} from 'src/SqlLab/constants';
|
||||||
import * as Actions from '../actions/sqlLab';
|
import * as Actions from 'src/SqlLab/actions/sqlLab';
|
||||||
|
import TabbedSqlEditors from './TabbedSqlEditors';
|
||||||
|
import QueryAutoRefresh from './QueryAutoRefresh';
|
||||||
|
import QuerySearch from './QuerySearch';
|
||||||
|
|
||||||
class App extends React.PureComponent {
|
class App extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -109,7 +109,7 @@ class App extends React.PureComponent {
|
|||||||
<ThemeProvider theme={supersetTheme}>
|
<ThemeProvider theme={supersetTheme}>
|
||||||
<div className="App SqlLab">
|
<div className="App SqlLab">
|
||||||
{content}
|
{content}
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</div>
|
</div>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,10 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { t, useTheme, styled } from '@superset-ui/core';
|
import { t, useTheme, styled } from '@superset-ui/core';
|
||||||
|
|
||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import CopyToClipboard from 'src/components/CopyToClipboard';
|
import CopyToClipboard from 'src/components/CopyToClipboard';
|
||||||
import { storeQuery } from 'src/utils/common';
|
import { storeQuery } from 'src/utils/common';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import getToastsFromPyFlashMessages from '../../messageToasts/utils/getToastsFromPyFlashMessages';
|
import getToastsFromPyFlashMessages from 'src/components/MessageToasts/getToastsFromPyFlashMessages';
|
||||||
|
|
||||||
export default function getInitialState({
|
export default function getInitialState({
|
||||||
defaultDbId,
|
defaultDbId,
|
||||||
|
|||||||
@@ -17,10 +17,9 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { combineReducers } from 'redux';
|
import { combineReducers } from 'redux';
|
||||||
|
import messageToasts from 'src/components/MessageToasts/reducers';
|
||||||
import sqlLab from './sqlLab';
|
import sqlLab from './sqlLab';
|
||||||
import localStorageUsageInKilobytes from './localStorageUsage';
|
import localStorageUsageInKilobytes from './localStorageUsage';
|
||||||
import messageToasts from '../../messageToasts/reducers/index';
|
|
||||||
import common from './common';
|
import common from './common';
|
||||||
|
|
||||||
export default combineReducers({
|
export default combineReducers({
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { t, SupersetClient } from '@superset-ui/core';
|
import { t, SupersetClient } from '@superset-ui/core';
|
||||||
import { getControlsState } from 'src/explore/store';
|
import { getControlsState } from 'src/explore/store';
|
||||||
import { isFeatureEnabled, FeatureFlag } from '../featureFlags';
|
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||||
import {
|
import {
|
||||||
getAnnotationJsonUrl,
|
getAnnotationJsonUrl,
|
||||||
getExploreUrl,
|
getExploreUrl,
|
||||||
@@ -30,19 +30,19 @@ import {
|
|||||||
postForm,
|
postForm,
|
||||||
shouldUseLegacyApi,
|
shouldUseLegacyApi,
|
||||||
getChartDataUri,
|
getChartDataUri,
|
||||||
} from '../explore/exploreUtils';
|
} from 'src/explore/exploreUtils';
|
||||||
import {
|
import {
|
||||||
requiresQuery,
|
requiresQuery,
|
||||||
ANNOTATION_SOURCE_TYPES,
|
ANNOTATION_SOURCE_TYPES,
|
||||||
} from '../modules/AnnotationTypes';
|
} from 'src/modules/AnnotationTypes';
|
||||||
|
|
||||||
import { addDangerToast } from '../messageToasts/actions';
|
import { addDangerToast } from 'src/components/MessageToasts/actions';
|
||||||
import { logEvent } from '../logger/actions';
|
import { logEvent } from 'src/logger/actions';
|
||||||
import { Logger, LOG_ACTIONS_LOAD_CHART } from '../logger/LogUtils';
|
import { Logger, LOG_ACTIONS_LOAD_CHART } from 'src/logger/LogUtils';
|
||||||
import { getClientErrorObject } from '../utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import { allowCrossDomain as domainShardingEnabled } from '../utils/hostNamesConfig';
|
import { allowCrossDomain as domainShardingEnabled } from 'src/utils/hostNamesConfig';
|
||||||
import { updateDataMask } from '../dataMask/actions';
|
import { updateDataMask } from 'src/dataMask/actions';
|
||||||
import { waitForAsyncData } from '../middleware/asyncEvent';
|
import { waitForAsyncData } from 'src/middleware/asyncEvent';
|
||||||
|
|
||||||
export const CHART_UPDATE_STARTED = 'CHART_UPDATE_STARTED';
|
export const CHART_UPDATE_STARTED = 'CHART_UPDATE_STARTED';
|
||||||
export function chartUpdateStarted(queryController, latestQueryFormData, key) {
|
export function chartUpdateStarted(queryController, latestQueryFormData, key) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import React from 'react';
|
|||||||
import { useTheme } from '@superset-ui/core';
|
import { useTheme } from '@superset-ui/core';
|
||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import ToastPresenter from 'src/messageToasts/containers/ToastPresenter';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
import CopyToClipboard from '.';
|
import CopyToClipboard from '.';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -39,7 +39,7 @@ export const InteractiveCopyToClipboard = ({ copyNode, ...rest }: any) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CopyToClipboard copyNode={node} {...rest} />
|
<CopyToClipboard copyNode={node} {...rest} />
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import { Tooltip } from 'src/components/Tooltip';
|
import { Tooltip } from 'src/components/Tooltip';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import copyTextToClipboard from 'src/utils/copy';
|
import copyTextToClipboard from 'src/utils/copy';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { useToasts } from 'src/messageToasts/enhancers/withToasts';
|
import { useToasts } from 'src/components/MessageToasts/withToasts';
|
||||||
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
||||||
|
|
||||||
type FlashMessageType = 'info' | 'alert' | 'danger' | 'warning' | 'success';
|
type FlashMessageType = 'info' | 'alert' | 'danger' | 'warning' | 'success';
|
||||||
|
|||||||
+2
-2
@@ -19,9 +19,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mount } from 'enzyme';
|
||||||
import { ThemeProvider, supersetTheme } from '@superset-ui/core';
|
import { ThemeProvider, supersetTheme } from '@superset-ui/core';
|
||||||
import Toast from 'src/messageToasts/components/Toast';
|
import Toast from 'src/components/MessageToasts/Toast';
|
||||||
import { act } from 'react-dom/test-utils';
|
import { act } from 'react-dom/test-utils';
|
||||||
import mockMessageToasts from '../mockMessageToasts';
|
import mockMessageToasts from './mockMessageToasts';
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
toast: mockMessageToasts[0],
|
toast: mockMessageToasts[0],
|
||||||
+1
-2
@@ -21,8 +21,7 @@ import cx from 'classnames';
|
|||||||
import Interweave from 'interweave';
|
import Interweave from 'interweave';
|
||||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import { ToastType } from 'src/messageToasts/constants';
|
import { ToastType, ToastMeta } from './types';
|
||||||
import { ToastMeta } from '../types';
|
|
||||||
|
|
||||||
const ToastContainer = styled.div`
|
const ToastContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
+2
-2
@@ -18,9 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import ToastPresenter from '../components/ToastPresenter';
|
import ToastPresenter from './ToastPresenter';
|
||||||
|
|
||||||
import { removeToast } from '../actions';
|
import { removeToast } from './actions';
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
({ messageToasts: toasts }) => ({ toasts }),
|
({ messageToasts: toasts }) => ({ toasts }),
|
||||||
+3
-4
@@ -18,10 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import Toast from 'src/messageToasts/components/Toast';
|
import Toast from 'src/components/MessageToasts/Toast';
|
||||||
import ToastPresenter from 'src/messageToasts/components/ToastPresenter';
|
import ToastPresenter from 'src/components/MessageToasts/ToastPresenter';
|
||||||
|
import mockMessageToasts from './mockMessageToasts';
|
||||||
import mockMessageToasts from '../mockMessageToasts';
|
|
||||||
|
|
||||||
describe('ToastPresenter', () => {
|
describe('ToastPresenter', () => {
|
||||||
const props = {
|
const props = {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { styled } from '@superset-ui/core';
|
import { styled } from '@superset-ui/core';
|
||||||
import { ToastMeta } from 'src/messageToasts/types';
|
import { ToastMeta } from 'src/components/MessageToasts/types';
|
||||||
import Toast from './Toast';
|
import Toast from './Toast';
|
||||||
|
|
||||||
const StyledToastPresenter = styled.div`
|
const StyledToastPresenter = styled.div`
|
||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import shortid from 'shortid';
|
import shortid from 'shortid';
|
||||||
import { ToastType, ToastMeta } from '../types';
|
import { ToastType, ToastMeta } from './types';
|
||||||
|
|
||||||
type ToastOptions = Partial<Omit<ToastMeta, 'id' | 'toastType' | 'text'>>;
|
type ToastOptions = Partial<Omit<ToastMeta, 'id' | 'toastType' | 'text'>>;
|
||||||
|
|
||||||
+2
-2
@@ -16,8 +16,8 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { addToast } from '../actions';
|
import { addToast } from './actions';
|
||||||
import { ToastType } from '../constants';
|
import { ToastType } from './types';
|
||||||
|
|
||||||
export default function toastsFromPyFlashMessages(flashMessages = []) {
|
export default function toastsFromPyFlashMessages(flashMessages = []) {
|
||||||
const toasts = [];
|
const toasts = [];
|
||||||
+2
-3
@@ -16,9 +16,8 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { ToastType } from 'src/messageToasts/constants';
|
import { ToastType } from 'src/components/MessageToasts/types';
|
||||||
|
import getToastsFromPyFlashMessages from 'src/components/MessageToasts/getToastsFromPyFlashMessages';
|
||||||
import getToastsFromPyFlashMessages from 'src/messageToasts/utils/getToastsFromPyFlashMessages';
|
|
||||||
|
|
||||||
describe('getToastsFromPyFlashMessages', () => {
|
describe('getToastsFromPyFlashMessages', () => {
|
||||||
it('should return an info toast', () => {
|
it('should return an info toast', () => {
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { ToastType } from 'src/messageToasts/constants';
|
import { ToastType } from 'src/components/MessageToasts/types';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ id: 'info_id', toastType: ToastType.INFO, text: 'info toast' },
|
{ id: 'info_id', toastType: ToastType.INFO, text: 'info toast' },
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { ADD_TOAST, REMOVE_TOAST } from '../actions';
|
import { ADD_TOAST, REMOVE_TOAST } from './actions';
|
||||||
|
|
||||||
export default function messageToastsReducer(toasts = [], action) {
|
export default function messageToastsReducer(toasts = [], action) {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
+2
-2
@@ -16,8 +16,8 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { ADD_TOAST, REMOVE_TOAST } from 'src/messageToasts/actions';
|
import { ADD_TOAST, REMOVE_TOAST } from 'src/components/MessageToasts/actions';
|
||||||
import messageToastsReducer from 'src/messageToasts/reducers';
|
import messageToastsReducer from 'src/components/MessageToasts/reducers';
|
||||||
|
|
||||||
describe('messageToasts reducer', () => {
|
describe('messageToasts reducer', () => {
|
||||||
it('should return initial state', () => {
|
it('should return initial state', () => {
|
||||||
+1
-1
@@ -26,7 +26,7 @@ import {
|
|||||||
addInfoToast,
|
addInfoToast,
|
||||||
addSuccessToast,
|
addSuccessToast,
|
||||||
addWarningToast,
|
addWarningToast,
|
||||||
} from '../actions';
|
} from './actions';
|
||||||
|
|
||||||
export interface ToastProps {
|
export interface ToastProps {
|
||||||
addDangerToast: typeof addDangerToast;
|
addDangerToast: typeof addDangerToast;
|
||||||
@@ -33,7 +33,7 @@ import { AlertObject } from 'src/views/CRUD/alert/types';
|
|||||||
import TimezoneSelector from 'src/components/TimezoneSelector';
|
import TimezoneSelector from 'src/components/TimezoneSelector';
|
||||||
import LabeledErrorBoundInput from 'src/components/Form/LabeledErrorBoundInput';
|
import LabeledErrorBoundInput from 'src/components/Form/LabeledErrorBoundInput';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { CronError } from 'src/components/CronPicker';
|
import { CronError } from 'src/components/CronPicker';
|
||||||
import { RadioChangeEvent } from 'src/common/components';
|
import { RadioChangeEvent } from 'src/common/components';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { render, screen } from 'spec/helpers/testing-library';
|
|||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
import fetchMock from 'fetch-mock';
|
import fetchMock from 'fetch-mock';
|
||||||
import { storeWithState } from 'spec/fixtures/mockStore';
|
import { storeWithState } from 'spec/fixtures/mockStore';
|
||||||
import ToastPresenter from 'src/messageToasts/containers/ToastPresenter';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
import TableLoader, { TableLoaderProps } from '.';
|
import TableLoader, { TableLoaderProps } from '.';
|
||||||
|
|
||||||
fetchMock.get('glob:*/api/v1/mock', [
|
fetchMock.get('glob:*/api/v1/mock', [
|
||||||
@@ -38,7 +38,7 @@ function renderWithProps(props: TableLoaderProps = defaultProps) {
|
|||||||
return render(
|
return render(
|
||||||
<Provider store={storeWithState({})}>
|
<Provider store={storeWithState({})}>
|
||||||
<TableLoader {...props} />
|
<TableLoader {...props} />
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</Provider>,
|
</Provider>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
import React, { useState, useEffect, useMemo } from 'react';
|
import React, { useState, useEffect, useMemo } from 'react';
|
||||||
import { t, SupersetClient, JsonObject } from '@superset-ui/core';
|
import { t, SupersetClient, JsonObject } from '@superset-ui/core';
|
||||||
import TableView, { EmptyWrapperType } from 'src/components/TableView';
|
import TableView, { EmptyWrapperType } from 'src/components/TableView';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import Loading from 'src/components/Loading';
|
import Loading from 'src/components/Loading';
|
||||||
import 'stylesheets/reactable-pagination.less';
|
import 'stylesheets/reactable-pagination.less';
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { render, screen } from 'spec/helpers/testing-library';
|
|||||||
import userEvent from '@testing-library/user-event';
|
import userEvent from '@testing-library/user-event';
|
||||||
import fetchMock from 'fetch-mock';
|
import fetchMock from 'fetch-mock';
|
||||||
import URLShortLinkButton from 'src/components/URLShortLinkButton';
|
import URLShortLinkButton from 'src/components/URLShortLinkButton';
|
||||||
import ToastPresenter from 'src/messageToasts/containers/ToastPresenter';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
|
|
||||||
const fakeUrl = 'http://fakeurl.com';
|
const fakeUrl = 'http://fakeurl.com';
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ test('renders error message on short url error', async () => {
|
|||||||
render(
|
render(
|
||||||
<>
|
<>
|
||||||
<URLShortLinkButton />
|
<URLShortLinkButton />
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</>,
|
</>,
|
||||||
{ useRedux: true },
|
{ useRedux: true },
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { t } from '@superset-ui/core';
|
|||||||
import Popover from 'src/components/Popover';
|
import Popover from 'src/components/Popover';
|
||||||
import CopyToClipboard from 'src/components/CopyToClipboard';
|
import CopyToClipboard from 'src/components/CopyToClipboard';
|
||||||
import { getShortUrl } from 'src/utils/urlUtils';
|
import { getShortUrl } from 'src/utils/urlUtils';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
url: PropTypes.string,
|
url: PropTypes.string,
|
||||||
|
|||||||
@@ -18,19 +18,18 @@
|
|||||||
*/
|
*/
|
||||||
import { ActionCreators as UndoActionCreators } from 'redux-undo';
|
import { ActionCreators as UndoActionCreators } from 'redux-undo';
|
||||||
import { t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
|
import { addWarningToast } from 'src/components/MessageToasts/actions';
|
||||||
import { addWarningToast } from '../../messageToasts/actions';
|
import { TABS_TYPE, ROW_TYPE } from 'src/dashboard/util/componentTypes';
|
||||||
import { updateLayoutComponents } from './dashboardFilters';
|
|
||||||
import { setUnsavedChanges } from './dashboardState';
|
|
||||||
import { TABS_TYPE, ROW_TYPE } from '../util/componentTypes';
|
|
||||||
import {
|
import {
|
||||||
DASHBOARD_ROOT_ID,
|
DASHBOARD_ROOT_ID,
|
||||||
NEW_COMPONENTS_SOURCE_ID,
|
NEW_COMPONENTS_SOURCE_ID,
|
||||||
DASHBOARD_HEADER_ID,
|
DASHBOARD_HEADER_ID,
|
||||||
} from '../util/constants';
|
} from 'src/dashboard/util/constants';
|
||||||
import dropOverflowsParent from '../util/dropOverflowsParent';
|
import dropOverflowsParent from 'src/dashboard/util/dropOverflowsParent';
|
||||||
import findParentId from '../util/findParentId';
|
import findParentId from 'src/dashboard/util/findParentId';
|
||||||
import isInDifferentFilterScopes from '../util/isInDifferentFilterScopes';
|
import isInDifferentFilterScopes from 'src/dashboard/util/isInDifferentFilterScopes';
|
||||||
|
import { updateLayoutComponents } from './dashboardFilters';
|
||||||
|
import { setUnsavedChanges } from './dashboardState';
|
||||||
|
|
||||||
// Component CRUD -------------------------------------------------------------
|
// Component CRUD -------------------------------------------------------------
|
||||||
export const UPDATE_COMPONENTS = 'UPDATE_COMPONENTS';
|
export const UPDATE_COMPONENTS = 'UPDATE_COMPONENTS';
|
||||||
|
|||||||
@@ -19,30 +19,29 @@
|
|||||||
/* eslint camelcase: 0 */
|
/* eslint camelcase: 0 */
|
||||||
import { ActionCreators as UndoActionCreators } from 'redux-undo';
|
import { ActionCreators as UndoActionCreators } from 'redux-undo';
|
||||||
import { t, SupersetClient } from '@superset-ui/core';
|
import { t, SupersetClient } from '@superset-ui/core';
|
||||||
|
import { addChart, removeChart, refreshChart } from 'src/chart/chartAction';
|
||||||
import { addChart, removeChart, refreshChart } from '../../chart/chartAction';
|
import { chart as initChart } from 'src/chart/chartReducer';
|
||||||
import { chart as initChart } from '../../chart/chartReducer';
|
import { applyDefaultFormData } from 'src/explore/store';
|
||||||
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
|
import { SAVE_TYPE_OVERWRITE } from 'src/dashboard/util/constants';
|
||||||
|
import {
|
||||||
|
addSuccessToast,
|
||||||
|
addWarningToast,
|
||||||
|
addDangerToast,
|
||||||
|
} from 'src/components/MessageToasts/actions';
|
||||||
|
import serializeActiveFilterValues from 'src/dashboard/util/serializeActiveFilterValues';
|
||||||
|
import serializeFilterScopes from 'src/dashboard/util/serializeFilterScopes';
|
||||||
|
import { getActiveFilters } from 'src/dashboard/util/activeDashboardFilters';
|
||||||
|
import { safeStringify } from 'src/utils/safeStringify';
|
||||||
|
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||||
|
import { UPDATE_COMPONENTS_PARENTS_LIST } from './dashboardLayout';
|
||||||
|
import { setChartConfiguration } from './dashboardInfo';
|
||||||
import { fetchDatasourceMetadata } from './datasources';
|
import { fetchDatasourceMetadata } from './datasources';
|
||||||
import {
|
import {
|
||||||
addFilter,
|
addFilter,
|
||||||
removeFilter,
|
removeFilter,
|
||||||
updateDirectPathToFilter,
|
updateDirectPathToFilter,
|
||||||
} from './dashboardFilters';
|
} from './dashboardFilters';
|
||||||
import { applyDefaultFormData } from '../../explore/store';
|
|
||||||
import { getClientErrorObject } from '../../utils/getClientErrorObject';
|
|
||||||
import { SAVE_TYPE_OVERWRITE } from '../util/constants';
|
|
||||||
import {
|
|
||||||
addSuccessToast,
|
|
||||||
addWarningToast,
|
|
||||||
addDangerToast,
|
|
||||||
} from '../../messageToasts/actions';
|
|
||||||
import { UPDATE_COMPONENTS_PARENTS_LIST } from './dashboardLayout';
|
|
||||||
import serializeActiveFilterValues from '../util/serializeActiveFilterValues';
|
|
||||||
import serializeFilterScopes from '../util/serializeFilterScopes';
|
|
||||||
import { getActiveFilters } from '../util/activeDashboardFilters';
|
|
||||||
import { safeStringify } from '../../utils/safeStringify';
|
|
||||||
import { FeatureFlag, isFeatureEnabled } from '../../featureFlags';
|
|
||||||
import { setChartConfiguration } from './dashboardInfo';
|
|
||||||
|
|
||||||
export const SET_UNSAVED_CHANGES = 'SET_UNSAVED_CHANGES';
|
export const SET_UNSAVED_CHANGES = 'SET_UNSAVED_CHANGES';
|
||||||
export function setUnsavedChanges(hasUnsavedChanges) {
|
export function setUnsavedChanges(hasUnsavedChanges) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
import { t, SupersetClient } from '@superset-ui/core';
|
import { t, SupersetClient } from '@superset-ui/core';
|
||||||
import rison from 'rison';
|
import rison from 'rison';
|
||||||
|
|
||||||
import { addDangerToast } from 'src/messageToasts/actions';
|
import { addDangerToast } from 'src/components/MessageToasts/actions';
|
||||||
import { getDatasourceParameter } from 'src/modules/utils';
|
import { getDatasourceParameter } from 'src/modules/utils';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import { JsonEditor } from 'src/components/AsyncAceEditor';
|
|||||||
|
|
||||||
import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
|
import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||||
|
|
||||||
const StyledJsonEditor = styled(JsonEditor)`
|
const StyledJsonEditor = styled(JsonEditor)`
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ import { FormInstance } from 'antd/lib/form';
|
|||||||
import { Column, ensureIsArray, SupersetClient, t } from '@superset-ui/core';
|
import { Column, ensureIsArray, SupersetClient, t } from '@superset-ui/core';
|
||||||
import { useChangeEffect } from 'src/common/hooks/useChangeEffect';
|
import { useChangeEffect } from 'src/common/hooks/useChangeEffect';
|
||||||
import { Select } from 'src/components';
|
import { Select } from 'src/components';
|
||||||
import { useToasts } from 'src/messageToasts/enhancers/withToasts';
|
import { useToasts } from 'src/components/MessageToasts/withToasts';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import { cacheWrapper } from 'src/utils/cacheWrapper';
|
import { cacheWrapper } from 'src/utils/cacheWrapper';
|
||||||
import { NativeFiltersForm } from '../types';
|
import { NativeFiltersForm } from '../types';
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ import { Select } from 'src/components';
|
|||||||
import { cacheWrapper } from 'src/utils/cacheWrapper';
|
import { cacheWrapper } from 'src/utils/cacheWrapper';
|
||||||
import AdhocFilterControl from 'src/explore/components/controls/FilterControl/AdhocFilterControl';
|
import AdhocFilterControl from 'src/explore/components/controls/FilterControl/AdhocFilterControl';
|
||||||
import DateFilterControl from 'src/explore/components/controls/DateFilterControl';
|
import DateFilterControl from 'src/explore/components/controls/DateFilterControl';
|
||||||
import { addDangerToast } from 'src/messageToasts/actions';
|
import { addDangerToast } from 'src/components/MessageToasts/actions';
|
||||||
import { ClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { ClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import Collapse from 'src/components/Collapse';
|
import Collapse from 'src/components/Collapse';
|
||||||
import { getChartDataRequest } from 'src/chart/chartAction';
|
import { getChartDataRequest } from 'src/chart/chartAction';
|
||||||
|
|||||||
@@ -18,24 +18,26 @@
|
|||||||
*/
|
*/
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
toggleExpandSlice,
|
toggleExpandSlice,
|
||||||
setFocusedFilterField,
|
setFocusedFilterField,
|
||||||
unsetFocusedFilterField,
|
unsetFocusedFilterField,
|
||||||
} from '../actions/dashboardState';
|
} from 'src/dashboard/actions/dashboardState';
|
||||||
import { updateComponents } from '../actions/dashboardLayout';
|
import { updateComponents } from 'src/dashboard/actions/dashboardLayout';
|
||||||
import { changeFilter } from '../actions/dashboardFilters';
|
import { changeFilter } from 'src/dashboard/actions/dashboardFilters';
|
||||||
import { addSuccessToast, addDangerToast } from '../../messageToasts/actions';
|
import {
|
||||||
import { refreshChart } from '../../chart/chartAction';
|
addSuccessToast,
|
||||||
import { logEvent } from '../../logger/actions';
|
addDangerToast,
|
||||||
|
} from 'src/components/MessageToasts/actions';
|
||||||
|
import { refreshChart } from 'src/chart/chartAction';
|
||||||
|
import { logEvent } from 'src/logger/actions';
|
||||||
import {
|
import {
|
||||||
getActiveFilters,
|
getActiveFilters,
|
||||||
getAppliedFilterValues,
|
getAppliedFilterValues,
|
||||||
} from '../util/activeDashboardFilters';
|
} from 'src/dashboard/util/activeDashboardFilters';
|
||||||
import getFormDataWithExtraFilters from '../util/charts/getFormDataWithExtraFilters';
|
import getFormDataWithExtraFilters from 'src/dashboard/util/charts/getFormDataWithExtraFilters';
|
||||||
import Chart from '../components/gridComponents/Chart';
|
import Chart from 'src/dashboard/components/gridComponents/Chart';
|
||||||
import { PLACEHOLDER_DATASOURCE } from '../constants';
|
import { PLACEHOLDER_DATASOURCE } from 'src/dashboard/constants';
|
||||||
|
|
||||||
const EMPTY_OBJECT = {};
|
const EMPTY_OBJECT = {};
|
||||||
|
|
||||||
|
|||||||
@@ -20,26 +20,24 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { logEvent } from 'src/logger/actions';
|
import { logEvent } from 'src/logger/actions';
|
||||||
import { addDangerToast } from 'src/messageToasts/actions';
|
import { addDangerToast } from 'src/components/MessageToasts/actions';
|
||||||
import { componentLookup } from '../components/gridComponents';
|
import { componentLookup } from 'src/dashboard/components/gridComponents';
|
||||||
import getDetailedComponentWidth from '../util/getDetailedComponentWidth';
|
import getDetailedComponentWidth from 'src/dashboard/util/getDetailedComponentWidth';
|
||||||
import { getActiveFilters } from '../util/activeDashboardFilters';
|
import { getActiveFilters } from 'src/dashboard/util/activeDashboardFilters';
|
||||||
import { componentShape } from '../util/propShapes';
|
import { componentShape } from 'src/dashboard/util/propShapes';
|
||||||
import { COLUMN_TYPE, ROW_TYPE } from '../util/componentTypes';
|
import { COLUMN_TYPE, ROW_TYPE } from 'src/dashboard/util/componentTypes';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createComponent,
|
createComponent,
|
||||||
deleteComponent,
|
deleteComponent,
|
||||||
updateComponents,
|
updateComponents,
|
||||||
handleComponentDrop,
|
handleComponentDrop,
|
||||||
} from '../actions/dashboardLayout';
|
} from 'src/dashboard/actions/dashboardLayout';
|
||||||
import {
|
import {
|
||||||
setDirectPathToChild,
|
setDirectPathToChild,
|
||||||
setActiveTabs,
|
setActiveTabs,
|
||||||
setFullSizeChartId,
|
setFullSizeChartId,
|
||||||
} from '../actions/dashboardState';
|
} from 'src/dashboard/actions/dashboardState';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
id: PropTypes.string,
|
id: PropTypes.string,
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ import { bindActionCreators } from 'redux';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { updateDataMask } from 'src/dataMask/actions';
|
import { updateDataMask } from 'src/dataMask/actions';
|
||||||
import DashboardHeader from '../components/Header';
|
import DashboardHeader from 'src/dashboard/components/Header';
|
||||||
import isDashboardLoading from '../util/isDashboardLoading';
|
import isDashboardLoading from 'src/dashboard/util/isDashboardLoading';
|
||||||
|
|
||||||
import { dashboardInfoChanged } from '../actions/dashboardInfo';
|
import { dashboardInfoChanged } from 'src/dashboard/actions/dashboardInfo';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
setEditMode,
|
setEditMode,
|
||||||
@@ -40,28 +40,27 @@ import {
|
|||||||
maxUndoHistoryToast,
|
maxUndoHistoryToast,
|
||||||
setRefreshFrequency,
|
setRefreshFrequency,
|
||||||
onRefresh,
|
onRefresh,
|
||||||
} from '../actions/dashboardState';
|
} from 'src/dashboard/actions/dashboardState';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
undoLayoutAction,
|
undoLayoutAction,
|
||||||
redoLayoutAction,
|
redoLayoutAction,
|
||||||
updateDashboardTitle,
|
updateDashboardTitle,
|
||||||
dashboardTitleChanged,
|
dashboardTitleChanged,
|
||||||
} from '../actions/dashboardLayout';
|
} from 'src/dashboard/actions/dashboardLayout';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addSuccessToast,
|
addSuccessToast,
|
||||||
addDangerToast,
|
addDangerToast,
|
||||||
addWarningToast,
|
addWarningToast,
|
||||||
} from '../../messageToasts/actions';
|
} from 'src/components/MessageToasts/actions';
|
||||||
|
|
||||||
import { logEvent } from '../../logger/actions';
|
import { logEvent } from 'src/logger/actions';
|
||||||
import { DASHBOARD_HEADER_ID } from '../util/constants';
|
import { DASHBOARD_HEADER_ID } from 'src/dashboard/util/constants';
|
||||||
import {
|
import {
|
||||||
fetchUISpecificReport,
|
fetchUISpecificReport,
|
||||||
toggleActive,
|
toggleActive,
|
||||||
deleteActiveReport,
|
deleteActiveReport,
|
||||||
} from '../../reports/actions/reports';
|
} from 'src/reports/actions/reports';
|
||||||
|
|
||||||
function mapStateToProps({
|
function mapStateToProps({
|
||||||
dashboardLayout: undoableLayout,
|
dashboardLayout: undoableLayout,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import React, { useEffect, FC } from 'react';
|
|||||||
import { t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { useToasts } from 'src/messageToasts/enhancers/withToasts';
|
import { useToasts } from 'src/components/MessageToasts/withToasts';
|
||||||
import Loading from 'src/components/Loading';
|
import Loading from 'src/components/Loading';
|
||||||
import {
|
import {
|
||||||
useDashboard,
|
useDashboard,
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ import { useDebouncedEffect } from 'src/explore/exploreUtils';
|
|||||||
import { SLOW_DEBOUNCE } from 'src/constants';
|
import { SLOW_DEBOUNCE } from 'src/constants';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import Loading from 'src/components/Loading';
|
import Loading from 'src/components/Loading';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import { Input, AntdInput } from 'src/common/components';
|
import { Input, AntdInput } from 'src/common/components';
|
||||||
import {
|
import {
|
||||||
PAGE_SIZE as DATASET_PAGE_SIZE,
|
PAGE_SIZE as DATASET_PAGE_SIZE,
|
||||||
SORT_BY as DATASET_SORT_BY,
|
SORT_BY as DATASET_SORT_BY,
|
||||||
} from 'src/views/CRUD/data/dataset/constants';
|
} from 'src/views/CRUD/data/dataset/constants';
|
||||||
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import FacePile from '../components/FacePile';
|
import FacePile from '../components/FacePile';
|
||||||
|
|
||||||
const CONFIRM_WARNING_MESSAGE = t(
|
const CONFIRM_WARNING_MESSAGE = t(
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ import CollectionTable from 'src/CRUD/CollectionTable';
|
|||||||
import Fieldset from 'src/CRUD/Fieldset';
|
import Fieldset from 'src/CRUD/Fieldset';
|
||||||
import Field from 'src/CRUD/Field';
|
import Field from 'src/CRUD/Field';
|
||||||
|
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import AsyncEsmComponent from 'src/components/AsyncEsmComponent';
|
|||||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||||
|
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
|
|
||||||
const DatasourceEditor = AsyncEsmComponent(() => import('./DatasourceEditor'));
|
const DatasourceEditor = AsyncEsmComponent(() => import('./DatasourceEditor'));
|
||||||
|
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ import { DndProvider } from 'react-dnd';
|
|||||||
import { HTML5Backend } from 'react-dnd-html5-backend';
|
import { HTML5Backend } from 'react-dnd-html5-backend';
|
||||||
import { ThemeProvider } from '@superset-ui/core';
|
import { ThemeProvider } from '@superset-ui/core';
|
||||||
import { DynamicPluginProvider } from 'src/components/DynamicPlugins';
|
import { DynamicPluginProvider } from 'src/components/DynamicPlugins';
|
||||||
import ToastPresenter from '../messageToasts/containers/ToastPresenter';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
import ExploreViewContainer from './components/ExploreViewContainer';
|
import setupApp from 'src/setup/setupApp';
|
||||||
import setupApp from '../setup/setupApp';
|
import setupPlugins from 'src/setup/setupPlugins';
|
||||||
import setupPlugins from '../setup/setupPlugins';
|
|
||||||
import './main.less';
|
import './main.less';
|
||||||
import '../../stylesheets/reactable-pagination.less';
|
import 'stylesheets/reactable-pagination.less';
|
||||||
import { theme } from '../preamble';
|
import { theme } from 'src/preamble';
|
||||||
|
import ExploreViewContainer from './components/ExploreViewContainer';
|
||||||
|
|
||||||
setupApp();
|
setupApp();
|
||||||
setupPlugins();
|
setupPlugins();
|
||||||
@@ -40,7 +40,7 @@ const App = ({ store }) => (
|
|||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<DynamicPluginProvider>
|
<DynamicPluginProvider>
|
||||||
<ExploreViewContainer />
|
<ExploreViewContainer />
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</DynamicPluginProvider>
|
</DynamicPluginProvider>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</DndProvider>
|
</DndProvider>
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ import {
|
|||||||
QueryFormData,
|
QueryFormData,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
import { Dispatch } from 'redux';
|
import { Dispatch } from 'redux';
|
||||||
import { addDangerToast, toastActions } from 'src/messageToasts/actions';
|
import {
|
||||||
|
addDangerToast,
|
||||||
|
toastActions,
|
||||||
|
} from 'src/components/MessageToasts/actions';
|
||||||
import { Slice } from 'src/types/Chart';
|
import { Slice } from 'src/types/Chart';
|
||||||
|
|
||||||
const FAVESTAR_BASE_URL = '/superset/favstar/slice';
|
const FAVESTAR_BASE_URL = '/superset/favstar/slice';
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { t } from '@superset-ui/core';
|
|||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import { Tooltip } from 'src/components/Tooltip';
|
import { Tooltip } from 'src/components/Tooltip';
|
||||||
import copyTextToClipboard from 'src/utils/copy';
|
import copyTextToClipboard from 'src/utils/copy';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { useUrlShortener } from 'src/common/hooks/useUrlShortener';
|
import { useUrlShortener } from 'src/common/hooks/useUrlShortener';
|
||||||
import EmbedCodeButton from './EmbedCodeButton';
|
import EmbedCodeButton from './EmbedCodeButton';
|
||||||
import { exportChart, getExploreLongUrl } from '../exploreUtils';
|
import { exportChart, getExploreLongUrl } from '../exploreUtils';
|
||||||
|
|||||||
+1
-2
@@ -18,12 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import {
|
import {
|
||||||
StyledColumnOption,
|
StyledColumnOption,
|
||||||
StyledMetricOption,
|
StyledMetricOption,
|
||||||
} from 'src/explore/components/optionRenderers';
|
} from 'src/explore/components/optionRenderers';
|
||||||
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import AggregateOption from './AggregateOption';
|
import AggregateOption from './AggregateOption';
|
||||||
import columnType from './columnType';
|
import columnType from './columnType';
|
||||||
import aggregateOptionType from './aggregateOptionType';
|
import aggregateOptionType from './aggregateOptionType';
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { t } from '@superset-ui/core';
|
|||||||
|
|
||||||
import Select from 'src/components/AsyncSelect';
|
import Select from 'src/components/AsyncSelect';
|
||||||
import ControlHeader from 'src/explore/components/ControlHeader';
|
import ControlHeader from 'src/explore/components/ControlHeader';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
dataEndpoint: PropTypes.string.isRequired,
|
dataEndpoint: PropTypes.string.isRequired,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
CommonBootstrapData,
|
CommonBootstrapData,
|
||||||
UserWithPermissionsAndRoles,
|
UserWithPermissionsAndRoles,
|
||||||
} from 'src/types/bootstrapTypes';
|
} from 'src/types/bootstrapTypes';
|
||||||
import getToastsFromPyFlashMessages from 'src/messageToasts/utils/getToastsFromPyFlashMessages';
|
import getToastsFromPyFlashMessages from 'src/components/MessageToasts/getToastsFromPyFlashMessages';
|
||||||
|
|
||||||
import { ChartState, Slice } from 'src/explore/types';
|
import { ChartState, Slice } from 'src/explore/types';
|
||||||
import { getChartKey } from 'src/explore/exploreUtils';
|
import { getChartKey } from 'src/explore/exploreUtils';
|
||||||
|
|||||||
@@ -19,11 +19,11 @@
|
|||||||
import { combineReducers } from 'redux';
|
import { combineReducers } from 'redux';
|
||||||
|
|
||||||
import reports from 'src/reports/reducers/reports';
|
import reports from 'src/reports/reducers/reports';
|
||||||
import charts from '../../chart/chartReducer';
|
import charts from 'src/chart/chartReducer';
|
||||||
|
import dataMask from 'src/dataMask/reducer';
|
||||||
|
import messageToasts from 'src/components/MessageToasts/reducers';
|
||||||
import saveModal from './saveModalReducer';
|
import saveModal from './saveModalReducer';
|
||||||
import explore from './exploreReducer';
|
import explore from './exploreReducer';
|
||||||
import dataMask from '../../dataMask/reducer';
|
|
||||||
import messageToasts from '../../messageToasts/reducers';
|
|
||||||
|
|
||||||
const impressionId = (state = '') => state;
|
const impressionId = (state = '') => state;
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
/**
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
// Toast types
|
|
||||||
import { ToastType } from './types';
|
|
||||||
|
|
||||||
export { ToastType } from './types';
|
|
||||||
|
|
||||||
// for backward compatibility
|
|
||||||
export const INFO_TOAST = ToastType.INFO;
|
|
||||||
export const SUCCES_TOAST = ToastType.SUCCESS;
|
|
||||||
export const WARNING_TOAST = ToastType.WARNING;
|
|
||||||
export const DANGER_TOAST = ToastType.DANGER;
|
|
||||||
@@ -23,12 +23,12 @@ import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
|
|||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
import { ThemeProvider } from '@superset-ui/core';
|
import { ThemeProvider } from '@superset-ui/core';
|
||||||
import App from 'src/profile/components/App';
|
import App from 'src/profile/components/App';
|
||||||
import messageToastReducer from 'src/messageToasts/reducers';
|
import messageToastReducer from 'src/components/MessageToasts/reducers';
|
||||||
import { initEnhancer } from 'src/reduxUtils';
|
import { initEnhancer } from 'src/reduxUtils';
|
||||||
import setupApp from 'src/setup/setupApp';
|
import setupApp from 'src/setup/setupApp';
|
||||||
import './main.less';
|
import './main.less';
|
||||||
import { theme } from 'src/preamble';
|
import { theme } from 'src/preamble';
|
||||||
import ToastPresenter from 'src/messageToasts/containers/ToastPresenter';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
|
|
||||||
setupApp();
|
setupApp();
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ const Application = () => (
|
|||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<App user={bootstrap.user} />
|
<App user={bootstrap.user} />
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,7 +20,10 @@
|
|||||||
import { t, SupersetClient } from '@superset-ui/core';
|
import { t, SupersetClient } from '@superset-ui/core';
|
||||||
import rison from 'rison';
|
import rison from 'rison';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import { addDangerToast, addSuccessToast } from '../../messageToasts/actions';
|
import {
|
||||||
|
addDangerToast,
|
||||||
|
addSuccessToast,
|
||||||
|
} from 'src/components/MessageToasts/actions';
|
||||||
|
|
||||||
export const SET_REPORT = 'SET_REPORT';
|
export const SET_REPORT = 'SET_REPORT';
|
||||||
export function setReport(report) {
|
export function setReport(report) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { SyntheticEvent } from 'react';
|
|||||||
import domToImage, { Options } from 'dom-to-image';
|
import domToImage, { Options } from 'dom-to-image';
|
||||||
import kebabCase from 'lodash/kebabCase';
|
import kebabCase from 'lodash/kebabCase';
|
||||||
import { t } from '@superset-ui/core';
|
import { t } from '@superset-ui/core';
|
||||||
import { addWarningToast } from 'src/messageToasts/actions';
|
import { addWarningToast } from 'src/components/MessageToasts/actions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @remark
|
* @remark
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import Loading from 'src/components/Loading';
|
|||||||
import Menu from 'src/components/Menu/Menu';
|
import Menu from 'src/components/Menu/Menu';
|
||||||
import FlashProvider from 'src/components/FlashProvider';
|
import FlashProvider from 'src/components/FlashProvider';
|
||||||
import { theme } from 'src/preamble';
|
import { theme } from 'src/preamble';
|
||||||
import ToastPresenter from 'src/messageToasts/containers/ToastPresenter';
|
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
|
||||||
import setupApp from 'src/setup/setupApp';
|
import setupApp from 'src/setup/setupApp';
|
||||||
import { routes, isFrontendRoute } from 'src/views/routes';
|
import { routes, isFrontendRoute } from 'src/views/routes';
|
||||||
import { Logger } from 'src/logger/LogUtils';
|
import { Logger } from 'src/logger/LogUtils';
|
||||||
@@ -98,7 +98,7 @@ const App = () => (
|
|||||||
</Route>
|
</Route>
|
||||||
))}
|
))}
|
||||||
</Switch>
|
</Switch>
|
||||||
<ToastPresenter />
|
<ToastContainer />
|
||||||
</RootContextProviders>
|
</RootContextProviders>
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import ListView, {
|
|||||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||||
import { Switch } from 'src/components/Switch';
|
import { Switch } from 'src/components/Switch';
|
||||||
import { DATETIME_WITH_TIME_ZONE } from 'src/constants';
|
import { DATETIME_WITH_TIME_ZONE } from 'src/constants';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
|
import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
|
||||||
import RecipientIcon from 'src/views/CRUD/alert/components/RecipientIcon';
|
import RecipientIcon from 'src/views/CRUD/alert/components/RecipientIcon';
|
||||||
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
|
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import TimezoneSelector from 'src/components/TimezoneSelector';
|
|||||||
import { Radio } from 'src/components/Radio';
|
import { Radio } from 'src/components/Radio';
|
||||||
import { Select } from 'src/components';
|
import { Select } from 'src/components';
|
||||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import Owner from 'src/types/Owner';
|
import Owner from 'src/types/Owner';
|
||||||
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
|
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
|
||||||
import { useCommonConf } from 'src/views/CRUD/data/database/state';
|
import { useCommonConf } from 'src/views/CRUD/data/database/state';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import React, { useEffect, useMemo } from 'react';
|
|||||||
import { Link, useParams } from 'react-router-dom';
|
import { Link, useParams } from 'react-router-dom';
|
||||||
import ListView from 'src/components/ListView';
|
import ListView from 'src/components/ListView';
|
||||||
import SubMenu from 'src/components/Menu/SubMenu';
|
import SubMenu from 'src/components/Menu/SubMenu';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { fDuration } from 'src/modules/dates';
|
import { fDuration } from 'src/modules/dates';
|
||||||
import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
|
import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import DeleteModal from 'src/components/DeleteModal';
|
|||||||
import ListView, { ListViewProps } from 'src/components/ListView';
|
import ListView, { ListViewProps } from 'src/components/ListView';
|
||||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||||
import { createErrorHandler } from 'src/views/CRUD/utils';
|
import { createErrorHandler } from 'src/views/CRUD/utils';
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import { RangePicker } from 'src/components/DatePicker';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import Modal from 'src/components/Modal';
|
import Modal from 'src/components/Modal';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import { StyledIcon } from 'src/views/CRUD/utils';
|
import { StyledIcon } from 'src/views/CRUD/utils';
|
||||||
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { JsonEditor } from 'src/components/AsyncAceEditor';
|
import { JsonEditor } from 'src/components/AsyncAceEditor';
|
||||||
|
|
||||||
import { AnnotationObject } from './types';
|
import { AnnotationObject } from './types';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
|||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import { StyledIcon } from 'src/views/CRUD/utils';
|
import { StyledIcon } from 'src/views/CRUD/utils';
|
||||||
import Modal from 'src/components/Modal';
|
import Modal from 'src/components/Modal';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
|
|
||||||
import { AnnotationLayerObject } from './types';
|
import { AnnotationLayerObject } from './types';
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import { Link, useHistory } from 'react-router-dom';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||||
import { createFetchRelated, createErrorHandler } from 'src/views/CRUD/utils';
|
import { createFetchRelated, createErrorHandler } from 'src/views/CRUD/utils';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||||
import ActionsBar, { ActionProps } from 'src/components/ListView/ActionsBar';
|
import ActionsBar, { ActionProps } from 'src/components/ListView/ActionsBar';
|
||||||
import ListView, {
|
import ListView, {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ import ListView, {
|
|||||||
} from 'src/components/ListView';
|
} from 'src/components/ListView';
|
||||||
import Loading from 'src/components/Loading';
|
import Loading from 'src/components/Loading';
|
||||||
import { getFromLocalStorage } from 'src/utils/localStorageHelpers';
|
import { getFromLocalStorage } from 'src/utils/localStorageHelpers';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import PropertiesModal from 'src/explore/components/PropertiesModal';
|
import PropertiesModal from 'src/explore/components/PropertiesModal';
|
||||||
import ImportModelsModal from 'src/components/ImportModal/index';
|
import ImportModelsModal from 'src/components/ImportModal/index';
|
||||||
import Chart from 'src/types/Chart';
|
import Chart from 'src/types/Chart';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
|||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import { StyledIcon } from 'src/views/CRUD/utils';
|
import { StyledIcon } from 'src/views/CRUD/utils';
|
||||||
import Modal from 'src/components/Modal';
|
import Modal from 'src/components/Modal';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { CssEditor } from 'src/components/AsyncAceEditor';
|
import { CssEditor } from 'src/components/AsyncAceEditor';
|
||||||
|
|
||||||
import { TemplateObject } from './types';
|
import { TemplateObject } from './types';
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import rison from 'rison';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||||
import { createFetchRelated, createErrorHandler } from 'src/views/CRUD/utils';
|
import { createFetchRelated, createErrorHandler } from 'src/views/CRUD/utils';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||||
import DeleteModal from 'src/components/DeleteModal';
|
import DeleteModal from 'src/components/DeleteModal';
|
||||||
import { Tooltip } from 'src/components/Tooltip';
|
import { Tooltip } from 'src/components/Tooltip';
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import ListView, {
|
|||||||
} from 'src/components/ListView';
|
} from 'src/components/ListView';
|
||||||
import { getFromLocalStorage } from 'src/utils/localStorageHelpers';
|
import { getFromLocalStorage } from 'src/utils/localStorageHelpers';
|
||||||
import Owner from 'src/types/Owner';
|
import Owner from 'src/types/Owner';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import FacePile from 'src/components/FacePile';
|
import FacePile from 'src/components/FacePile';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import FaveStar from 'src/components/FaveStar';
|
import FaveStar from 'src/components/FaveStar';
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import markdownSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/mar
|
|||||||
import jsonSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/json';
|
import jsonSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/json';
|
||||||
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
|
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
|
||||||
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
|
||||||
import { ToastProps } from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
|
import { ToastProps } from 'src/components/MessageToasts/withToasts';
|
||||||
import copyTextToClipboard from 'src/utils/copy';
|
import copyTextToClipboard from 'src/utils/copy';
|
||||||
|
|
||||||
SyntaxHighlighter.registerLanguage('sql', sqlSyntax);
|
SyntaxHighlighter.registerLanguage('sql', sqlSyntax);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import Loading from 'src/components/Loading';
|
|||||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||||
import { createErrorHandler } from 'src/views/CRUD/utils';
|
import { createErrorHandler } from 'src/views/CRUD/utils';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||||
import DeleteModal from 'src/components/DeleteModal';
|
import DeleteModal from 'src/components/DeleteModal';
|
||||||
import { Tooltip } from 'src/components/Tooltip';
|
import { Tooltip } from 'src/components/Tooltip';
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import Modal from 'src/components/Modal';
|
|||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import IconButton from 'src/components/IconButton';
|
import IconButton from 'src/components/IconButton';
|
||||||
import InfoTooltip from 'src/components/InfoTooltip';
|
import InfoTooltip from 'src/components/InfoTooltip';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import {
|
import {
|
||||||
testDatabaseConnection,
|
testDatabaseConnection,
|
||||||
useSingleViewResource,
|
useSingleViewResource,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
|||||||
import { isEmpty, isNil } from 'lodash';
|
import { isEmpty, isNil } from 'lodash';
|
||||||
import Modal from 'src/components/Modal';
|
import Modal from 'src/components/Modal';
|
||||||
import TableSelector from 'src/components/TableSelector';
|
import TableSelector from 'src/components/TableSelector';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
|
|
||||||
type DatasetAddObject = {
|
type DatasetAddObject = {
|
||||||
id: number;
|
id: number;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import SubMenu, {
|
|||||||
} from 'src/components/Menu/SubMenu';
|
} from 'src/components/Menu/SubMenu';
|
||||||
import { commonMenuData } from 'src/views/CRUD/data/common';
|
import { commonMenuData } from 'src/views/CRUD/data/common';
|
||||||
import Owner from 'src/types/Owner';
|
import Owner from 'src/types/Owner';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { Tooltip } from 'src/components/Tooltip';
|
import { Tooltip } from 'src/components/Tooltip';
|
||||||
import Icons from 'src/components/Icons';
|
import Icons from 'src/components/Icons';
|
||||||
import FacePile from 'src/components/FacePile';
|
import FacePile from 'src/components/FacePile';
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
createErrorHandler,
|
createErrorHandler,
|
||||||
shortenSQL,
|
shortenSQL,
|
||||||
} from 'src/views/CRUD/utils';
|
} from 'src/views/CRUD/utils';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||||
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
|
||||||
import Popover from 'src/components/Popover';
|
import Popover from 'src/components/Popover';
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ import { styled, t } from '@superset-ui/core';
|
|||||||
import Modal from 'src/components/Modal';
|
import Modal from 'src/components/Modal';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import withToasts, { ToastProps } from 'src/messageToasts/enhancers/withToasts';
|
import withToasts, {
|
||||||
|
ToastProps,
|
||||||
|
} from 'src/components/MessageToasts/withToasts';
|
||||||
import SyntaxHighlighterCopy from 'src/views/CRUD/data/components/SyntaxHighlighterCopy';
|
import SyntaxHighlighterCopy from 'src/views/CRUD/data/components/SyntaxHighlighterCopy';
|
||||||
import { useQueryPreviewState } from 'src/views/CRUD/data/hooks';
|
import { useQueryPreviewState } from 'src/views/CRUD/data/hooks';
|
||||||
import { QueryObject } from 'src/views/CRUD/types';
|
import { QueryObject } from 'src/views/CRUD/types';
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
createErrorHandler,
|
createErrorHandler,
|
||||||
} from 'src/views/CRUD/utils';
|
} from 'src/views/CRUD/utils';
|
||||||
import Popover from 'src/components/Popover';
|
import Popover from 'src/components/Popover';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||||
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
|
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
|
||||||
import handleResourceExport from 'src/utils/export';
|
import handleResourceExport from 'src/utils/export';
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ import { styled, t } from '@superset-ui/core';
|
|||||||
import Modal from 'src/components/Modal';
|
import Modal from 'src/components/Modal';
|
||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import SyntaxHighlighterCopy from 'src/views/CRUD/data/components/SyntaxHighlighterCopy';
|
import SyntaxHighlighterCopy from 'src/views/CRUD/data/components/SyntaxHighlighterCopy';
|
||||||
import withToasts, { ToastProps } from 'src/messageToasts/enhancers/withToasts';
|
import withToasts, {
|
||||||
|
ToastProps,
|
||||||
|
} from 'src/components/MessageToasts/withToasts';
|
||||||
import { useQueryPreviewState } from 'src/views/CRUD/data/hooks';
|
import { useQueryPreviewState } from 'src/views/CRUD/data/hooks';
|
||||||
|
|
||||||
const QueryTitle = styled.div`
|
const QueryTitle = styled.div`
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
setInLocalStorage,
|
setInLocalStorage,
|
||||||
getFromLocalStorage,
|
getFromLocalStorage,
|
||||||
} from 'src/utils/localStorageHelpers';
|
} from 'src/utils/localStorageHelpers';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
import { TableTabTypes } from 'src/views/CRUD/types';
|
import { TableTabTypes } from 'src/views/CRUD/types';
|
||||||
import PropertiesModal from 'src/explore/components/PropertiesModal';
|
import PropertiesModal from 'src/explore/components/PropertiesModal';
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ import {
|
|||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
} from 'src/views/CRUD/utils';
|
} from 'src/views/CRUD/utils';
|
||||||
import { HOMEPAGE_DASHBOARD_FILTER } from 'src/views/CRUD/storageKeys';
|
import { HOMEPAGE_DASHBOARD_FILTER } from 'src/views/CRUD/storageKeys';
|
||||||
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import Loading from 'src/components/Loading';
|
import Loading from 'src/components/Loading';
|
||||||
import PropertiesModal from 'src/dashboard/components/PropertiesModal';
|
import PropertiesModal from 'src/dashboard/components/PropertiesModal';
|
||||||
import DashboardCard from 'src/views/CRUD/dashboard/DashboardCard';
|
import DashboardCard from 'src/views/CRUD/dashboard/DashboardCard';
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import { t, SupersetClient, styled, useTheme } from '@superset-ui/core';
|
|||||||
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
|
||||||
import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql';
|
import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql';
|
||||||
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
|
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
|
||||||
import { LoadingCards } from 'src/views/CRUD/welcome/Welcome';
|
import { LoadingCards } from 'src/views/CRUD/welcome/Welcome';
|
||||||
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import { Dropdown, Menu } from 'src/common/components';
|
import { Dropdown, Menu } from 'src/common/components';
|
||||||
import { useListViewResource, copyQueryLink } from 'src/views/CRUD/hooks';
|
import { useListViewResource, copyQueryLink } from 'src/views/CRUD/hooks';
|
||||||
import ListViewCard from 'src/components/ListViewCard';
|
import ListViewCard from 'src/components/ListViewCard';
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
setInLocalStorage,
|
setInLocalStorage,
|
||||||
} from 'src/utils/localStorageHelpers';
|
} from 'src/utils/localStorageHelpers';
|
||||||
import ListViewCard from 'src/components/ListViewCard';
|
import ListViewCard from 'src/components/ListViewCard';
|
||||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||||
import {
|
import {
|
||||||
createErrorHandler,
|
createErrorHandler,
|
||||||
getRecentAcitivtyObjs,
|
getRecentAcitivtyObjs,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
|
import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
|
||||||
import thunk from 'redux-thunk';
|
import thunk from 'redux-thunk';
|
||||||
import messageToastReducer from 'src/messageToasts/reducers';
|
import messageToastReducer from 'src/components/MessageToasts/reducers';
|
||||||
import { initEnhancer } from 'src/reduxUtils';
|
import { initEnhancer } from 'src/reduxUtils';
|
||||||
import charts from 'src/chart/chartReducer';
|
import charts from 'src/chart/chartReducer';
|
||||||
import dataMask from 'src/dataMask/reducer';
|
import dataMask from 'src/dataMask/reducer';
|
||||||
|
|||||||
Reference in New Issue
Block a user