You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ms...@apache.org on 2026/07/21 13:16:28 UTC

(superset) branch msyavuz/fix/chart-stop-query created (now 8346c346c31)

This is an automated email from the ASF dual-hosted git repository.

msyavuz pushed a change to branch msyavuz/fix/chart-stop-query
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 8346c346c31 fix(explore): render stopped state when a chart query is cancelled

This branch includes the following new commits:

     new 8346c346c31 fix(explore): render stopped state when a chart query is cancelled

The 1 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.



(superset) 01/01: fix(explore): render stopped state when a chart query is cancelled

Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

msyavuz pushed a commit to branch msyavuz/fix/chart-stop-query
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 8346c346c31cf1c2bb8c24bb90afa7196d14d5f5
Author: Mehmet Salih Yavuz <sa...@proton.me>
AuthorDate: Tue Jul 21 16:16:17 2026 +0300

    fix(explore): render stopped state when a chart query is cancelled
---
 .../src/components/Chart/Chart.test.tsx            | 16 +++++++++++++++
 superset-frontend/src/components/Chart/Chart.tsx   | 24 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/superset-frontend/src/components/Chart/Chart.test.tsx b/superset-frontend/src/components/Chart/Chart.test.tsx
index 53028d2d1e9..f23edd06a63 100644
--- a/superset-frontend/src/components/Chart/Chart.test.tsx
+++ b/superset-frontend/src/components/Chart/Chart.test.tsx
@@ -86,3 +86,19 @@ test('shows loading spinner for client-side errors without errors array when dat
   expect(screen.getByRole('status')).toBeInTheDocument();
   expect(screen.queryByText(/Some client-side error/)).not.toBeInTheDocument();
 });
+
+test('shows the stop message and a re-run affordance when the query was stopped', () => {
+  const onQuery = jest.fn();
+  render(
+    <Chart
+      {...baseProps}
+      chartStatus="stopped"
+      chartAlert="Updating chart was stopped"
+      onQuery={onQuery}
+    />,
+  );
+
+  expect(screen.getByText('Updating chart was stopped')).toBeInTheDocument();
+  screen.getByText('click here').click();
+  expect(onQuery).toHaveBeenCalledTimes(1);
+});
diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx
index 2fcdeb6c7f4..4ae58a9d635 100644
--- a/superset-frontend/src/components/Chart/Chart.tsx
+++ b/superset-frontend/src/components/Chart/Chart.tsx
@@ -440,6 +440,30 @@ function Chart({
     );
   }
 
+  if (chartStatus === 'stopped') {
+    return (
+      <EmptyState
+        size="large"
+        title={chartAlert || t('Updating chart was stopped')}
+        description={
+          <span>
+            {t('Run a new query using the "Update chart" button or')}{' '}
+            <span
+              role="button"
+              tabIndex={0}
+              onClick={onQuery}
+              onKeyDown={handleKeyboardActivation(() => onQuery?.())}
+            >
+              {t('click here')}
+            </span>
+            .
+          </span>
+        }
+        image="chart.svg"
+      />
+    );
+  }
+
   if (errorMessage && ensureIsArray(queriesResponse).length === 0) {
     return (
       <EmptyState