#!/usr/bin/env python3 """ Accedian NID SNMP Data Visualizer Reads a *_monitoring.json file produced by snmp-parse.py and generates a self-contained HTML page showing the device model, ports, SFPs, alarms, config, and SNMP data coverage. Usage: python3 build_nid_viewer.py [monitoring_json] """ import json import sys from pathlib import Path SCRIPT_DIR = Path(__file__).resolve().parent WALKS_DIR = SCRIPT_DIR / "walks" DEFAULT_INPUT = WALKS_DIR / "10-13-60-102_2026-02-27_11-23-07_walk_monitoring.json" def safe_json(obj, **kwargs): """JSON-encode and escape sequences unsafe inside