-
Notifications
You must be signed in to change notification settings - Fork 0
Reorder and clarify geo drop downs #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRenames and reorders Grafana templating variables to a four-level location hierarchy (Area → Geography → Region → Site) across dashboards and updates their queries and descriptions; adjusts the device_details Geo Tags panel organize transformation to remap column indices and exclude specific fields. No panel query logic changed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1)
182-233: Add exists-guards for optional tags to prevent Flux filter errors.Several filters use tag regex without checking existence; on older datasets missing tags can drop rows or error.
Example pattern to apply in affected queries:
- |> filter(fn: (r) => r["product_full_name"] =~ /${model:regex}/) + |> filter(fn: (r) => exists r["product_full_name"] and r["product_full_name"] =~ /${model:regex}/)Repeat for area/geography/region/site/type when data may be partially tagged.
Also applies to: 456-472, 681-689, 772-779, 860-862, 943-945
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (2)
846-848: SD card path inconsistent with other dashboards; support both variants.Other panels use “/var/spool/storage/SD_DISK” while here it’s “/var/volatile/spool/storage/SD_DISK”. Match both to avoid empty results across agent versions.
- |> filter(fn: (r) => - r._measurement == "disk" and - r._field == "used_percent" and - r.path == "/var/volatile/spool/storage/SD_DISK" and + |> filter(fn: (r) => + r._measurement == "disk" and + r._field == "used_percent" and + r.path =~ /\/var(\/volatile)?\/spool\/storage\/SD_DISK/ andAlso apply the same regex in overview_of_devices.json (SD Card) and device_details.json (Free SD Card Storage) for uniformity.
680-687: Harden filters with exists checks for optional tags.Add exists guards where tag presence isn’t guaranteed to keep queries resilient.
Example:
- |> filter(fn: (r) => r["product_full_name"] =~ /${model:regex}/) + |> filter(fn: (r) => exists r["product_full_name"] and r["product_full_name"] =~ /${model:regex}/)Apply similarly for area/geography/region/site/type/device where appropriate.
Also applies to: 694-696, 703-705, 712-714, 721-723, 730-732
🧹 Nitpick comments (6)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)
160-166: Remove indexes/kept fields for columns you explicitly exclude."type" is excluded via excludeByName but still indexed and kept; same for product_full_name. Drop them to avoid confusion and minor overhead.
- |> keep(columns: ["_time", "${unique_identifier}", "area", "geography", "region", "site", "type", "product_full_name"]) + |> keep(columns: ["_time", "${unique_identifier}", "area", "geography", "region", "site"]) "indexByName": { "host": 0, - "area": 1, - "geography": 2, + "area": 1, + "geography": 2, "region": 3, "site": 4, - "type": 5 + // removed "type" since it's excluded },Also applies to: 144-146
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (2)
1051-1060: Unify wording: “Subdivision” (one word) and consistent capitalization.Use “Subdivision of Area (e.g., Sweden)” for consistency with Region’s description.
- "description": "sub division of Area (e.g., Sweden)", + "description": "Subdivision of Area (e.g., Sweden)",
1158-1166: Avoid “camera” in user-facing text; prefer “Axis devices.”Guidelines discourage “camera” unless about visual analytics.
- "description": "Model of the camera", + "description": "Model of the Axis device",dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (3)
930-939: Standardize description: “Subdivision of Area (e.g., Sweden)”.- "description": "sub division of Area (e.g., Sweden)", + "description": "Subdivision of Area (e.g., Sweden)",
1067-1075: Use “Axis device” instead of “camera” in Model Name description.Mirror the wording fix done in overview_of_devices.json.
- "label": "Model Name", - "description": "", + "label": "Model Name", + "description": "Model of the Axis device",
740-759: Minor UX consistency: link titles.“Device Detail Link” vs “Device detail link” vary across dashboards. Pick one style.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json(1 hunks)dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json(4 hunks)dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json(4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
dashboard-deployments/**
⚙️ CodeRabbit configuration file
This directory contains server-side dashboard examples for visualizing data from FixedIT Data Agent running on Axis devices. These are primarily for DevOps/IT professionals comfortable with deploying Grafana dashboards and InfluxDB servers. Some dashboards work directly with bundled agent configurations, others can be customized. Licensed under Elastic License 2.0. Review for deployment complexity, dashboard usability, and proper licensing compliance. We should make sure that dashboards are portable and does not check in specific host names, or refer to other specific data from a single deployment.
Files:
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
**/*
⚙️ CodeRabbit configuration file
This repository serves FixedIT Data Agent users across a spectrum from plug-and-play dashboard deployment to advanced edge device customization. Consider whether changes maintain accessibility for both DevOps professionals (server-side focus) and developers (edge customization focus). If new features are added or existing ones changed significantly, ensure documentation clearly explains the intended audience and usage level. We use prettier for formatting of common file formats like markdown, yaml, json, etc. Example projects should be placed in the repo-root in a directory named project-*/. Whenever referencing Axis device model names like "D4100-VE mk II" or "M3045", prefix it with "AXIS" in capital letters (e.g. "AXIS D4100-VE mk II"). When using Axis as a company name, use "Axis Communications", note that all-caps is only used when "AXIS" is used in their product names, not their company name. When using the name of an Axis product, google on the name to verify that it is correctly identified. Avoid using 'cameras' or 'Axis cameras' unless the solution in related to visual analytics, otherwise prefer using 'Axis devices' to show that the FixedIT Data Agent also works with strobes, speakers, door stations, etc. Images used for the README should be placed in a directory called .images/ in the affected project folder. These images might also be referred to from other sources like the top-level README.md file.
Files:
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.jsondashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
🔇 Additional comments (9)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)
161-165: Column order change looks correct.Host, Area, Geography, Region, Site matches the new hierarchy.
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (4)
1026-1035: Top-level Area variable update is on point.Definition/label/name align with the new hierarchy.
1076-1085: Region variable looks good; mirror wording across dashboards.Keep “Subdivision of Geography (e.g., Stockholm)” consistently everywhere.
1101-1103: Site description improvement approved.
181-233: No legacy variable references detected. All panel queries use updated variables; no stale geography/area/region filters remain.dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (4)
905-914: Area variable rename is correct and consistent.
955-964: Region variable update LGTM.
981-982: Site description improvement approved.
1-1151: No stale hierarchy references detected.
a8eaf30 to
6155fc6
Compare
- Change order to match our recommended heiarchy - Add describing text descriptions to prevent missuse Should be: Area: "top-most level (e.g., Europe)" Geography: "sub division of Area (e.g., Sweden)" Region: "Subdivision of Geography (e.g., Stockholm)" Site: "bottom-most level (e.g., Friends Arena)"
6fd3ab2 to
067bbd5
Compare
|



Also cleans up unused keys in ordering transformations.
Summary by CodeRabbit
New Features
Refactor
Style
Documentation