pkdotson commented on a change in pull request #12006:
URL:
https://github.com/apache/incubator-superset/pull/12006#discussion_r541452647
##########
File path: superset-frontend/src/datasource/ChangeDatasourceModal.tsx
##########
@@ -20,25 +20,46 @@ import React, {
FunctionComponent,
useState,
useRef,
- useMemo,
useEffect,
+ useCallback,
} from 'react';
import { Alert, FormControl, FormControlProps } from 'react-bootstrap';
-import { SupersetClient, t } from '@superset-ui/core';
+import { SupersetClient, t, styled } from '@superset-ui/core';
import TableView from 'src/components/TableView';
-import Modal from 'src/common/components/Modal';
+import StyledModal from 'src/common/components/Modal';
+import Button from 'src/components/Button';
+import { useListViewResource } from 'src/views/CRUD/hooks';
+import Dataset from 'src/types/Dataset';
import { getClientErrorObject } from '../utils/getClientErrorObject';
import Loading from '../components/Loading';
import withToasts from '../messageToasts/enhancers/withToasts';
+const CONFIRM_WARNING_MESSAGE = t(
+ 'Warning! Changing the dataset may break the chart if the metadata does not
exist in the target dataset',
+);
+
interface ChangeDatasourceModalProps {
addDangerToast: (msg: string) => void;
- onChange: (id: number) => void;
+ addSuccessToast: (msg: string) => void;
+ onChange: (uid: string) => void;
onDatasourceSave: (datasource: object, errors?: Array<any>) => {};
onHide: () => void;
show: boolean;
}
+const ConfirmModalStyled = styled.div`
+ .btn-container {
+ display: flex;
+ justify-content: flex-end;
+ padding: 0px 15px;
Review comment:
might be able to use some of the theme gridunits here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]