mirror of
https://github.com/apache/superset.git
synced 2026-05-01 22:14:23 +00:00
Compare commits
5 Commits
fix_sqllab
...
supersetbo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3fb775a17 | ||
|
|
604d72cc98 | ||
|
|
913e068113 | ||
|
|
1a4e2173f5 | ||
|
|
c49789167b |
@@ -20,6 +20,9 @@
|
|||||||
# If you choose to use this type of deployment make sure to
|
# If you choose to use this type of deployment make sure to
|
||||||
# create you own docker environment file (docker/.env) with your own
|
# create you own docker environment file (docker/.env) with your own
|
||||||
# unique random secure passwords and SECRET_KEY.
|
# unique random secure passwords and SECRET_KEY.
|
||||||
|
#
|
||||||
|
# For verbose logging during development:
|
||||||
|
# - Set SUPERSET_LOG_LEVEL=debug in docker/.env-local for detailed Superset logs
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
x-superset-image: &superset-image apachesuperset.docker.scarf.sh/apache/superset:${TAG:-latest-dev}
|
x-superset-image: &superset-image apachesuperset.docker.scarf.sh/apache/superset:${TAG:-latest-dev}
|
||||||
x-superset-volumes:
|
x-superset-volumes:
|
||||||
|
|||||||
157
docker-compose-light.yml
Normal file
157
docker-compose-light.yml
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# Lightweight docker-compose for running multiple Superset instances
|
||||||
|
# This includes only essential services: database, Redis, and Superset app
|
||||||
|
#
|
||||||
|
# IMPORTANT: To run multiple instances in parallel:
|
||||||
|
# - Use different project names: docker-compose -p project1 -f docker-compose-light.yml up
|
||||||
|
# - Use different NODE_PORT values: NODE_PORT=9002 docker-compose -p project2 -f docker-compose-light.yml up
|
||||||
|
# - Volumes are isolated by project name (e.g., project1_db_home_light, project2_db_home_light)
|
||||||
|
# - Database name is intentionally different (superset_light) to prevent accidental cross-connections
|
||||||
|
#
|
||||||
|
# For verbose logging during development:
|
||||||
|
# - Set SUPERSET_LOG_LEVEL=debug in docker/.env-local for detailed Superset logs
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
x-superset-user: &superset-user root
|
||||||
|
x-superset-volumes: &superset-volumes
|
||||||
|
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
|
||||||
|
- ./docker:/app/docker
|
||||||
|
- ./superset:/app/superset
|
||||||
|
- ./superset-frontend:/app/superset-frontend
|
||||||
|
- superset_home_light:/app/superset_home
|
||||||
|
- ./tests:/app/tests
|
||||||
|
x-common-build: &common-build
|
||||||
|
context: .
|
||||||
|
target: ${SUPERSET_BUILD_TARGET:-dev} # can use `dev` (default) or `lean`
|
||||||
|
cache_from:
|
||||||
|
- apache/superset-cache:3.10-slim-bookworm
|
||||||
|
args:
|
||||||
|
DEV_MODE: "true"
|
||||||
|
INCLUDE_CHROMIUM: ${INCLUDE_CHROMIUM:-false}
|
||||||
|
INCLUDE_FIREFOX: ${INCLUDE_FIREFOX:-false}
|
||||||
|
BUILD_TRANSLATIONS: ${BUILD_TRANSLATIONS:-false}
|
||||||
|
|
||||||
|
services:
|
||||||
|
db-light:
|
||||||
|
env_file:
|
||||||
|
- path: docker/.env # default
|
||||||
|
required: true
|
||||||
|
- path: docker/.env-local # optional override
|
||||||
|
required: false
|
||||||
|
image: postgres:16
|
||||||
|
restart: unless-stopped
|
||||||
|
# No host port mapping - only accessible within Docker network
|
||||||
|
volumes:
|
||||||
|
- db_home_light:/var/lib/postgresql/data
|
||||||
|
- ./docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
|
||||||
|
environment:
|
||||||
|
# Override database name to avoid conflicts
|
||||||
|
POSTGRES_DB: superset_light
|
||||||
|
|
||||||
|
superset-light:
|
||||||
|
env_file:
|
||||||
|
- path: docker/.env # default
|
||||||
|
required: true
|
||||||
|
- path: docker/.env-local # optional override
|
||||||
|
required: false
|
||||||
|
build:
|
||||||
|
<<: *common-build
|
||||||
|
command: ["/app/docker/docker-bootstrap.sh", "app"]
|
||||||
|
restart: unless-stopped
|
||||||
|
# No host port mapping - accessed via webpack dev server proxy
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
user: *superset-user
|
||||||
|
depends_on:
|
||||||
|
superset-init-light:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
volumes: *superset-volumes
|
||||||
|
environment:
|
||||||
|
# Override DB connection for light service
|
||||||
|
DATABASE_HOST: db-light
|
||||||
|
DATABASE_DB: superset_light
|
||||||
|
POSTGRES_DB: superset_light
|
||||||
|
EXAMPLES_HOST: db-light
|
||||||
|
EXAMPLES_DB: superset_light
|
||||||
|
EXAMPLES_USER: superset
|
||||||
|
EXAMPLES_PASSWORD: superset
|
||||||
|
# Use light-specific config that disables Redis
|
||||||
|
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
|
||||||
|
|
||||||
|
superset-init-light:
|
||||||
|
build:
|
||||||
|
<<: *common-build
|
||||||
|
command: ["/app/docker/docker-init.sh"]
|
||||||
|
env_file:
|
||||||
|
- path: docker/.env # default
|
||||||
|
required: true
|
||||||
|
- path: docker/.env-local # optional override
|
||||||
|
required: false
|
||||||
|
depends_on:
|
||||||
|
db-light:
|
||||||
|
condition: service_started
|
||||||
|
user: *superset-user
|
||||||
|
volumes: *superset-volumes
|
||||||
|
environment:
|
||||||
|
# Override DB connection for light service
|
||||||
|
DATABASE_HOST: db-light
|
||||||
|
DATABASE_DB: superset_light
|
||||||
|
POSTGRES_DB: superset_light
|
||||||
|
EXAMPLES_HOST: db-light
|
||||||
|
EXAMPLES_DB: superset_light
|
||||||
|
EXAMPLES_USER: superset
|
||||||
|
EXAMPLES_PASSWORD: superset
|
||||||
|
# Use light-specific config that disables Redis
|
||||||
|
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
|
||||||
|
healthcheck:
|
||||||
|
disable: true
|
||||||
|
|
||||||
|
superset-node-light:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
target: superset-node
|
||||||
|
args:
|
||||||
|
# This prevents building the frontend bundle since we'll mount local folder
|
||||||
|
# and build it on startup while firing docker-frontend.sh in dev mode, where
|
||||||
|
# it'll mount and watch local files and rebuild as you update them
|
||||||
|
DEV_MODE: "true"
|
||||||
|
BUILD_TRANSLATIONS: ${BUILD_TRANSLATIONS:-false}
|
||||||
|
environment:
|
||||||
|
# set this to false if you have perf issues running the npm i; npm run dev in-docker
|
||||||
|
# if you do so, you have to run this manually on the host, which should perform better!
|
||||||
|
BUILD_SUPERSET_FRONTEND_IN_DOCKER: true
|
||||||
|
NPM_RUN_PRUNE: false
|
||||||
|
SCARF_ANALYTICS: "${SCARF_ANALYTICS:-}"
|
||||||
|
# configuring the dev-server to use the host.docker.internal to connect to the backend
|
||||||
|
superset: "http://superset-light:8088"
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:${NODE_PORT:-9001}:9000" # Parameterized port
|
||||||
|
command: ["/app/docker/docker-frontend.sh"]
|
||||||
|
env_file:
|
||||||
|
- path: docker/.env # default
|
||||||
|
required: true
|
||||||
|
- path: docker/.env-local # optional override
|
||||||
|
required: false
|
||||||
|
volumes: *superset-volumes
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
superset_home_light:
|
||||||
|
external: false
|
||||||
|
db_home_light:
|
||||||
|
external: false
|
||||||
@@ -20,6 +20,9 @@
|
|||||||
# If you choose to use this type of deployment make sure to
|
# If you choose to use this type of deployment make sure to
|
||||||
# create you own docker environment file (docker/.env) with your own
|
# create you own docker environment file (docker/.env) with your own
|
||||||
# unique random secure passwords and SECRET_KEY.
|
# unique random secure passwords and SECRET_KEY.
|
||||||
|
#
|
||||||
|
# For verbose logging during development:
|
||||||
|
# - Set SUPERSET_LOG_LEVEL=debug in docker/.env-local for detailed Superset logs
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
x-superset-volumes:
|
x-superset-volumes:
|
||||||
&superset-volumes # /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
|
&superset-volumes # /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
# If you choose to use this type of deployment make sure to
|
# If you choose to use this type of deployment make sure to
|
||||||
# create you own docker environment file (docker/.env) with your own
|
# create you own docker environment file (docker/.env) with your own
|
||||||
# unique random secure passwords and SECRET_KEY.
|
# unique random secure passwords and SECRET_KEY.
|
||||||
|
#
|
||||||
|
# For verbose logging during development:
|
||||||
|
# - Set SUPERSET_LOG_LEVEL=debug in docker/.env-local for detailed Superset logs
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
x-superset-user: &superset-user root
|
x-superset-user: &superset-user root
|
||||||
x-superset-volumes: &superset-volumes
|
x-superset-volumes: &superset-volumes
|
||||||
|
|||||||
@@ -53,7 +53,12 @@ PYTHONPATH=/app/pythonpath:/app/docker/pythonpath_dev
|
|||||||
REDIS_HOST=redis
|
REDIS_HOST=redis
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
# Development and logging configuration
|
||||||
|
# FLASK_DEBUG: Enables Flask dev features (auto-reload, better error pages) - keep 'true' for development
|
||||||
FLASK_DEBUG=true
|
FLASK_DEBUG=true
|
||||||
|
# SUPERSET_LOG_LEVEL: Controls Superset application logging verbosity (debug, info, warning, error, critical)
|
||||||
|
SUPERSET_LOG_LEVEL=info
|
||||||
|
|
||||||
SUPERSET_APP_ROOT="/"
|
SUPERSET_APP_ROOT="/"
|
||||||
SUPERSET_ENV=development
|
SUPERSET_ENV=development
|
||||||
SUPERSET_LOAD_EXAMPLES=yes
|
SUPERSET_LOAD_EXAMPLES=yes
|
||||||
@@ -66,4 +71,3 @@ SUPERSET_SECRET_KEY=TEST_NON_DEV_SECRET
|
|||||||
ENABLE_PLAYWRIGHT=false
|
ENABLE_PLAYWRIGHT=false
|
||||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||||
BUILD_SUPERSET_FRONTEND_IN_DOCKER=true
|
BUILD_SUPERSET_FRONTEND_IN_DOCKER=true
|
||||||
SUPERSET_LOG_LEVEL=info
|
|
||||||
|
|||||||
1
docker/pythonpath_dev/.gitignore
vendored
1
docker/pythonpath_dev/.gitignore
vendored
@@ -20,4 +20,5 @@
|
|||||||
# DON'T ignore the .gitignore
|
# DON'T ignore the .gitignore
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!superset_config.py
|
!superset_config.py
|
||||||
|
!superset_config_docker_light.py
|
||||||
!superset_config_local.example
|
!superset_config_local.example
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ if os.getenv("CYPRESS_CONFIG") == "true":
|
|||||||
#
|
#
|
||||||
try:
|
try:
|
||||||
import superset_config_docker
|
import superset_config_docker
|
||||||
from superset_config_docker import * # noqa
|
from superset_config_docker import * # noqa: F403
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Loaded your Docker configuration at [{superset_config_docker.__file__}]"
|
f"Loaded your Docker configuration at [{superset_config_docker.__file__}]"
|
||||||
|
|||||||
37
docker/pythonpath_dev/superset_config_docker_light.py
Normal file
37
docker/pythonpath_dev/superset_config_docker_light.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# Configuration for docker-compose-light.yml - disables Redis and uses minimal services
|
||||||
|
|
||||||
|
# Import all settings from the main config first
|
||||||
|
from flask_caching.backends.filesystemcache import FileSystemCache
|
||||||
|
from superset_config import * # noqa: F403
|
||||||
|
|
||||||
|
# Override caching to use simple in-memory cache instead of Redis
|
||||||
|
RESULTS_BACKEND = FileSystemCache("/app/superset_home/sqllab")
|
||||||
|
|
||||||
|
CACHE_CONFIG = {
|
||||||
|
"CACHE_TYPE": "SimpleCache",
|
||||||
|
"CACHE_DEFAULT_TIMEOUT": 300,
|
||||||
|
"CACHE_KEY_PREFIX": "superset_light_",
|
||||||
|
}
|
||||||
|
DATA_CACHE_CONFIG = CACHE_CONFIG
|
||||||
|
THUMBNAIL_CACHE_CONFIG = CACHE_CONFIG
|
||||||
|
|
||||||
|
|
||||||
|
# Disable Celery entirely for lightweight mode
|
||||||
|
CELERY_CONFIG = None # type: ignore[assignment,misc]
|
||||||
@@ -26,11 +26,14 @@ Superset locally is using Docker Compose on a Linux or Mac OSX
|
|||||||
computer. Superset does not have official support for Windows. It's also the easiest
|
computer. Superset does not have official support for Windows. It's also the easiest
|
||||||
way to launch a fully functioning **development environment** quickly.
|
way to launch a fully functioning **development environment** quickly.
|
||||||
|
|
||||||
Note that there are 3 major ways we support to run `docker compose`:
|
Note that there are 4 major ways we support to run `docker compose`:
|
||||||
|
|
||||||
1. **docker-compose.yml:** for interactive development, where we mount your local folder with the
|
1. **docker-compose.yml:** for interactive development, where we mount your local folder with the
|
||||||
frontend/backend files that you can edit and experience the changes you
|
frontend/backend files that you can edit and experience the changes you
|
||||||
make in the app in real time
|
make in the app in real time
|
||||||
|
1. **docker-compose-light.yml:** a lightweight configuration with minimal services (database,
|
||||||
|
Superset app, and frontend dev server) for development. Uses in-memory caching instead of Redis
|
||||||
|
and is designed for running multiple instances simultaneously
|
||||||
1. **docker-compose-non-dev.yml** where we just build a more immutable image based on the
|
1. **docker-compose-non-dev.yml** where we just build a more immutable image based on the
|
||||||
local branch and get all the required images running. Changes in the local branch
|
local branch and get all the required images running. Changes in the local branch
|
||||||
at the time you fire this up will be reflected, but changes to the code
|
at the time you fire this up will be reflected, but changes to the code
|
||||||
@@ -44,7 +47,7 @@ Note that there are 3 major ways we support to run `docker compose`:
|
|||||||
The `dev` builds include the `psycopg2-binary` required to connect
|
The `dev` builds include the `psycopg2-binary` required to connect
|
||||||
to the Postgres database launched as part of the `docker compose` builds.
|
to the Postgres database launched as part of the `docker compose` builds.
|
||||||
|
|
||||||
More on these two approaches after setting up the requirements for either.
|
More on these approaches after setting up the requirements for either.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
@@ -103,13 +106,36 @@ and help you start fresh. In the context of `docker compose` setting
|
|||||||
from within docker. This will slow down the startup, but will fix various npm-related issues.
|
from within docker. This will slow down the startup, but will fix various npm-related issues.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Option #2 - build a set of immutable images from the local branch
|
### Option #2 - lightweight development with multiple instances
|
||||||
|
|
||||||
|
For a lighter development setup that uses fewer resources and supports running multiple instances:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Single lightweight instance (default port 9001)
|
||||||
|
docker compose -f docker-compose-light.yml up
|
||||||
|
|
||||||
|
# Multiple instances with different ports
|
||||||
|
NODE_PORT=9001 docker compose -p superset-1 -f docker-compose-light.yml up
|
||||||
|
NODE_PORT=9002 docker compose -p superset-2 -f docker-compose-light.yml up
|
||||||
|
NODE_PORT=9003 docker compose -p superset-3 -f docker-compose-light.yml up
|
||||||
|
```
|
||||||
|
|
||||||
|
This configuration includes:
|
||||||
|
- PostgreSQL database (internal network only)
|
||||||
|
- Superset application server
|
||||||
|
- Frontend development server with webpack hot reloading
|
||||||
|
- In-memory caching (no Redis)
|
||||||
|
- Isolated volumes and networks per instance
|
||||||
|
|
||||||
|
Access each instance at `http://localhost:{NODE_PORT}` (e.g., `http://localhost:9001`).
|
||||||
|
|
||||||
|
### Option #3 - build a set of immutable images from the local branch
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose-non-dev.yml up
|
docker compose -f docker-compose-non-dev.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option #3 - boot up an official release
|
### Option #4 - boot up an official release
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Set the version you want to run
|
# Set the version you want to run
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ apispec==6.6.1
|
|||||||
apsw==3.50.1.0
|
apsw==3.50.1.0
|
||||||
# via shillelagh
|
# via shillelagh
|
||||||
async-timeout==4.0.3
|
async-timeout==4.0.3
|
||||||
# via -r requirements/base.in
|
# via
|
||||||
|
# -r requirements/base.in
|
||||||
|
# redis
|
||||||
attrs==25.3.0
|
attrs==25.3.0
|
||||||
# via
|
# via
|
||||||
# cattrs
|
# cattrs
|
||||||
@@ -97,6 +99,11 @@ email-validator==2.2.0
|
|||||||
# via flask-appbuilder
|
# via flask-appbuilder
|
||||||
et-xmlfile==2.0.0
|
et-xmlfile==2.0.0
|
||||||
# via openpyxl
|
# via openpyxl
|
||||||
|
exceptiongroup==1.3.0
|
||||||
|
# via
|
||||||
|
# cattrs
|
||||||
|
# trio
|
||||||
|
# trio-websocket
|
||||||
flask==2.3.3
|
flask==2.3.3
|
||||||
# via
|
# via
|
||||||
# apache-superset (pyproject.toml)
|
# apache-superset (pyproject.toml)
|
||||||
@@ -154,6 +161,7 @@ greenlet==3.1.1
|
|||||||
# via
|
# via
|
||||||
# apache-superset (pyproject.toml)
|
# apache-superset (pyproject.toml)
|
||||||
# shillelagh
|
# shillelagh
|
||||||
|
# sqlalchemy
|
||||||
gunicorn==23.0.0
|
gunicorn==23.0.0
|
||||||
# via apache-superset (pyproject.toml)
|
# via apache-superset (pyproject.toml)
|
||||||
h11==0.16.0
|
h11==0.16.0
|
||||||
@@ -310,7 +318,7 @@ python-dateutil==2.9.0.post0
|
|||||||
# holidays
|
# holidays
|
||||||
# pandas
|
# pandas
|
||||||
# shillelagh
|
# shillelagh
|
||||||
python-dotenv==1.1.0
|
python-dotenv==1.1.1
|
||||||
# via apache-superset (pyproject.toml)
|
# via apache-superset (pyproject.toml)
|
||||||
python-geohash==0.8.5
|
python-geohash==0.8.5
|
||||||
# via apache-superset (pyproject.toml)
|
# via apache-superset (pyproject.toml)
|
||||||
@@ -395,9 +403,11 @@ typing-extensions==4.14.0
|
|||||||
# apache-superset (pyproject.toml)
|
# apache-superset (pyproject.toml)
|
||||||
# alembic
|
# alembic
|
||||||
# cattrs
|
# cattrs
|
||||||
|
# exceptiongroup
|
||||||
# limits
|
# limits
|
||||||
# pyopenssl
|
# pyopenssl
|
||||||
# referencing
|
# referencing
|
||||||
|
# rich
|
||||||
# selenium
|
# selenium
|
||||||
# shillelagh
|
# shillelagh
|
||||||
tzdata==2025.2
|
tzdata==2025.2
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ apsw==3.50.1.0
|
|||||||
# shillelagh
|
# shillelagh
|
||||||
astroid==3.3.10
|
astroid==3.3.10
|
||||||
# via pylint
|
# via pylint
|
||||||
|
async-timeout==4.0.3
|
||||||
|
# via
|
||||||
|
# -c requirements/base.txt
|
||||||
|
# redis
|
||||||
attrs==25.3.0
|
attrs==25.3.0
|
||||||
# via
|
# via
|
||||||
# -c requirements/base.txt
|
# -c requirements/base.txt
|
||||||
@@ -176,6 +180,13 @@ et-xmlfile==2.0.0
|
|||||||
# via
|
# via
|
||||||
# -c requirements/base.txt
|
# -c requirements/base.txt
|
||||||
# openpyxl
|
# openpyxl
|
||||||
|
exceptiongroup==1.3.0
|
||||||
|
# via
|
||||||
|
# -c requirements/base.txt
|
||||||
|
# cattrs
|
||||||
|
# pytest
|
||||||
|
# trio
|
||||||
|
# trio-websocket
|
||||||
filelock==3.12.2
|
filelock==3.12.2
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
flask==2.3.3
|
flask==2.3.3
|
||||||
@@ -313,6 +324,7 @@ greenlet==3.1.1
|
|||||||
# apache-superset
|
# apache-superset
|
||||||
# gevent
|
# gevent
|
||||||
# shillelagh
|
# shillelagh
|
||||||
|
# sqlalchemy
|
||||||
grpcio==1.71.0
|
grpcio==1.71.0
|
||||||
# via
|
# via
|
||||||
# apache-superset
|
# apache-superset
|
||||||
@@ -670,7 +682,7 @@ python-dateutil==2.9.0.post0
|
|||||||
# pyhive
|
# pyhive
|
||||||
# shillelagh
|
# shillelagh
|
||||||
# trino
|
# trino
|
||||||
python-dotenv==1.1.0
|
python-dotenv==1.1.1
|
||||||
# via
|
# via
|
||||||
# -c requirements/base.txt
|
# -c requirements/base.txt
|
||||||
# apache-superset
|
# apache-superset
|
||||||
@@ -818,6 +830,11 @@ tabulate==0.9.0
|
|||||||
# via
|
# via
|
||||||
# -c requirements/base.txt
|
# -c requirements/base.txt
|
||||||
# apache-superset
|
# apache-superset
|
||||||
|
tomli==2.2.1
|
||||||
|
# via
|
||||||
|
# coverage
|
||||||
|
# pylint
|
||||||
|
# pytest
|
||||||
tomlkit==0.13.3
|
tomlkit==0.13.3
|
||||||
# via pylint
|
# via pylint
|
||||||
tqdm==4.67.1
|
tqdm==4.67.1
|
||||||
@@ -840,10 +857,13 @@ typing-extensions==4.14.0
|
|||||||
# -c requirements/base.txt
|
# -c requirements/base.txt
|
||||||
# alembic
|
# alembic
|
||||||
# apache-superset
|
# apache-superset
|
||||||
|
# astroid
|
||||||
# cattrs
|
# cattrs
|
||||||
|
# exceptiongroup
|
||||||
# limits
|
# limits
|
||||||
# pyopenssl
|
# pyopenssl
|
||||||
# referencing
|
# referencing
|
||||||
|
# rich
|
||||||
# selenium
|
# selenium
|
||||||
# shillelagh
|
# shillelagh
|
||||||
tzdata==2025.2
|
tzdata==2025.2
|
||||||
|
|||||||
@@ -149,7 +149,12 @@ export default styled.div`
|
|||||||
.dt-pagination {
|
.dt-pagination {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
/* use padding instead of margin so clientHeight can capture it */
|
/* use padding instead of margin so clientHeight can capture it */
|
||||||
padding-top: 0.5em;
|
padding: ${theme.paddingXXS}px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dt-pagination .pagination > li {
|
||||||
|
display: inline;
|
||||||
|
margin: 0 ${theme.marginXXS}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dt-pagination .pagination > li > a,
|
.dt-pagination .pagination > li > a,
|
||||||
@@ -157,6 +162,8 @@ export default styled.div`
|
|||||||
background-color: ${theme.colorBgBase};
|
background-color: ${theme.colorBgBase};
|
||||||
color: ${theme.colorText};
|
color: ${theme.colorText};
|
||||||
border-color: ${theme.colorBorderSecondary};
|
border-color: ${theme.colorBorderSecondary};
|
||||||
|
padding: ${theme.paddingXXS}px ${theme.paddingXS}px;
|
||||||
|
border-radius: ${theme.borderRadius}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dt-pagination .pagination > li.active > a,
|
.dt-pagination .pagination > li.active > a,
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ const StyledTabsContainer = styled.div`
|
|||||||
|
|
||||||
.ant-tabs-content-holder {
|
.ant-tabs-content-holder {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
padding-top: ${theme.sizeUnit * 4}px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
import { memo, useMemo } from 'react';
|
import { memo, useMemo } from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { css, SupersetTheme } from '@superset-ui/core';
|
import { css, SupersetTheme } from '@superset-ui/core';
|
||||||
import { Icons } from '@superset-ui/core/components/Icons';
|
import { Flex, Icons } from '@superset-ui/core/components';
|
||||||
import { getChartKey } from 'src/explore/exploreUtils';
|
import { getChartKey } from 'src/explore/exploreUtils';
|
||||||
import { ExplorePageState } from 'src/explore/types';
|
import { ExplorePageState } from 'src/explore/types';
|
||||||
import { FastVizSwitcherProps } from './types';
|
import { FastVizSwitcherProps } from './types';
|
||||||
@@ -79,14 +79,7 @@ export const FastVizSwitcher = memo(
|
|||||||
}, [currentSelection, currentViz]);
|
}, [currentSelection, currentViz]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<Flex justify="space-between" gap={4} data-test="fast-viz-switcher">
|
||||||
css={(theme: SupersetTheme) => css`
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
column-gap: ${theme.sizeUnit}px;
|
|
||||||
`}
|
|
||||||
data-test="fast-viz-switcher"
|
|
||||||
>
|
|
||||||
{vizTiles.map(vizMeta => (
|
{vizTiles.map(vizMeta => (
|
||||||
<VizTile
|
<VizTile
|
||||||
vizMeta={vizMeta}
|
vizMeta={vizMeta}
|
||||||
@@ -96,7 +89,7 @@ export const FastVizSwitcher = memo(
|
|||||||
key={vizMeta.name}
|
key={vizMeta.name}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</Flex>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export const VizTile = ({
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
css={css`
|
css={css`
|
||||||
padding: 0px ${theme.sizeUnit}px;
|
padding: 0px ${theme.sizeUnit * 1.25}px;
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
{vizMeta.icon}
|
{vizMeta.icon}
|
||||||
@@ -136,6 +136,7 @@ export const VizTile = ({
|
|||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding-right: ${theme.sizeUnit}px;
|
padding-right: ${theme.sizeUnit}px;
|
||||||
|
line-height: 1;
|
||||||
`}
|
`}
|
||||||
ref={chartNameRef}
|
ref={chartNameRef}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -612,3 +612,42 @@ test('should render an extension component if one is supplied', async () => {
|
|||||||
|
|
||||||
expect(extension[0]).toBeInTheDocument();
|
expect(extension[0]).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should render the brand text if available', async () => {
|
||||||
|
useSelectorMock.mockReturnValue({ roles: [] });
|
||||||
|
|
||||||
|
const modifiedProps = {
|
||||||
|
...mockedProps,
|
||||||
|
data: {
|
||||||
|
...mockedProps.data,
|
||||||
|
brand: {
|
||||||
|
...mockedProps.data.brand,
|
||||||
|
text: 'Welcome to Superset',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
render(<Menu {...modifiedProps} />, {
|
||||||
|
useRouter: true,
|
||||||
|
useQueryParams: true,
|
||||||
|
useRedux: true,
|
||||||
|
useTheme: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const brandText = await screen.findByText('Welcome to Superset');
|
||||||
|
expect(brandText).toBeInTheDocument();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should not render the brand text if not available', async () => {
|
||||||
|
useSelectorMock.mockReturnValue({ roles: [] });
|
||||||
|
const text = 'Welcome to Superset';
|
||||||
|
render(<Menu {...mockedProps} />, {
|
||||||
|
useRouter: true,
|
||||||
|
useQueryParams: true,
|
||||||
|
useRedux: true,
|
||||||
|
useTheme: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const brandText = screen.queryByText(text);
|
||||||
|
expect(brandText).not.toBeInTheDocument();
|
||||||
|
});
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ const StyledHeader = styled.header`
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
& .ant-image{
|
& .ant-image{
|
||||||
|
display: contents;
|
||||||
|
height: 100%;
|
||||||
padding: ${theme.sizeUnit}px
|
padding: ${theme.sizeUnit}px
|
||||||
${theme.sizeUnit * 2}px
|
${theme.sizeUnit * 2}px
|
||||||
${theme.sizeUnit}px
|
${theme.sizeUnit}px
|
||||||
@@ -87,7 +89,7 @@ const StyledHeader = styled.header`
|
|||||||
padding-left: ${theme.sizeUnit * 4}px;
|
padding-left: ${theme.sizeUnit * 4}px;
|
||||||
padding-right: ${theme.sizeUnit * 4}px;
|
padding-right: ${theme.sizeUnit * 4}px;
|
||||||
margin-right: ${theme.sizeUnit * 6}px;
|
margin-right: ${theme.sizeUnit * 6}px;
|
||||||
font-size: ${theme.sizeUnit * 4}px;
|
font-size: ${theme.fontSizeLG}px;
|
||||||
float: left;
|
float: left;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -322,6 +324,11 @@ export function Menu({
|
|||||||
>
|
>
|
||||||
{renderBrand()}
|
{renderBrand()}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
{brand.text && (
|
||||||
|
<div className="navbar-brand-text">
|
||||||
|
<span>{brand.text}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<MainNav
|
<MainNav
|
||||||
mode={showMenu}
|
mode={showMenu}
|
||||||
data-test="navbar-top"
|
data-test="navbar-top"
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ const {
|
|||||||
measure = false,
|
measure = false,
|
||||||
nameChunks = false,
|
nameChunks = false,
|
||||||
} = parsedArgs;
|
} = parsedArgs;
|
||||||
|
|
||||||
const isDevMode = mode !== 'production';
|
const isDevMode = mode !== 'production';
|
||||||
const isDevServer = process.argv[1].includes('webpack-dev-server');
|
const isDevServer = process.argv[1].includes('webpack-dev-server');
|
||||||
|
|
||||||
@@ -535,6 +536,11 @@ if (isDevMode) {
|
|||||||
runtimeErrors: error => !/ResizeObserver/.test(error.message),
|
runtimeErrors: error => !/ResizeObserver/.test(error.message),
|
||||||
},
|
},
|
||||||
logging: 'error',
|
logging: 'error',
|
||||||
|
webSocketURL: {
|
||||||
|
hostname: '0.0.0.0',
|
||||||
|
pathname: '/ws',
|
||||||
|
port: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
static: {
|
static: {
|
||||||
directory: path.join(process.cwd(), '../static/assets'),
|
directory: path.join(process.cwd(), '../static/assets'),
|
||||||
|
|||||||
@@ -1155,7 +1155,7 @@ class CeleryConfig: # pylint: disable=too-few-public-methods
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CELERY_CONFIG: type[CeleryConfig] = CeleryConfig
|
CELERY_CONFIG: type[CeleryConfig] | None = CeleryConfig
|
||||||
|
|
||||||
# Set celery config to None to disable all the above configuration
|
# Set celery config to None to disable all the above configuration
|
||||||
# CELERY_CONFIG = None
|
# CELERY_CONFIG = None
|
||||||
|
|||||||
Reference in New Issue
Block a user