Fixing #173, #186 - Data Source Selector and Standalone Maps#195
Merged
TheWitness merged 5 commits intodevelopfrom Feb 11, 2026
Merged
Fixing #173, #186 - Data Source Selector and Standalone Maps#195TheWitness merged 5 commits intodevelopfrom
TheWitness merged 5 commits intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses two reported weathermap plugin issues by optimizing editor autocomplete queries (Data Source selector) and making standalone-generated HTML maps include the necessary JS/CSS for hover popups, plus a small stats log message tweak.
Changes:
- Optimize graph/data source autocomplete SQL in
lib/editor.inc.phpto reduce joins and broaden search matching. - Make standalone HTML exports self-contained enough to support hover popups by adding required assets and encoding hover payloads safely.
- Adjust poller logging/HTML output handling and update the changelog.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/poller-common.php | Improves HTML output writability checks, generates standalone HTML output, and tweaks log message text. |
| lib/editor.inc.php | Refactors graph/data source selector queries for performance and search behavior. |
| lib/WeatherMap.class.php | Base64-encodes hover payloads and adds standalone HTML wrapper/assets via MakeHTML(..., $standalone=true). |
| lib/HTML_ImageMap.class.php | Indentation-only changes to generated <area> HTML. |
| js/weathermap.js | Decodes base64 hover payloads and adjusts tooltip behavior/DOM handling. |
| CHANGELOG.md | Notes fixes for issues #173 and #186. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 11, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: TheWitness <thewitness@cacti.net>
browniebraun
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix does the following:
This change simplifies the logic in weathermap.js to be less convoluted and encodes the data-hover string to reduce issues related to displaying embedded html inside of an html attribute.