feat: dashboard geojson map
- #4825
Summary by CodeRabbit
Release Notes
-
New Features
- Introduced new
MapsRenderercomponent for enhanced map visualizations. - Added support for selecting map types in the configuration panel.
- New dashboard components for managing map queries and data.
- Introduced new
-
Improvements
- Enhanced chart selection options, including new map-related types.
- Updated localization for better support of map functionalities.
-
Bug Fixes
- Refined drag-and-drop functionality for map fields.
- Improved error handling and data validation in map-related components.
-
Chores
- Updated component names and structure for consistency.
- Enhanced internal methods for better data handling and processing.
Walkthrough
The pull request introduces enhancements to dashboard functionalities by adding new data structures and modifying existing components. Key changes include the addition of fields in structures such as PanelFields, PanelConfig, and the introduction of the MapType structure. New Vue components, including MapsRenderer and DashboardMapsQueryBuilder, improve map handling. Existing components are updated to accommodate these changes, enhancing the overall capability of the dashboard to manage and visualize map-related data.
Changes
| File Path | Change Summary |
|---|---|
src/common/meta/dashboards/v5/mod.rs |
Added fields to PanelFields, PanelConfig, and introduced MapType structure. |
web/src/components/dashboards/PanelSchemaRenderer.vue |
Introduced MapsRenderer component; modified rendering logic for map-related panels. |
web/src/components/dashboards/addPanel/ChartSelection.vue |
Updated chartsArray to remove and reintroduce chart options, including "world-map". |
web/src/components/dashboards/addPanel/ConfigPanel.vue |
Added q-select for map_type, updated visibility logic for UI elements based on panel type. |
web/src/components/dashboards/addPanel/DashboardGeoMapsQueryBuilder.vue |
Renamed component; updated drag-and-drop functionality and hints for data handling. |
web/src/components/dashboards/addPanel/DashboardMapsQueryBuilder.vue |
New component for map queries with drag-and-drop functionality. |
web/src/components/dashboards/addPanel/DashboardQueryBuilder.vue |
Updated to handle new map types and refined drag-and-drop logic. |
web/src/components/dashboards/addPanel/FieldList.vue |
Added functionality for managing map fields with new buttons for map name and value. |
web/src/components/dashboards/panels/MapsRenderer.vue |
New component for rendering world maps using ECharts. |
web/src/composables/useDashboardPanel.ts |
Added methods and properties to support map functionalities, including mapChart and geoMapChart. |
web/src/locales/languages/en.json |
Added new localization keys for map-related functionalities. |
web/src/utils/dashboard/convertGeoMapData.ts |
Renamed function and enhanced data validation and error handling for map data conversion. |
web/src/utils/dashboard/convertMapsData.ts |
New utility function for transforming map data into a chart-renderable format. |
web/src/utils/dashboard/convertPanelData.ts |
Updated to utilize new map conversion functions and handle new panel types. |
web/src/views/Dashboards/addPanel/AddPanel.vue |
Enhanced field alias handling and added query cancellation functionality. |
Possibly related PRs
- #3543: The changes in this PR enhance the configuration options for dashboard panels, specifically adding new fields related to map types, which aligns with the main PR's focus on enhancing dashboard configurations.
-
#3767: This PR introduces new fields and structures related to dashboard configurations, which may relate to the main PR's modifications to the
PanelConfigstructure. - #3866: The introduction of a cancellation feature for dashboard queries relates to the overall functionality of dashboard management, which is a broader context of the main PR's enhancements.
- #4082: This PR adds support for VRL functions, which ties into the main PR's focus on enhancing dashboard configurations and functionalities.
-
#4798: The introduction of override configurations in this PR is directly related to the main PR's enhancements to the
PanelConfigstruct and its capabilities. - #4650: The enhancements for comparing current data with past data support the overall functionality of dashboards, which is a key aspect of the main PR's focus on dashboard configurations.
- #4687: The hash check mechanism introduced in this PR enhances the integrity of dashboard updates, which complements the structural changes made in the main PR.
-
#4990: The addition of
data-testattributes for improved testability in dashboard settings aligns with the overall goal of enhancing the dashboard's functionality and user experience, which is a focus of the main PR.
Suggested reviewers
- ktx-kirtan
- oasisk
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
🪧 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. -
Generate unit testing code for this file. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin 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 src/utils.ts and generate unit testing code. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- 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.
@ktx-vaidehi @ktx-kirtan This is such a good feature, assuming it uses echarts map without having to use a map service?
@coderabbitai review
:white_check_mark: Actions performed
Review triggered.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.