Trial state of 29 Oct 2026: ATOMA reader setup, app dashboards, embedding notes

Baseline before the clean-up (PD-13): the PD-11 reader setup and the PD-12 app
dashboards as they ran on the local stack, uncommitted until now. Not deployed,
not independently reviewed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nasim SadatandClaude Opus 5.5 committed 2026-10-29 20:50:26 +01:00
1 parent 97284052c1
commit 1b8e57adb4
24 files changed
+2777 -136

No files matched your search

+37 -7
View File
@@ -13,6 +13,7 @@ from copy import deepcopy
from flask_appbuilder.security.manager import AUTH_OAUTH
from sqlalchemy.engine.url import URL
import petrolyst_reader
from petrolyst_security import PetrolystSecurityManager
from superset import config as superset_defaults
@@ -79,6 +80,8 @@ AUTH_ROLES_MAPPING = {
"superset-admin": ["Admin"],
"superset-editor": ["Alpha"],
"superset-viewer": ["Gamma"],
# ATOMA's users: read the ATOMA dashboard, nothing else (petrolyst_reader.py).
"atoma-reader": ["ATOMA Reader"],
}
AUTH_ROLES_SYNC_AT_LOGIN = True
AUTH_USER_REGISTRATION = True
@@ -87,7 +90,31 @@ AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Public"
# Viewers (Gamma) see a dashboard once it lists their role.
FEATURE_FLAGS = {"DASHBOARD_RBAC": True}
# FILTERBAR_CLOSED_BY_DEFAULT: a dashboard's filter column opens collapsed, a
# narrow strip with an expand button (owner, 29 Oct); ?expand_filters=true
# opens it from a link.
FEATURE_FLAGS = {"DASHBOARD_RBAC": True, "FILTERBAR_CLOSED_BY_DEFAULT": True}
# Readers ("ATOMA Reader"): land on the ATOMA dashboard, see it without the
# title row and the menus Superset shows to everyone, and reach no other
# dashboard (petrolyst_reader.py).
FLASK_APP_MUTATOR = petrolyst_reader.register
# deck.gl maps: OpenStreetMap raster tiles only. The default list adds Mapbox
# styles, which fail without MAPBOX_API_KEY. The default CSP already allows the
# tile host. The ATOMA map credits OSM in a Markdown block beside it.
DECKGL_BASE_MAP = [
["tile://https://tile.openstreetmap.org/{z}/{x}/{y}.png", "OpenStreetMap"],
]
# Markdown blocks may hold an iframe: the ATOMA Fleet tab embeds the fleet-map view
# from petrolyst-platform (/views/fleet-map/). Only these attributes survive. The CSP
# (default-src 'self', no frame-src) keeps frames to this origin, so a dashboard
# editor cannot embed another site.
HTML_SANITIZATION_SCHEMA_EXTENSIONS = {
"tagNames": ["iframe"],
"attributes": {"iframe": ["src", "title", "loading", "style"]},
}
# --- Behind Traefik -----------------------------------------------------------
ENABLE_PROXY_FIX = True
@@ -133,7 +160,7 @@ RATELIMIT_STORAGE_URI = f"{REDIS_URL}/1"
BRANDING = "/static/assets/branding"
APP_NAME = "Petrolyst"
APP_ICON = f"{BRANDING}/petrolyst_logo_standard_fullcolor_no_tagline.svg"
APP_ICON = f"{BRANDING}/petrolyst_wordmark_fullcolor.svg"
FAVICONS = [
{"href": f"{BRANDING}/favicon.svg", "type": "image/svg+xml"},
{"href": f"{BRANDING}/favicon.ico", "type": "image/x-icon"},
@@ -147,10 +174,13 @@ THEME_DEFAULT["token"].update(
"brandLogoAlt": "Petrolyst",
"brandLogoUrl": APP_ICON,
"brandLogoHref": "/",
# The standard logo is stacked (mark over wordmark); 40px keeps the Y
# legible and, with the margin, the 60px navbar height.
"brandLogoHeight": "40px",
"brandLogoMargin": "10px 0",
# The wordmark alone (owner, 29 Oct): in the stacked logo, at 40px, its
# letters were about 5px high. Its own Y carries the brand accent. 24px
# (letters about 20px) and the margin fill the 60px navbar height. On the
# left, 15px more than the navbar's 16px: the P (1.4px inside the image)
# lines up with the dashboard's content and a reader's fleet map at 32px.
"brandLogoHeight": "24px",
"brandLogoMargin": "18px 0 18px 15px",
# Action teal, not the raw brand teal #009688: the brand guide keeps
# raw teal off small text and controls.
"colorPrimary": "#00695C",
@@ -171,7 +201,7 @@ THEME_DARK = deepcopy(THEME_DEFAULT)
THEME_DARK["algorithm"] = "dark"
THEME_DARK["token"].update(
{
"brandLogoUrl": f"{BRANDING}/petrolyst_logo_standard_white_no_tagline.svg",
"brandLogoUrl": f"{BRANDING}/petrolyst_wordmark_white.svg",
"colorPrimary": "#35C5B6",
"colorLink": "#35C5B6",
"colorSuccess": "#35C5B6",