fix: #214, #202, #204 - Graph Sizes, Preview Broken, Legends, Changelog#232
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets several reported Weathermap plugin regressions/features by adjusting hover graph sizing logic, removing duplicated footer helper code, addressing a graph preview notice, and updating the changelog to reflect recent fixes.
Changes:
- Fixes hover graph sizing by attempting to source
graph_height/graph_widthfrom map style properties when buildinggraph_image.phpURLs. - Removes duplicated
weathermap_footer_links()implementations and centralizes it insetup.php. - Fixes the graph preview/map selector notice by initializing
$nullhash, and updatesCHANGELOG.mdwith recent items.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| weathermap-cacti-plugin.php | Initializes $nullhash in the map selector to avoid notices affecting preview/selector rendering. |
| weathermap-cacti-plugin-mgmt.php | Removes the duplicate weathermap_footer_links() implementation. |
| setup.php | Adds centralized weathermap_footer_links() implementation (now shared location). |
| lib/WeatherMap.class.php | Updates URL processing to append graph dimensions from map style defaults for LINK/NODE hover graphs. |
| CHANGELOG.md | Documents recent fixes/issues for the 1.6 section. |
xmacan
approved these changes
May 20, 2026
xmacan
previously approved these changes
May 20, 2026
xmacan
previously approved these changes
May 20, 2026
xmacan
previously approved these changes
May 20, 2026
xmacan
approved these changes
May 20, 2026
xmacan
approved these changes
May 20, 2026
xmacan
approved these changes
May 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
locales/po/cacti.pot:334
- The msgid text has a duplicated word: "displayed displayed". This should be corrected (and the source string in setup.php updated too) so translators don’t get the typo and the string doesn’t reappear the next time the POT file is regenerated.
msgid "When hovering over the Links or Nodes, what style of Graph is to be displayed?"
Comment on lines
+691
to
+705
| if ($context->my_type() == 'LINK') { | ||
| if (strpos($input, 'graph_height') === false) { | ||
| if (isset($this->links['DEFAULT']->overlibheight) && $this->links['DEFAULT']->overlibheight > 0) { | ||
| $input .= '&graph_height=' . $this->links['DEFAULT']->overlibheight; | ||
| } else { | ||
| $input .= '&graph_height=' . read_config_option('weathermap_height'); | ||
| } | ||
| } | ||
|
|
||
| if (strpos($input, 'graph_width') === false) { | ||
| if (isset($this->links['DEFAULT']->overlibwidth) && $this->links['DEFAULT']->overlibwidth > 0) { | ||
| $input .= '&graph_width=' . $this->links['DEFAULT']->overlibwidth; | ||
| } else { | ||
| $input .= '&graph_width=' . read_config_option('weathermap_width'); | ||
| } |
bmfmancini
approved these changes
May 20, 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 pull request does the following: