feature: Add Via Style as a form option#221
Merged
Merged
Conversation
bmfmancini
previously approved these changes
May 16, 2026
Contributor
There was a problem hiding this comment.
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
viastylevalue when saving link properties and expose it in the linkasJS()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>
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>
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>
bmfmancini
approved these changes
May 16, 2026
xmacan
approved these changes
May 16, 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 commit adds a new form element to control the Via Style of a Graph.
Closes #219