Skip to content

feature: Add Via Style as a form option#221

Merged
TheWitness merged 6 commits into
developfrom
viastyle-form-add
May 16, 2026
Merged

feature: Add Via Style as a form option#221
TheWitness merged 6 commits into
developfrom
viastyle-form-add

Conversation

@TheWitness
Copy link
Copy Markdown
Member

This commit adds a new form element to control the Via Style of a Graph.

Closes #219

image

bmfmancini
bmfmancini previously approved these changes May 16, 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

This PR adds a new “Via Style” control to the Weathermap editor’s Link Properties form, wiring it through the editor save action and into the link’s JS representation so the UI can round-trip the setting.

Changes:

  • Add a Via Style <select> (curved/angled) to the link properties dialog in the editor UI.
  • Persist the submitted viastyle value when saving link properties and expose it in the link asJS() payload.
  • Update gettext template (cacti.pot) and add a helper script to rebuild/merge gettext files.

Reviewed changes

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

Show a summary per file
File Description
weathermap-cacti-plugin-editor.php Adds the Via Style form control and adjusts some link/node editor UI strings/indentation.
lib/editor.actions.php Saves viastyle from the editor form into the link object.
lib/WeatherMapLink.class.php Exposes viastyle in the link’s JS representation for the editor to consume.
js/editor.js Populates the Via Style <select> when priming the link form.
locales/po/cacti.pot Updates the POT with new/changed UI strings (including Via Style strings).
locales/build_gettext.sh Adds a script for rebuilding/merging gettext catalogs and compiling .mo files.
CHANGELOG.md Adds an entry referencing feature #219 for the Via Style UI addition.
Comments suppressed due to low confidence (1)

weathermap-cacti-plugin-editor.php:577

  • The <select id='link_template'> element isn’t closed with a </select> before the cell ends. This is invalid HTML and may cause the Link Properties dialog to render inconsistently across browsers; add the missing closing tag after the PHP block.
										print '<option ' . (get_request_var('node_template') == $gt['id'] ? 'selected' : '');
										print ' value="' . $gt['id'] . '">' . html_escape($gt['name']) . '</option>';
									}
									?>
							</td>

Comment thread weathermap-cacti-plugin-editor.php
Comment thread weathermap-cacti-plugin-editor.php Outdated
Comment thread lib/editor.actions.php Outdated
Comment thread locales/po/cacti.pot Outdated
Comment thread CHANGELOG.md
Comment thread weathermap-cacti-plugin-editor.php
xmacan
xmacan previously approved these changes May 16, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
@TheWitness TheWitness dismissed stale reviews from xmacan and bmfmancini via b680472 May 16, 2026 17:59
TheWitness and others added 4 commits May 16, 2026 13:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
@TheWitness TheWitness requested review from bmfmancini and xmacan May 16, 2026 18:03
@TheWitness TheWitness merged commit 019cb7d into develop May 16, 2026
0 of 4 checks passed
@TheWitness TheWitness deleted the viastyle-form-add branch May 16, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

weathermap keeps disabling itself

4 participants