mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
chore(sqllab): Relocate user in SqlLab to root (#25010)
This commit is contained in:
@@ -41,7 +41,7 @@ describe('QueryTable', () => {
|
||||
it('renders a proper table', () => {
|
||||
const mockStore = configureStore([thunk]);
|
||||
const store = mockStore({
|
||||
sqlLab: user,
|
||||
user,
|
||||
});
|
||||
|
||||
const wrapper = mount(
|
||||
|
||||
@@ -105,7 +105,7 @@ const QueryTable = ({
|
||||
[columns],
|
||||
);
|
||||
|
||||
const user = useSelector<SqlLabRootState, User>(state => state.sqlLab.user);
|
||||
const user = useSelector<SqlLabRootState, User>(state => state.user);
|
||||
|
||||
const data = useMemo(() => {
|
||||
const restoreSql = (query: QueryResponse) => {
|
||||
|
||||
@@ -42,8 +42,6 @@ import {
|
||||
DatasetRadioState,
|
||||
EXPLORE_CHART_DEFAULT,
|
||||
DatasetOwner,
|
||||
SqlLabExploreRootState,
|
||||
getInitialState,
|
||||
SqlLabRootState,
|
||||
} from 'src/SqlLab/types';
|
||||
import { mountExploreUrl } from 'src/explore/exploreUtils';
|
||||
@@ -177,9 +175,7 @@ export const SaveDatasetModal = ({
|
||||
>(undefined);
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
|
||||
const user = useSelector<SqlLabExploreRootState, User>(user =>
|
||||
getInitialState(user),
|
||||
);
|
||||
const user = useSelector<SqlLabRootState, User>(state => state.user);
|
||||
const dispatch = useDispatch<(dispatch: any) => Promise<JsonObject>>();
|
||||
|
||||
const createWindow = (url: string) => {
|
||||
|
||||
@@ -107,8 +107,8 @@ const SouthPane = ({
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const { editorQueries, dataPreviewQueries, databases, offline, user } =
|
||||
useSelector(({ sqlLab }: SqlLabRootState) => {
|
||||
const { databases, offline, user, queries, tables } = sqlLab;
|
||||
useSelector(({ user, sqlLab }: SqlLabRootState) => {
|
||||
const { databases, offline, queries, tables } = sqlLab;
|
||||
const dataPreviewQueries = tables
|
||||
.filter(
|
||||
({ dataPreviewQueryId, queryEditorId: qeId }) =>
|
||||
|
||||
Reference in New Issue
Block a user