Skip to content

Commit

Permalink
chore: Organizes the files of the ReportModal feature
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Aug 21, 2023
1 parent 5e56871 commit c58c371
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/spec/helpers/reducerIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import saveModal from 'src/explore/reducers/saveModalReducer';
import explore from 'src/explore/reducers/exploreReducer';
import sqlLab from 'src/SqlLab/reducers/sqlLab';
import localStorageUsageInKilobytes from 'src/SqlLab/reducers/localStorageUsage';
import reports from 'src/reports/reducers/reports';
import reports from 'src/features/reports/ReportModal/reducer';
import getBootstrapData from 'src/utils/getBootstrapData';

const impressionId = (state = '') => state;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const createProps = () => ({
fetchFaveStar: jest.fn(),
fetchCharts: jest.fn(),
onRefresh: jest.fn(),
fetchUISpecificReport: jest.fn(),
saveFaveStar: jest.fn(),
savePublished: jest.fn(),
isPublished: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import ShareMenuItems from 'src/dashboard/components/menu/ShareMenuItems';
import CssEditor from 'src/dashboard/components/CssEditor';
import RefreshIntervalModal from 'src/dashboard/components/RefreshIntervalModal';
import SaveModal from 'src/dashboard/components/SaveModal';
import HeaderReportDropdown from 'src/components/ReportModal/HeaderReportDropdown';
import HeaderReportDropdown from 'src/features/reports/ReportModal/HeaderReportDropdown';
import injectCustomCss from 'src/dashboard/util/injectCustomCss';
import { SAVE_TYPE_NEWDASHBOARD } from 'src/dashboard/util/constants';
import FilterScopeModal from 'src/dashboard/components/filterscope/FilterScopeModal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import {

import { logEvent } from 'src/logger/actions';
import { DASHBOARD_HEADER_ID } from 'src/dashboard/util/constants';
import { fetchUISpecificReport } from 'src/reports/actions/reports';

function mapStateToProps({
dashboardLayout: undoableLayout,
Expand Down Expand Up @@ -130,7 +129,6 @@ function mapDispatchToProps(dispatch) {
dashboardInfoChanged,
dashboardTitleChanged,
updateDataMask,
fetchUISpecificReport,
},
dispatch,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { exportChart, getChartKey } from 'src/explore/exploreUtils';
import downloadAsImage from 'src/utils/downloadAsImage';
import { getChartPermalink } from 'src/utils/urlUtils';
import copyTextToClipboard from 'src/utils/copy';
import HeaderReportDropDown from 'src/components/ReportModal/HeaderReportDropdown';
import HeaderReportDropDown from 'src/features/reports/ReportModal/HeaderReportDropdown';
import ViewQueryModal from '../controls/ViewQueryModal';
import EmbedCodeContent from '../EmbedCodeContent';
import DashboardsSubMenu from './DashboardsSubMenu';
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/features/alerts/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import Owner from 'src/types/Owner';
import { AntdCheckbox, AsyncSelect, Select } from 'src/components';
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
import { useCommonConf } from 'src/features/databases/state';
import { CustomWidthHeaderStyle } from 'src/components/ReportModal/styles';
import { CustomWidthHeaderStyle } from 'src/features/reports/ReportModal/styles';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
import {
NotificationMethodOption,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/features/alerts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import Owner from 'src/types/Owner';
import { NOTIFICATION_FORMATS } from 'src/reports/types';
import { NOTIFICATION_FORMATS } from 'src/features/reports/types';

type user = {
id: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ import Checkbox from 'src/components/Checkbox';
import { noOp } from 'src/utils/common';
import { NoAnimationDropdown } from 'src/components/Dropdown';
import DeleteModal from 'src/components/DeleteModal';
import ReportModal from 'src/components/ReportModal';
import ReportModal from 'src/features/reports/ReportModal';
import { ChartState } from 'src/explore/types';
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
import {
fetchUISpecificReport,
toggleActive,
deleteActiveReport,
} from 'src/reports/actions/reports';
} from 'src/features/reports/ReportModal/actions';
import { reportSelector } from 'src/views/CRUD/hooks';
import { MenuItemWithCheckboxContainer } from 'src/explore/components/useExploreAdditionalActionsMenu/index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import sinon from 'sinon';
import fetchMock from 'fetch-mock';
import { render, screen, waitFor } from 'spec/helpers/testing-library';
import * as uiCore from '@superset-ui/core';
import * as actions from 'src/reports/actions/reports';
import * as actions from 'src/features/reports/ReportModal/actions';
import { FeatureFlag } from '@superset-ui/core';
import ReportModal from '.';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import React, {
import { t, SupersetTheme } from '@superset-ui/core';
import { useDispatch, useSelector } from 'react-redux';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import { addReport, editReport } from 'src/reports/actions/reports';
import {
addReport,
editReport,
} from 'src/features/reports/ReportModal/actions';
import Alert from 'src/components/Alert';
import TimezoneSelector from 'src/components/TimezoneSelector';
import LabeledErrorBoundInput from 'src/components/Form/LabeledErrorBoundInput';
Expand All @@ -40,7 +43,7 @@ import {
ReportCreationMethod,
ReportObject,
NOTIFICATION_FORMATS,
} from 'src/reports/types';
} from 'src/features/reports/types';
import { reportSelector } from 'src/views/CRUD/hooks';
import {
TRANSLATIONS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@
/* eslint-disable camelcase */
// eslint-disable-next-line import/no-extraneous-dependencies
import { omit } from 'lodash';
import {
SET_REPORT,
ADD_REPORT,
EDIT_REPORT,
DELETE_REPORT,
} from '../actions/reports';
import { SET_REPORT, ADD_REPORT, EDIT_REPORT, DELETE_REPORT } from './actions';

export default function reportsReducer(state = {}, action) {
const actionHandlers = {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Select from 'src/components/Select/Select';
import AsyncSelect from 'src/components/Select/AsyncSelect';
import rison from 'rison';
import { LabeledErrorBoundInput } from 'src/components/Form';
import { noBottomMargin } from 'src/components/ReportModal/styles';
import { noBottomMargin } from 'src/features/reports/ReportModal/styles';
import InfoTooltip from 'src/components/InfoTooltip';
import { useSingleViewResource } from 'src/views/CRUD/hooks';
import { FilterOptions } from './constants';
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { api } from 'src/hooks/apiResources/queryApi';
import messageToastReducer from 'src/components/MessageToasts/reducers';
import charts from 'src/components/Chart/chartReducer';
import dataMask from 'src/dataMask/reducer';
import reports from 'src/reports/reducers/reports';
import reports from 'src/features/reports/ReportModal/reducer';
import dashboardInfo from 'src/dashboard/reducers/dashboardInfo';
import dashboardState from 'src/dashboard/reducers/dashboardState';
import dashboardFilters from 'src/dashboard/reducers/dashboardFilters';
Expand Down

0 comments on commit c58c371

Please sign in to comment.