Skip to content

fix: #214, #202, #204 - Graph Sizes, Preview Broken, Legends, Changelog#232

Merged
TheWitness merged 8 commits into
developfrom
changelog-and-more
May 20, 2026
Merged

fix: #214, #202, #204 - Graph Sizes, Preview Broken, Legends, Changelog#232
TheWitness merged 8 commits into
developfrom
changelog-and-more

Conversation

@TheWitness
Copy link
Copy Markdown
Member

This pull request does the following:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_width from map style properties when building graph_image.php URLs.
  • Removes duplicated weathermap_footer_links() implementations and centralizes it in setup.php.
  • Fixes the graph preview/map selector notice by initializing $nullhash, and updates CHANGELOG.md with 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.

Comment thread lib/WeatherMap.class.php
Comment thread setup.php Outdated
Comment thread setup.php
Comment thread lib/WeatherMap.class.php
xmacan
xmacan previously approved these changes May 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Comment thread weathermap-cacti-plugin.php
Comment thread lib/WeatherMap.class.php
Comment thread lib/WeatherMap.class.php
Comment thread locales/po/cacti.pot Outdated
xmacan
xmacan previously approved these changes May 20, 2026
xmacan
xmacan previously approved these changes May 20, 2026
@TheWitness TheWitness merged commit 39f58dd into develop May 20, 2026
8 checks passed
@TheWitness TheWitness deleted the changelog-and-more branch May 20, 2026 14:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread lib/WeatherMap.class.php
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');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants