fix: use absolute URL for insight Overview link and document known issues

This commit is contained in:
Haitao Pan 2026-02-03 11:22:10 +08:00
parent 3c96596c8b
commit c3888ed257
3 changed files with 30 additions and 2 deletions

28
KNOWN_ISSUES.md Normal file
View File

@ -0,0 +1,28 @@
# Known Issues - Observability Homepage
This document records known issues and design decisions for the consolidated Pigsty Observability Homepage.
## 1. Dashboard Merging & Grid Positioning
- **Status**: Fixed
- **Issue**: Merging multiple source dashboards (`pigsty.json`, `node.json`, `k8s.json`) into one `homepage.json` originally caused panels to stack vertically regardless of their horizontal layout.
- **Resolution**: `merge_dashboards.py` was updated to preserve the relative vertical and horizontal positioning within each newly created section (Infra Overview, Node, K8S Cluster).
## 2. Variable Name Unification
- **Status**: Fixed (Workaround)
- **Issue**: The consolidated dashboard uses a unified variable set (`$hostname`, `$node`, etc.), but source queries in the Node dashboard expected `$name` and `$instance`.
- **Resolution**: `merge_dashboards.py` performs a global regex replacement on the Node dashboard's JSON content before merging to align variable names.
## 3. External Links in Dashlists
- **Status**: Manual Override
- **Issue**: Grafana `dashlist` panels only show internal dashboards with specific tags. They do not support external URL links (like the Insight Workbench).
- **Resolution**: The "Apps" dashlist panel was replaced with a `text` panel using HTML to provide a direct link to `https://observability.svc.plus/insight/`.
## 4. Root Path Redirection
- **Status**: Fixed
- **Issue**: Users visiting `observability.svc.plus/` were previously directed elsewhere (defaults in Caddyfile).
- **Resolution**: Updated `Caddyfile` templates to redirect `/` (root) and `/zh` directly to `/grafana/`.
## 5. Panel UID Scaling
- **Status**: Potential Issue
- **Issue**: Panel IDs are re-assigned sequentially (1, 2, 3...) during merging. This might break internal dashboard persistence if panels are re-added or deleted frequently.
- **Recommendation**: Avoid frequent re-merging if persistent panel links are required.

View File

@ -1775,7 +1775,7 @@
}, },
"id": 5, "id": 5,
"options": { "options": {
"content": "<div style='text-align: center; padding-top: 10px;'><a href='/insight/' style='font-size: 18px; color: #58a6ff; font-weight: bold;'>insight Overview</a></div>", "content": "<div style='text-align: center; padding-top: 10px;'><a href='https://observability.svc.plus/insight/' style='font-size: 18px; color: #58a6ff; font-weight: bold;'>insight Overview</a></div>",
"mode": "html" "mode": "html"
}, },
"pluginVersion": "12.3.0", "pluginVersion": "12.3.0",

View File

@ -83,7 +83,7 @@ def merge_dashboards():
p["title"] = "insight Overview" p["title"] = "insight Overview"
p["type"] = "text" p["type"] = "text"
p["options"] = { p["options"] = {
"content": "<div style='text-align: center; padding-top: 10px;'><a href='/insight/' style='font-size: 18px; color: #58a6ff; font-weight: bold;'>insight Overview</a></div>", "content": "<div style='text-align: center; padding-top: 10px;'><a href='https://observability.svc.plus/insight/' style='font-size: 18px; color: #58a6ff; font-weight: bold;'>insight Overview</a></div>",
"mode": "html" "mode": "html"
} }