You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/07/29 19:19:41 UTC

[superset] branch hugh/fix-report-header created (now 595c7c4)

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

hugh pushed a change to branch hugh/fix-report-header
in repository https://gitbox.apache.org/repos/asf/superset.git.


      at 595c7c4  create new setting for reports

This branch includes the following new commits:

     new 1f02d65  Merge branch 'master' of https://github.com/apache/superset
     new af5e3d3  Merge branch 'master' of https://github.com/apache/superset
     new 595c7c4  create new setting for reports

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.


[superset] 02/03: Merge branch 'master' of https://github.com/apache/superset

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

hugh pushed a commit to branch hugh/fix-report-header
in repository https://gitbox.apache.org/repos/asf/superset.git

commit af5e3d32ef800dbb8f5907b0fbaad3d61eee175b
Merge: 1f02d65 bfe7eb9
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Jul 28 15:01:47 2021 -0400

    Merge branch 'master' of https://github.com/apache/superset

 .pylintrc                                          |   2 +-
 .../DatabaseModal/DatabaseConnectionForm.tsx       | 132 +++++++++++++++--
 .../CRUD/data/database/DatabaseModal/index.tsx     | 162 ++++++++++++++++++---
 .../CRUD/data/database/DatabaseModal/styles.ts     |  40 +++++
 .../src/views/CRUD/data/database/types.ts          |  13 +-
 superset-frontend/src/views/CRUD/hooks.ts          |  13 +-
 superset/databases/commands/validate.py            |  11 +-
 superset/db_engine_specs/gsheets.py                |  86 ++++++++++-
 tests/integration_tests/databases/api_tests.py     |  14 ++
 tests/unit_tests/db_engine_specs/test_gsheets.py   |  85 +++++------
 10 files changed, 464 insertions(+), 94 deletions(-)


[superset] 01/03: Merge branch 'master' of https://github.com/apache/superset

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

hugh pushed a commit to branch hugh/fix-report-header
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 1f02d6516c5ef4b6a9befaaf535d5ed342e6976a
Merge: 2d2bc5b 3f6c81b
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Jul 28 14:37:44 2021 -0400

    Merge branch 'master' of https://github.com/apache/superset

 Makefile                                           |   3 +
 superset-frontend/package-lock.json                | 630 ++++++++++-----------
 superset-frontend/package.json                     |  56 +-
 superset-frontend/src/CRUD/CollectionTable.tsx     |  76 ++-
 .../src/addSlice/AddSliceContainer.tsx             |   2 +-
 .../src/components/CronPicker/CronPicker.tsx       |   4 +-
 .../src/explore/components/ExploreChartPanel.jsx   |  31 +-
 .../explore/components/PropertiesModal/index.tsx   |  23 +-
 .../controls/DatasourceControl/index.jsx           |  19 +-
 .../VizTypeControl/VizTypeControl.test.tsx         |   4 +-
 .../controls/VizTypeControl/VizTypeGallery.tsx     |  57 +-
 superset-frontend/src/types/Chart.ts               |   1 +
 .../src/views/CRUD/alert/AlertReportModal.test.jsx |  28 +-
 .../src/views/CRUD/alert/AlertReportModal.tsx      |  75 ++-
 superset-frontend/src/views/CRUD/alert/types.ts    |   4 +-
 superset/annotation_layers/annotations/api.py      |   4 +-
 superset/charts/api.py                             |   6 +-
 superset/charts/commands/exceptions.py             |  23 +-
 superset/charts/schemas.py                         |   3 +
 superset/common/query_context.py                   | 281 +++++----
 superset/common/query_object.py                    |  10 +
 superset/common/utils.py                           | 179 ++++++
 superset/connectors/sqla/models.py                 |   2 +-
 superset/constants.py                              |  19 +
 superset/dashboards/api.py                         |   6 +-
 superset/examples/birth_names.py                   |   5 +-
 superset/models/reports.py                         |   2 +
 superset/models/slice.py                           |   1 +
 superset/reports/api.py                            |   4 +
 superset/reports/commands/execute.py               |  46 +-
 superset/reports/logs/api.py                       |   4 +-
 superset/reports/notifications/base.py             |   1 +
 superset/reports/notifications/email.py            |  14 +-
 superset/reports/schemas.py                        |   3 +
 superset/tasks/cron_util.py                        |  42 ++
 superset/tasks/scheduler.py                        |  20 +-
 superset/utils/core.py                             |   2 +
 superset/utils/date_parser.py                      |  58 +-
 superset/utils/decorators.py                       |   2 +-
 superset/utils/pandas_postprocessing.py            |  76 ++-
 superset/views/api.py                              |   4 +-
 tests/integration_tests/fixtures/dataframes.py     |   9 +
 tests/integration_tests/fixtures/query_context.py  |  16 +-
 .../pandas_postprocessing_tests.py                 |  59 ++
 tests/integration_tests/query_context_tests.py     | 103 ++++
 tests/integration_tests/reports/api_tests.py       |  68 ++-
 tests/integration_tests/reports/commands_tests.py  | 136 ++++-
 tests/integration_tests/reports/scheduler_tests.py |  73 ++-
 tests/integration_tests/reports/utils.py           |   2 +
 tests/integration_tests/utils/date_parser_tests.py |  43 +-
 tests/unit_tests/tasks/test_cron_util.py           | 177 ++++++
 51 files changed, 1833 insertions(+), 683 deletions(-)

[superset] 03/03: create new setting for reports

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

hugh pushed a commit to branch hugh/fix-report-header
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 595c7c45aad5ce8e36c18cfd484e63db49253e20
Author: hughhhh <hu...@gmail.com>
AuthorDate: Thu Jul 29 15:18:27 2021 -0400

    create new setting for reports
---
 .../src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx  | 6 ++++--
 superset-frontend/src/dashboard/util/constants.ts                   | 1 +
 superset/utils/webdriver.py                                         | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
index 552266f..c3d3fbf 100644
--- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
+++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
@@ -180,8 +180,10 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
       ? dashboardLayout[rootChildId]
       : undefined;
   const isStandalone = getUrlParam(URL_PARAMS.standalone);
+  console.log(isStandalone);
+  const isReport = isStandalone === DashboardStandaloneMode.REPORT;
   const hideDashboardHeader =
-    isStandalone === DashboardStandaloneMode.HIDE_NAV_AND_TITLE;
+    isStandalone === DashboardStandaloneMode.HIDE_NAV_AND_TITLE || isReport;
 
   const barTopOffset =
     (hideDashboardHeader ? 0 : HEADER_HEIGHT) +
@@ -253,7 +255,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
             <div>
               {!hideDashboardHeader && <DashboardHeader />}
               {dropIndicatorProps && <div {...dropIndicatorProps} />}
-              {topLevelTabs && (
+              {!isReport && topLevelTabs && (
                 <WithPopoverMenu
                   shouldFocus={shouldFocusTabs}
                   menuItems={[
diff --git a/superset-frontend/src/dashboard/util/constants.ts b/superset-frontend/src/dashboard/util/constants.ts
index 917ea36..6fd6247 100644
--- a/superset-frontend/src/dashboard/util/constants.ts
+++ b/superset-frontend/src/dashboard/util/constants.ts
@@ -73,4 +73,5 @@ export const ALL_FILTERS_ROOT = 'ALL_FILTERS_ROOT';
 export enum DashboardStandaloneMode {
   HIDE_NAV = 1,
   HIDE_NAV_AND_TITLE = 2,
+  REPORT = 3,
 }
diff --git a/superset/utils/webdriver.py b/superset/utils/webdriver.py
index 732f52a..3ef3eb1 100644
--- a/superset/utils/webdriver.py
+++ b/superset/utils/webdriver.py
@@ -97,6 +97,7 @@ class WebDriverProxy:
         self, url: str, element_name: str, user: "User",
     ) -> Optional[bytes]:
 
+        url = f"{url}?standalone=3"
         driver = self.auth(user)
         driver.set_window_size(*self._window)
         driver.get(url)
@@ -125,7 +126,7 @@ class WebDriverProxy:
             ]
             logger.debug("Wait %i seconds for chart animation", selenium_animation_wait)
             sleep(selenium_animation_wait)
-            logger.info("Taking a PNG screenshot or url %s", url)
+            logger.info("Taking a PNG screenshot or url %s", f"{url}")
             img = element.screenshot_as_png
         except TimeoutException:
             logger.warning("Selenium timed out requesting url %s", url, exc_info=True)