Grafana dashboard consistency#173
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on improving the consistency and readability of Grafana dashboard configurations by reformatting JSON files. Additionally, it refines the field override logic within these dashboards to ensure only relevant data series are displayed, enhancing the user experience. A minor update to a testing script's default car name is also included. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request focuses on improving the consistency and maintainability of Grafana dashboards by refactoring the panel configurations. The changes simplify how data series are displayed, making the dashboards easier to manage. Additionally, a testing script has been updated. My feedback includes a suggestion to make this test script more flexible by using command-line arguments instead of a hardcoded value, which will improve its usability for developers.
| if __name__ == '__main__': | ||
| logging.basicConfig(level=logging.INFO) | ||
| car_name = "Orion" # Change to "Nightwatch", "Angelique", or "Orion" as needed | ||
| car_name = "Angelique" # Change to "Nightwatch", "Angelique", or "Orion" as needed |
There was a problem hiding this comment.
Hardcoding the car_name for testing purposes can be inconvenient for other developers who might need to test with a different car. This can lead to unnecessary code changes and potential merge conflicts.
Consider using command-line arguments to make the script more flexible. This would allow any developer to easily specify the car to test without modifying the source code.
For example, you could use Python's argparse module:
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Run paho testing for a specific car.')
parser.add_argument('--car', type=str, default='Angelique', choices=['Nightwatch', 'Angelique', 'Orion'],
help='The name of the car to test.')
args = parser.parse_args()
logging.basicConfig(level=logging.INFO)
car_name = args.car
# ... rest of the scriptThen you can run the script like this from your terminal: python paho_testing.py --car Orion.
There was a problem hiding this comment.
Pull request overview
This PR primarily reformats and standardizes the exported Grafana dashboard JSON for Angelique real-time dashboards to improve consistency and reduce noisy diffs, with one additional change in a local testing script.
Changes:
- Reformat multiple Angelique real-time Grafana dashboard JSON files (pretty-printing / consistent structure).
- Replace large per-field hide override lists with a simpler “hide everything by default” override plus explicit “unhide” overrides for the intended series.
- Change the default
car_nameinpaho_testing.pywhen executed as a script.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| telemtry/analysis/database/paho_testing.py | Changes the default car_name used for local/manual runs. |
| telemtry/analysis/database/dashboards/angelique/real-time/thermals.json | Reformats dashboard JSON and simplifies field overrides (hide-all + explicit unhide). |
| telemtry/analysis/database/dashboards/angelique/real-time/low_voltage_battery.json | Reformats dashboard JSON and simplifies field overrides. |
| telemtry/analysis/database/dashboards/angelique/real-time/electronics.json | Reformats dashboard JSON and simplifies field overrides. |
| telemtry/analysis/database/dashboards/angelique/real-time/dynamics.json | Reformats dashboard JSON and simplifies field overrides. |
| telemtry/analysis/database/dashboards/angelique/real-time/controls.json | Reformats dashboard JSON and simplifies field overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if __name__ == '__main__': | ||
| logging.basicConfig(level=logging.INFO) | ||
| car_name = "Orion" # Change to "Nightwatch", "Angelique", or "Orion" as needed | ||
| car_name = "Angelique" # Change to "Nightwatch", "Angelique", or "Orion" as needed |
There was a problem hiding this comment.
This PR is focused on Grafana dashboard formatting/consistency, but this change alters the default car_name used when running this script directly. That can unexpectedly change local test behavior for anyone relying on the previous default. Suggest reverting this default (or making it configurable via CLI arg/env var) and keeping dashboard-only changes in this PR.
grafana ocd