feat(topology): add GHC06 layout and deploy docs

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-11 15:02:47 +08:00
co-authored by Claude
parent cf1d26dba9
commit 26d2fcd0b1
9 changed files with 710 additions and 50 deletions
+7 -4
View File
@@ -245,8 +245,8 @@ def fetch_snapshot(snapshot_at):
return result
def fetch_layout():
"""Fetch the default diagram layout with node positions."""
def fetch_layout(layout_key=None):
"""Fetch a named diagram layout, falling back to the default layout."""
with read_cursor() as cur:
cur.execute("""
SELECT
@@ -284,9 +284,12 @@ def fetch_layout():
ON default_theme.base_id = dl.base_id
AND default_theme.is_default = true
WHERE dl.base_id = (SELECT id FROM bases WHERE code = 'guanghan')
AND dl.is_default = true
AND (
(%(layout_key)s::text IS NOT NULL AND dl.layout_key = %(layout_key)s)
OR (%(layout_key)s::text IS NULL AND dl.is_default = true)
)
ORDER BY dn.z_index, dn.node_key
""")
""", {"layout_key": layout_key})
nodes = []
layout_info = None
theme_info = None