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/09/06 13:50:48 UTC
[superset] branch 3.0 updated (90a66ee76c -> d8c72b86bc)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a change to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
from 90a66ee76c chore: Add a note about adhoc subqueries in UPDATING.md (#25161)
new e77bc066bd fix: Issue #24493; Resolved report selection menu in chart and dashboard page (#25157)
new 408708be62 fix: DML failures in SQL Lab (#25190)
new d8c72b86bc fix: All values being selected in Select (#25202)
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../ReportModal/HeaderReportDropdown/index.tsx | 3 ++-
superset-frontend/src/components/Select/Select.tsx | 4 ++--
.../useExploreAdditionalActionsMenu/index.jsx | 18 ++----------------
superset/sql_lab.py | 10 ++++++++--
4 files changed, 14 insertions(+), 21 deletions(-)
[superset] 02/03: fix: DML failures in SQL Lab (#25190)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 408708be629b67cd2121287450dfc37a68e24a22
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Wed Sep 6 14:41:36 2023 +0200
fix: DML failures in SQL Lab (#25190)
(cherry picked from commit d8496425e26449b4519bc3afac7be3db2434a7fd)
---
superset/sql_lab.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index 153f027fa0..afc682b10f 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -217,6 +217,7 @@ def execute_sql_statement( # pylint: disable=too-many-arguments,too-many-statem
)
sql = parsed_query.stripped()
+
# This is a test to see if the query is being
# limited by either the dropdown or the sql.
# We are testing to see if more rows exist than the limit.
@@ -512,8 +513,13 @@ def execute_sql_statements(
ex, query, session, payload, prefix_message
)
return payload
- # Commit the connection so CTA queries will create the table.
- if apply_ctas:
+
+ # Commit the connection so CTA queries will create the table and any DML.
+ should_commit = (
+ not db_engine_spec.is_select_query(parsed_query) # check if query is DML
+ or apply_ctas
+ )
+ if should_commit:
conn.commit()
# Success, updating the query entry in database
[superset] 03/03: fix: All values being selected in Select (#25202)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit d8c72b86bc6c1dfe461f4593a1eb1538c93c7e4e
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Sep 6 10:37:21 2023 -0300
fix: All values being selected in Select (#25202)
(cherry picked from commit e605d6dddff489b84d6bd739ad115e41f382ca62)
---
superset-frontend/src/components/Select/Select.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/components/Select/Select.tsx b/superset-frontend/src/components/Select/Select.tsx
index 770ef1df4a..89c62ef8bd 100644
--- a/superset-frontend/src/components/Select/Select.tsx
+++ b/superset-frontend/src/components/Select/Select.tsx
@@ -208,13 +208,13 @@ const Select = forwardRef(
() =>
!isSingleMode &&
allowSelectAll &&
- fullSelectOptions.length > 0 &&
+ selectOptions.length > 0 &&
enabledOptions.length > 1 &&
!inputValue,
[
isSingleMode,
allowSelectAll,
- fullSelectOptions.length,
+ selectOptions.length,
enabledOptions.length,
inputValue,
],
[superset] 01/03: fix: Issue #24493; Resolved report selection menu in chart and dashboard page (#25157)
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit e77bc066bd1158113c4f1e72824f065ae8099929
Author: Sandeep Patel <33...@users.noreply.github.com>
AuthorDate: Tue Sep 5 19:40:42 2023 +0530
fix: Issue #24493; Resolved report selection menu in chart and dashboard page (#25157)
(cherry picked from commit d0305445b2782264834821c3f1276d74c1b5f99f)
---
.../ReportModal/HeaderReportDropdown/index.tsx | 3 ++-
.../useExploreAdditionalActionsMenu/index.jsx | 18 ++----------------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx b/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx
index b2e47cc53c..4f560a2294 100644
--- a/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx
+++ b/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx
@@ -114,6 +114,7 @@ export default function HeaderReportDropDown({
setShowReportSubMenu,
setIsDropdownVisible,
isDropdownVisible,
+ ...rest
}: HeaderReportProps) {
const dispatch = useDispatch();
const report = useSelector<any, AlertObject>(state => {
@@ -214,7 +215,7 @@ export default function HeaderReportDropDown({
const textMenu = () =>
isEmpty(report) ? (
- <Menu selectable={false} css={onMenuHover}>
+ <Menu selectable={false} {...rest} css={onMenuHover}>
<Menu.Item onClick={handleShowMenu}>
{DropdownItemExtension ? (
<StyledDropdownItemWithIcon>
diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx
index 9dd0bc0ef0..f153b5f3bd 100644
--- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx
+++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx
@@ -114,12 +114,12 @@ export const useExploreAdditionalActionsMenu = (
onOpenPropertiesModal,
ownState,
dashboards,
+ ...rest
) => {
const theme = useTheme();
const { addDangerToast, addSuccessToast } = useToasts();
const [showReportSubMenu, setShowReportSubMenu] = useState(null);
const [isDropdownVisible, setIsDropdownVisible] = useState(false);
- const [openSubmenus, setOpenSubmenus] = useState([]);
const chart = useSelector(
state => state.charts?.[getChartKey(state.explore)],
);
@@ -204,23 +204,19 @@ export const useExploreAdditionalActionsMenu = (
case MENU_KEYS.EXPORT_TO_CSV:
exportCSV();
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.EXPORT_TO_CSV_PIVOTED:
exportCSVPivoted();
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.EXPORT_TO_JSON:
exportJson();
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.EXPORT_TO_XLSX:
exportExcel();
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.DOWNLOAD_AS_IMAGE:
downloadAsImage(
@@ -230,21 +226,17 @@ export const useExploreAdditionalActionsMenu = (
true,
)(domEvent);
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.COPY_PERMALINK:
copyLink();
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.EMBED_CODE:
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.SHARE_BY_EMAIL:
shareByEmail();
setIsDropdownVisible(false);
- setOpenSubmenus([]);
break;
case MENU_KEYS.VIEW_QUERY:
setIsDropdownVisible(false);
@@ -272,12 +264,7 @@ export const useExploreAdditionalActionsMenu = (
const menu = useMemo(
() => (
- <Menu
- onClick={handleMenuClick}
- selectable={false}
- openKeys={openSubmenus}
- onOpenChange={setOpenSubmenus}
- >
+ <Menu onClick={handleMenuClick} selectable={false} {...rest}>
<>
{slice && (
<Menu.Item key={MENU_KEYS.EDIT_PROPERTIES}>
@@ -423,7 +410,6 @@ export const useExploreAdditionalActionsMenu = (
handleMenuClick,
isDropdownVisible,
latestQueryFormData,
- openSubmenus,
showReportSubMenu,
slice,
theme.gridUnit,