You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/06/14 19:01:37 UTC

[GitHub] [superset] john-bodley commented on a diff in pull request #24373: Use static (uploaded) image as dashboard thumbnail

john-bodley commented on code in PR #24373:
URL: https://github.com/apache/superset/pull/24373#discussion_r1230043242


##########
superset/migrations/versions/2023-06-12_19-01_11ac45e193d3_added_static_image_for_dashboard_.py:
##########
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""added_static_image_for_dashboard_thumbnail
+
+Revision ID: 11ac45e193d3
+Revises: 4ea966691069
+Create Date: 2023-06-12 19:01:18.714940
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '11ac45e193d3'
+down_revision = '4ea966691069'
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    # ### commands auto generated by Alembic - please adjust! ###
+    op.add_column('dashboards', sa.Column('static_image', sa.String(), nullable=True))
+    # ### end Alembic commands ###
+
+def downgrade():
+    pass

Review Comment:
   Please add a downgrade which restores the table to its previous state.



##########
superset/config.py:
##########
@@ -436,13 +436,13 @@ class D3Format(TypedDict, total=False):
     # and doesn't work with all nested types.
     "PRESTO_EXPAND_DATA": False,
     # Exposes API endpoint to compute thumbnails
-    "THUMBNAILS": False,
+    "THUMBNAILS": True,

Review Comment:
   @dinesh-zemoso you probably don't want to change the default configuration. You can refer to the documentation in CONTRIBUTING.md regarding how to provide local overrides.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org