feat(topology): add GHC06 layout and deploy docs
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user