mirror of
https://github.com/hansjone/netx.git
synced 2026-10-08 23:33:21 +08:00
Ship gated eye polish, fabric levels, and collection UI refresh.
Topology MCP adds pull/compact/bundle/suggest-hubs with a no-template skill path; API gains fabric level and NE collection policy; web list pages get paging and denser collect/network workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b1aee86701
commit
b81e5869a6
91 changed files with 10395 additions and 1513 deletions
54
alembic/versions/20260811_fabric_level.py
Normal file
54
alembic/versions/20260811_fabric_level.py
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
"""Add topo_fabric_node.level for layout classification.
|
||||
|
||||
Revision ID: 20260811_fabric_level
|
||||
Revises: 20260806_auth_refresh
|
||||
Create Date: 2026-08-11
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision: str = "20260811_fabric_level"
|
||||
down_revision: Union[str, Sequence[str], None] = "20260806_auth_refresh"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
dialect = str(getattr(bind.dialect, "name", "") or "").lower()
|
||||
if dialect.startswith("postgres"):
|
||||
op.execute(
|
||||
"ALTER TABLE topo_fabric_node ADD COLUMN IF NOT EXISTS level DOUBLE PRECISION"
|
||||
)
|
||||
op.execute(
|
||||
"CREATE INDEX IF NOT EXISTS ix_topo_fabric_node_level ON topo_fabric_node (level)"
|
||||
)
|
||||
else:
|
||||
# SQLite / others: best-effort
|
||||
try:
|
||||
op.execute("ALTER TABLE topo_fabric_node ADD COLUMN level REAL")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
op.execute(
|
||||
"CREATE INDEX IF NOT EXISTS ix_topo_fabric_node_level ON topo_fabric_node (level)"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
dialect = str(getattr(bind.dialect, "name", "") or "").lower()
|
||||
if dialect.startswith("postgres"):
|
||||
op.execute("DROP INDEX IF EXISTS ix_topo_fabric_node_level")
|
||||
op.execute("ALTER TABLE topo_fabric_node DROP COLUMN IF EXISTS level")
|
||||
else:
|
||||
try:
|
||||
op.drop_column("topo_fabric_node", "level")
|
||||
except Exception:
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue