mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 00:50:46 +08:00
Improve biz-compare UX with guided create, sheet toggles, and per-run delete.
Also sticky template field headers and biz-state pause/start endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
9b3e98ede5
commit
3d2489041a
12 changed files with 669 additions and 155 deletions
|
|
@ -444,6 +444,20 @@ class CompareSheetDefaultsTests(unittest.TestCase):
|
|||
isis4 = next(s for s in parsed if sheet_key(s) == "isis_adjacency.ipv4")
|
||||
self.assertTrue(str(isis4.get("title") or "").strip())
|
||||
|
||||
def test_filter_enabled_sheets_empty_means_all(self) -> None:
|
||||
from netx_api.biz_state.compare_service import _filter_enabled_sheets, sheet_key
|
||||
|
||||
sheets = [
|
||||
{"sheet_id": "isis_adjacency.ipv4", "metric_id": "isis_adjacency"},
|
||||
{"sheet_id": "isis_adjacency.ipv6", "metric_id": "isis_adjacency"},
|
||||
{"sheet_id": "arp", "metric_id": "arp"},
|
||||
]
|
||||
self.assertEqual(len(_filter_enabled_sheets(sheets, None)), 3)
|
||||
self.assertEqual(len(_filter_enabled_sheets(sheets, [])), 3)
|
||||
only = _filter_enabled_sheets(sheets, ["isis_adjacency.ipv4", "arp"])
|
||||
self.assertEqual([sheet_key(s) for s in only], ["isis_adjacency.ipv4", "arp"])
|
||||
self.assertEqual(_filter_enabled_sheets(sheets, ["missing"]), [])
|
||||
|
||||
def test_arp_default_sheet_has_row_filters(self) -> None:
|
||||
from netx_api.biz_state.compare_service import _default_sheet_for_metric
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue