Skip to content

Conversation

@daniel-falk
Copy link
Contributor

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

  • Update bucket variables in all three dashboards to filter buckets to only show those starting with 'Cameras' (case insensitive) and sort them alphabetically.
  • Show the variable as a drop down in the dashboards

This makes it possible to use multiple different buckets for segmentation of different data.

Summary by CodeRabbit

  • New Features
    • Dashboards now include a visible "Source Bucket" selector (label changed from "Database") that is populated via a Flux query.
    • Added a hidden "bucket_prefix" constant (default "cameras") to filter buckets by case‑insensitive prefix; bucket list is sorted.
    • Device detail links now include the selected bucket so panels navigate with bucket context.

@coderabbitai
Copy link

coderabbitai bot commented Aug 29, 2025

Walkthrough

Replaces buckets() templating with Flux-based, case-insensitive prefix filtering across three Grafana dashboards, adds a constant bucket_prefix (default "cameras"), exposes the bucket variable as "Source Bucket" (hide: 2 → 0), updates device detail links to include bucket, and moves the datasource templating entry to the top.

Changes

Cohort / File(s) Summary of changes
Grafana dashboards: Flux-filtered bucket templating
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json, .../provisioning/dashboards/overview_of_devices.json, .../provisioning/dashboards/system_overview.json
Added constant bucket_prefix (value "cameras", description "Case insensitive prefix for filtering buckets", hide: 2). Replaced bucket templating from buckets() to a Flux query (imports strings, filters by lowercased prefix ${bucket_prefix}, sorts by name); changed label to "Source Bucket", set hide: 0, and ensured query contains the same Flux script. Updated device-detail panel links to include var-bucket=${bucket}. Moved datasource template entry to the top of the templating list in device_details.json.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Grafana
  participant InfluxDB

  User->>Grafana: Open dashboard
  Grafana->>InfluxDB: Run Flux query\nimport "strings"\n|> buckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: "${bucket_prefix}"))\n|> sort(columns: ["name"])
  InfluxDB-->>Grafana: Return filtered, sorted buckets
  Grafana-->>User: Render "Source Bucket" dropdown
  User->>Grafana: Select bucket
  Grafana->>InfluxDB: Execute panel queries using selected bucket
  InfluxDB-->>Grafana: Query results
  Grafana-->>User: Display panels
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • fixedit-olatz
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dashboard-improvements

🪧 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: 3

📜 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 dd845e4 and d028f46.

📒 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 (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1 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/overview_of_devices.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.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/overview_of_devices.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json

@daniel-falk
Copy link
Contributor Author

We need to ensure that the selected bucket is kept when navigating between devices with the links.

@daniel-falk daniel-falk force-pushed the dashboard-improvements branch from d028f46 to a8eaf30 Compare September 3, 2025 14:33
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 (4)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (2)

91-94: Preserve selected bucket when navigating to Device Details (link 1).

Add the var-bucket parameter so the chosen bucket persists across dashboards.

- "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}"
+ "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}&var-bucket=${bucket}"

415-418: Preserve selected bucket when navigating to Device Details (link 2).

Same fix for the second link.

- "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}"
+ "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}&var-bucket=${bucket}"
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (2)

186-193: Carry the selected bucket into Device Details link (Missing Devices table).

- "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}&from=now-90d"
+ "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}&var-bucket=${bucket}&from=now-90d"

643-646: Carry the selected bucket into Device Details link (Outliers table).

- "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}"
+ "url": "/d/${device_details_uid:raw}/device-details?var-device=${__value.text}&var-bucket=${bucket}"
♻️ Duplicate comments (3)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1)

990-997: Make the prefix comparison truly case-insensitive.

Lowercase the ${bucket_prefix} in the Flux filter to match the stated “case insensitive” behavior regardless of how users type the prefix.

- "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])",
+ "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
...
-           "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+           "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1)

894-901: Make the prefix comparison truly case-insensitive.

Lowercase the ${bucket_prefix} so user input casing does not affect results.

- "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])",
+ "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
...
-           "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+           "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)

1059-1067: Make the prefix comparison truly case-insensitive.

Apply the same lowercase to ${bucket_prefix} here for consistency.

- "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])",
+ "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
...
-           "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+           "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"
🧹 Nitpick comments (3)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1)

990-997: Optional: Emit only bucket names to the variable selector.

Keeps the variable’s values clean and avoids accidental column leakage from buckets().

- |> sort(columns: ["name"])
+ |> sort(columns: ["name"])
+ |> keep(columns: ["name"])
+ |> rename(columns: {name: "_value"})
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1)

894-901: Optional: Emit only bucket names to the variable selector.

- |> sort(columns: ["name"])
+ |> sort(columns: ["name"])
+ |> keep(columns: ["name"])
+ |> rename(columns: {name: "_value"})
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)

1059-1067: Optional: Emit only bucket names to the variable selector.

- |> sort(columns: ["name"])
+ |> sort(columns: ["name"])
+ |> keep(columns: ["name"])
+ |> rename(columns: {name: "_value"})
📜 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 a8eaf30.

📒 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 (1 hunks)
  • dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (1 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/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
**/*

⚙️ 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/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

- Update bucket variables in all three dashboards to filter buckets
to only show those starting with 'Cameras' (case insensitive) and
sort them alphabetically.
- Show the variable as a drop down in the dashboards
- Keep the bucket selection when clicking links

This makes it possible to use multiple different buckets for
segmentation of different data.
@daniel-falk daniel-falk force-pushed the dashboard-improvements branch from a8eaf30 to 6155fc6 Compare September 3, 2025 15:30
@daniel-falk
Copy link
Contributor Author

We need to ensure that the selected bucket is kept when navigating between devices with the links.

Done

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2025

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

🧹 Nitpick comments (7)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (2)

973-984: Nit: hide-only constant should not sync to URL.

Consider preventing bucket_prefix (hidden) from polluting URLs.

-        "skipUrlSync": false,
+        "skipUrlSync": true,

990-997: Make prefix filter truly case-insensitive (and optionally more robust for Grafana variables).

Currently you lowercase r.name but not the prefix; mixed-case prefix values won’t match.

Minimal fix (lowercase the prefix too):

-        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])",
+        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
...
-          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"

Optional robustness (emit only name as _value which Grafana variable handling prefers):

-        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
+        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])|> keep(columns: [\"name\"])|> rename(columns: {name: \"_value\"})",
...
-          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])|> keep(columns: [\"name\"])|> rename(columns: {name: \"_value\"})"
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (2)

1046-1057: Nit: keep hidden constants out of URL.

Set skipUrlSync to true for bucket_prefix.

-        "skipUrlSync": false,
+        "skipUrlSync": true,

1059-1071: Ensure case-insensitive prefix works regardless of user input case.

Lowercase the template value too; optionally emit _value for safer Grafana variable parsing.

Minimal:

-        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])",
+        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
...
-          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"

Optional:

-        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
+        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])|> keep(columns: [\"name\"])|> rename(columns: {name: \"_value\"})",
...
-          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"
+          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])|> keep(columns: [\"name\"])|> rename(columns: {name: \"_value\"})"
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/system_overview.json (3)

876-887: Nit: don’t sync hidden constants.

bucket_prefix is hidden; set skipUrlSync to true.

-        "skipUrlSync": false,
+        "skipUrlSync": true,

894-901: Case-insensitive prefix and variable robustness.

Lowercase the prefix input; optionally emit only _value for Grafana variable stability.

Minimal:

-        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])",
+        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
...
-          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: \"${bucket_prefix}\"))\n|> sort(columns: [\"name\"])"
+          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"

Optional:

-        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])",
+        "definition": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])|> keep(columns: [\"name\"])|> rename(columns: {name: \"_value\"})",
...
-          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])"
+          "query": "import \"strings\"\n\nbuckets()\n|> filter(fn: (r) => strings.hasPrefix(v: strings.toLower(v: r.name), prefix: strings.toLower(v: \"${bucket_prefix}\")))\n|> sort(columns: [\"name\"])|> keep(columns: [\"name\"])|> rename(columns: {name: \"_value\"})"

188-189: Good: bucket context added to navigation links (minor title consistency nit).

Including var-bucket preserves selection across dashboards. Minor nit: link titles vary (“Device detail link”, “Device details link”, “Device Detail Link”). Consider standardizing.

Also applies to: 443-446, 645-646

📜 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 a8eaf30 and 6155fc6.

📒 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 (3 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/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
**/*

⚙️ 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/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
🔇 Additional comments (2)
dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/overview_of_devices.json (1)

93-93: Good: bucket preserved in device links.

Adding var-bucket to the URL will keep the selected bucket when navigating to Device Details.

dashboard-deployments/system-monitoring-influxdb2-flux-grafana/provisioning/dashboards/device_details.json (1)

1032-1045: LGTM: datasource variable moved to top.

Reordering improves UX without changing behavior.

@daniel-falk daniel-falk merged commit ba36e09 into main Sep 3, 2025
4 checks passed
@daniel-falk daniel-falk deleted the dashboard-improvements 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