You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/06/29 21:55:33 UTC

[superset] branch generate_screenshots_custom_width updated (74cecb1f8b -> 042009351f)

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

beto pushed a change to branch generate_screenshots_custom_width
in repository https://gitbox.apache.org/repos/asf/superset.git


    omit 74cecb1f8b feat: screenshot reports with custom width
     add 5c4324f773 fix: heads
     new 042009351f feat: screenshot reports with custom width

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (74cecb1f8b)
            \
             N -- N -- N   refs/heads/generate_screenshots_custom_width (042009351f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


[superset] 01/01: feat: screenshot reports with custom width

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

beto pushed a commit to branch generate_screenshots_custom_width
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 042009351fffff5d751bed15a1044978c5d02a6d
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Wed Jun 28 19:39:27 2023 -0700

    feat: screenshot reports with custom width
---
 superset/reports/commands/execute.py | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/superset/reports/commands/execute.py b/superset/reports/commands/execute.py
index bb7c53ed5e..c499741b08 100644
--- a/superset/reports/commands/execute.py
+++ b/superset/reports/commands/execute.py
@@ -206,18 +206,29 @@ class BaseReportState:
             model=self._report_schedule,
         )
         user = security_manager.find_user(username)
+
         if self._report_schedule.chart:
+            window_width, window_height = app.config["WEBDRIVER_WINDOW"]["slice"]
+            window_size = (
+                self._report_schedule.custom_width or window_width,
+                self._report_schedule.custom_height or window_height,
+            )
             screenshot: Union[ChartScreenshot, DashboardScreenshot] = ChartScreenshot(
                 url,
                 self._report_schedule.chart.digest,
-                window_size=app.config["WEBDRIVER_WINDOW"]["slice"],
+                window_size=window_size,
                 thumb_size=app.config["WEBDRIVER_WINDOW"]["slice"],
             )
         else:
+            window_width, window_height = app.config["WEBDRIVER_WINDOW"]["dashboard"]
+            window_size = (
+                self._report_schedule.custom_width or window_width,
+                self._report_schedule.custom_height or window_height,
+            )
             screenshot = DashboardScreenshot(
                 url,
                 self._report_schedule.dashboard.digest,
-                window_size=app.config["WEBDRIVER_WINDOW"]["dashboard"],
+                window_size=window_size,
                 thumb_size=app.config["WEBDRIVER_WINDOW"]["dashboard"],
             )
         try: