Skip to content

Conversation

@daniel-falk
Copy link
Contributor

@daniel-falk daniel-falk commented Aug 29, 2025

Reorder and clarify geo drop downs

- 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)"

Also cleans up unused keys in ordering transformations.

Summary by CodeRabbit

  • New Features

    • Consistent four-level location hierarchy across dashboards: Area → Geography → Region → Site.
  • Refactor

    • Dashboard templating variables and queries updated to align with the new hierarchy in Overview of Devices and System Overview.
  • Style

    • Geo Tags table in Device Details reordered to show Host, Area, Geography, Region, Site; non-essential fields (including Type) hidden for a cleaner view.
  • Documentation

    • Added descriptive hints to templating levels (e.g., “top-most level” and “bottom-most level”).

@coderabbitai
Copy link

coderabbitai bot commented Aug 29, 2025

Walkthrough

Renames 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

Cohort / File(s) Summary
Templating hierarchy realignment
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json, dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
Renamed/reordered templating variables to Area (area), Geography (geography), Region (region), Site (site); updated variable names, labels, descriptions, and tag-value queries to reflect the new hierarchy.
Geo Tags panel column mapping
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
Updated organize transformation mapping and exclusions: reassigned indices (host=0, area=1, geography=2, region=3, site=4, type=5), removed _time and product_full_name from mapping, and excluded _time, product_full_name, type. Visible column order becomes Host, Area, Geography, Region, Site.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • fixedit-olatz

📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 6fd3ab2 and 067bbd5.

📒 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)
🚧 Files skipped from review as they are similar to previous changes (3)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dashboard-improvements2

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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/ and

Also 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.

📥 Commits

Reviewing files that changed from the base of the PR and between d028f46 and 6fd3ab2.

📒 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.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json
  • dashboard-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.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json
  • dashboard-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.

@daniel-falk daniel-falk changed the title Dashboard improvements2 Reorder and clarify geo drop downs Sep 3, 2025
@daniel-falk daniel-falk force-pushed the dashboard-improvements branch 2 times, most recently from a8eaf30 to 6155fc6 Compare September 3, 2025 15:30
Daniel Falk added 2 commits September 3, 2025 17:35
- 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)"
@daniel-falk daniel-falk force-pushed the dashboard-improvements2 branch from 6fd3ab2 to 067bbd5 Compare September 3, 2025 15:36
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2025

Base automatically changed from dashboard-improvements to main September 3, 2025 16:09
@daniel-falk daniel-falk merged commit 99ce37a into main Sep 3, 2025
4 checks passed
@daniel-falk daniel-falk deleted the dashboard-improvements2 branch September 3, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants