You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/08/16 19:59:59 UTC
[superset] branch master updated: chore: Removes src/modules top folder (#25005)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2eb0a255d9 chore: Removes src/modules top folder (#25005)
2eb0a255d9 is described below
commit 2eb0a255d9cc565664c3e9356e0716ec4d6535ce
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Aug 16 16:59:52 2023 -0300
chore: Removes src/modules top folder (#25005)
---
superset-frontend/src/components/Chart/chartAction.js | 4 +---
.../controls/AnnotationLayerControl/AnnotationLayer.jsx | 11 +++++------
.../controls/AnnotationLayerControl/AnnotationLayer.test.tsx | 2 +-
.../controls/AnnotationLayerControl}/AnnotationTypes.js | 0
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/superset-frontend/src/components/Chart/chartAction.js b/superset-frontend/src/components/Chart/chartAction.js
index c204d58ebe..7b4b70377b 100644
--- a/superset-frontend/src/components/Chart/chartAction.js
+++ b/superset-frontend/src/components/Chart/chartAction.js
@@ -35,8 +35,6 @@ import {
getQuerySettings,
getChartDataUri,
} from 'src/explore/exploreUtils';
-import { requiresQuery } from 'src/modules/AnnotationTypes';
-
import { addDangerToast } from 'src/components/MessageToasts/actions';
import { logEvent } from 'src/logger/actions';
import { Logger, LOG_ACTIONS_LOAD_CHART } from 'src/logger/LogUtils';
@@ -268,7 +266,7 @@ export function runAnnotationQuery({
...(formData || getState().charts[sliceKey].latestQueryFormData),
};
- if (!requiresQuery(annotation.sourceType)) {
+ if (!annotation.sourceType) {
return Promise.resolve();
}
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx
index d04b20cb0d..563b946823 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx
@@ -32,10 +32,13 @@ import {
getColumnLabel,
withTheme,
} from '@superset-ui/core';
-
import SelectControl from 'src/explore/components/controls/SelectControl';
import TextControl from 'src/explore/components/controls/TextControl';
import CheckboxControl from 'src/explore/components/controls/CheckboxControl';
+import PopoverSection from 'src/components/PopoverSection';
+import ControlHeader from 'src/explore/components/ControlHeader';
+import { EmptyStateSmall } from 'src/components/EmptyState';
+import { FILTER_OPTIONS_LIMIT } from 'src/explore/constants';
import {
ANNOTATION_SOURCE_TYPES,
ANNOTATION_TYPES,
@@ -43,11 +46,7 @@ import {
DEFAULT_ANNOTATION_TYPE,
requiresQuery,
ANNOTATION_SOURCE_TYPES_METADATA,
-} from 'src/modules/AnnotationTypes';
-import PopoverSection from 'src/components/PopoverSection';
-import ControlHeader from 'src/explore/components/ControlHeader';
-import { EmptyStateSmall } from 'src/components/EmptyState';
-import { FILTER_OPTIONS_LIMIT } from 'src/explore/constants';
+} from './AnnotationTypes';
const AUTOMATIC_COLOR = '';
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.test.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.test.tsx
index c1969769e6..914be73619 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.test.tsx
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.test.tsx
@@ -22,7 +22,7 @@ import userEvent from '@testing-library/user-event';
import { getChartMetadataRegistry, ChartMetadata } from '@superset-ui/core';
import fetchMock from 'fetch-mock';
import setupColors from 'src/setup/setupColors';
-import { ANNOTATION_TYPES_METADATA } from 'src/modules/AnnotationTypes';
+import { ANNOTATION_TYPES_METADATA } from './AnnotationTypes';
import AnnotationLayer from './AnnotationLayer';
const defaultProps = {
diff --git a/superset-frontend/src/modules/AnnotationTypes.js b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.js
similarity index 100%
rename from superset-frontend/src/modules/AnnotationTypes.js
rename to superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.js