diff --git a/.env.example b/.env.example index b53dc65..4e83bd2 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,12 @@ ARTDAG_DOMAIN=artdag.rose-ash.com # JWT secret for token signing (generate with: openssl rand -hex 32) JWT_SECRET=your-secret-here-generate-with-openssl-rand-hex-32 +# L1 server URL for fetching content (images/videos) +L1_PUBLIC_URL=https://celery-artdag.rose-ash.com + +# Effects repository URL for linking to effect source code +EFFECTS_REPO_URL=https://git.rose-ash.com/art-dag/effects + # Notes: # - ARTDAG_USER removed - now multi-actor, each registered user is their own actor -# - ARTDAG_L1 removed - L1 server URL is sent with each request +# - L1 URL can also come from provenance data per-asset diff --git a/server.py b/server.py index d00fa6e..b76a5e8 100644 --- a/server.py +++ b/server.py @@ -736,9 +736,17 @@ async def ui_asset_detail(name: str, request: Request): inputs = provenance.get("inputs", []) l1_run_id = provenance.get("l1_run_id", "") rendered_at = provenance.get("rendered_at", "")[:10] if provenance.get("rendered_at") else "" + effects_commit = provenance.get("effects_commit", "") + infrastructure = provenance.get("infrastructure", {}) - # Build effect link - effect_url = f"{EFFECTS_REPO_URL}/src/branch/main/{recipe}" + # Use stored effect_url or build fallback + effect_url = provenance.get("effect_url") + if not effect_url: + # Fallback for older records + if effects_commit and effects_commit != "unknown": + effect_url = f"{EFFECTS_REPO_URL}/src/commit/{effects_commit}/{recipe}" + else: + effect_url = f"{EFFECTS_REPO_URL}/src/branch/main/{recipe}" # Build inputs display inputs_html = "" @@ -752,6 +760,24 @@ async def ui_asset_detail(name: str, request: Request): ''' + # Infrastructure display + infra_html = "" + if infrastructure: + software = infrastructure.get("software", {}) + hardware = infrastructure.get("hardware", {}) + if software or hardware: + infra_html = f''' +