809 Commits
Author SHA1 Message Date
Weblate 8cd51a45f9 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-10-01 01:39:58 -05:00
Weblate 4496393530 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-10-01 01:39:58 -05:00
TheWitnessandCopilot 66358e0998 Adopt plugin table API and relocate schema to includes/database.php (#254)
* Relocate schema to includes/database.php via plugin table API + db_update_table upgrade

* CI: allowlist unmeasured schema bootstrap and web entry points

* CI: keep include_once for the settings-page-only lib/reports.php load (uncoverable)

* Add manifest.json + upgrade-time file pruning; consolidate themes/ into css/

* database: keep user-owned dashboards table across uninstall

api_plugin_db_table_create() records plugin_monitor_dashboards in
plugin_db_changes, so api_plugin_db_changes_remove() (run by
api_plugin_uninstall() after plugin_monitor_uninstall()) would drop it
even though monitor_drop_tables() intentionally leaves it in place. Remove
the 'create' ownership record after provisioning (install and upgrade
paths) so user dashboards survive an uninstall. Adds a regression test.

* Prune phpunit.xml on upgrade and ignore markdown-lint configs

phpunit.xml ships in the repo for CI but is a dev-only test artifact, so it
is removed from manifest.json 'expected', pruned from installs on upgrade
(like tests/), and excluded from the manifest drift check.

The retired markdown-lint configs (.mdlrc, .md_style.rb) are deleted, and
.md* is now ignored like .git*: protected from pruning and excluded from
drift if it reappears.

* Move libraries into includes/, flatten css, drop sonar config

db_functions.php, monitor_render.php and monitor_controller.php move into
includes/ (the latter two lose the monitor_ prefix, becoming render.php and
controller.php); monitor.php and the tests load them from there. Each per-theme
stylesheet css/<theme>/monitor.css becomes css/<theme>.css so users can drop
their own css/<theme>.css into the css base, and plugin_monitor_page_head()
looks there, falling back to css/monitor.css. The unreferenced
sonar-project.properties is removed. Old paths are tombstoned so existing
installs drop the stale copies on upgrade.

* Rename includes/db_functions.php to includes/functions.php

Follows the fleet convention for the plugin's shared library filename; monitor.php,
the measured-source list and the unit test load it from the new name.

* Regenerate cacti.pot for the includes/ file relocations

Moving the plugin's library files into includes/ changed the source-reference
lines in the translation template; regenerate it so the 'Verify translation
template' CI check passes.

* Harden prune against tampered-manifest path traversal

The upgrade-time prune now rejects any tombstone containing '.'/'..' segments
(which could escape the plugin directory or resolve to its root) and treats
ancestors of whitelist entries as protected, so a tombstone on a parent
directory can no longer delete a whitelisted file beneath it.

* docs: update and align the Project Structure block

Point the structure tree at the relocated files (libraries now under
includes/, data files under docs/, stylesheets under css/) and align the
trailing '# ...' comments to a single column so they no longer drift right.

* docs/tests: standardize test header and correct manifest-contract notes

- Use the full license header (from the plugin's own setup.php) in
  tests/Unit/PruneFilesTest.php instead of the abbreviated copyright banner.
- Document that the manifest drift check and the upgrade-time prune also
  handle phpunit.xml and .md* files, matching the implemented behavior.

* refactor: rename prune helpers to the plugin-slug function prefix

The repository naming contract reserves the plugin_<name>_ prefix for plugin
lifecycle / hook-registration functions; all other functions use the plain
<name>_ prefix. Rename the internal upgrade helpers accordingly:

  plugin_<name>_prune_files() -> <name>_prune_files()
  plugin_<name>_rmtree()      -> <name>_rmtree()

The call site, unit tests, and the copilot-instructions.md references are
updated to match. No behavioral change.

* chore: set the Cacti compatibility floor to 1.2.29

Align the compat metadata (and the contributor-guide references) with the
team decision to standardize the minimum supported Cacti version at 1.2.29;
the previously proposed 1.2.32 floor was not adopted.

* Bump plugin version to 3.0 so the upgrade-time cleanup migration runs

Add a 3.0 CHANGELOG section for this cycle's schema/manifest work and set
INFO version = 3.0 so existing 2.9 installs detect the version change and
run the schema refresh and manifest-based file prune.

---------

Co-authored-by: Copilot <copilot@users.noreply.github.com>
2026-10-01 01:39:53 -05:00
TheWitnessandTheWitness 314169ae76 ci: measure coverage with xdebug instead of pcov (#253)
The "Enforce coverage of changed lines" gate measured 0 lines because pcov only
instruments files under its auto-detected directory (the Composer root / vendor
parent), which excludes cacti/plugins/<plugin> when Pest runs from the cacti/
checkout. xdebug instruments every executed file, so changed-line coverage is
measured correctly. Matches the driver the rest of the plugin fleet uses.

Co-authored-by: TheWitness <copilot@users.noreply.github.com>
2026-09-29 21:44:29 -04:00
TheWitnessandTheWitness ccb1f821ee ci: enforce patch coverage of changed lines (#252)
* ci: enforce patch coverage of changed lines; drop COMPOSER_ROOT_VERSION

Adds tests/bin/patch-coverage.php and an "Enforce coverage of changed
lines" CI step (pull_request only) that fails when production PHP lines a
PR changes are left uncovered, mirroring plugin_thold. Whole-file
coverage is not meaningful for a Cacti plugin (most code only runs inside
a live Cacti), so the gate measures only the lines a change adds.

Also sets fetch-depth: 0 on the plugin checkout so the gate can diff
against the PR base, and removes the inert COMPOSER_ROOT_VERSION env from
the Pest step (it only affects composer root-version detection, which does
not run in that step).

* chore: ignore compiled locale files (locales/po/*.po, locales/LC_MESSAGES/*.mo)

---------

Co-authored-by: TheWitness <copilot@users.noreply.github.com>
2026-09-29 16:53:52 -04:00
TheWitness f09e94ab69 gitattributes: strip UTF-8 BOM so the header comment parses (#251) 2026-09-29 13:22:46 -04:00
Weblate 6f8129bd69 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 1c8bf7d7ff Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 052d13fd6d Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 4436012806 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate c9b636be4c Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate a370747efd Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 999d2c76d9 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate a04bedc975 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate fb60e883ba Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 1951e8acff Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate d38df98313 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate eddea97f0d Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 3f0149fbf2 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 1230430196 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate f8f9d13f67 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 6fb7fbebc8 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 844473c993 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate ed3739adc9 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate bd0eb84664 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate ac8034ed1e Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate 953e46ac7c Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate e657c9cd68 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:06 -05:00
Weblate dafb89ccea Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 19:44:05 -05:00
TheWitness c09bbb798c locales: drop source line numbers from translation template (#250)
build_gettext.sh now runs xgettext with --add-location=file, so
locales/po/cacti.pot records only the file name for each string, not the
file:line. Line-numbered locations churn on almost every code change,
which repeatedly breaks the 'Verify translation template is up to date'
CI check on unrelated PRs. Filename-only locations still tell translators
which file a string lives in but stay stable when surrounding lines move.
Regenerated cacti.pot with the updated script; only location comments
changed (no msgids added or removed).
2026-09-28 20:44:01 -04:00
Weblate 63130f1a06 Update translation files
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/monitor
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
2026-09-28 07:49:57 -05:00
Weblate 158b84fd51 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 2563273c21 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate c64d6e5eb7 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 6a8ffcd094 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate b3fab075f2 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate bd7cdb5377 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate d172b88b4c Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 6cec8b3b4b Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 6eee320283 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate f1277fec0f Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate b5ec0286ec Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 8bafbdb496 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
WeblateandEkaterine papava c636a88532 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translated using Weblate (Georgian)

Currently translated at 63.3% (166 of 262 strings)

Co-authored-by: Ekaterine papava <papava.e@gtu.ge>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/ka/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 46c6476de9 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 7a05d93626 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate fb7eec0719 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 817d8cf220 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate c7b30dd183 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00
Weblate 3d3b02925d Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.cacti.net/projects/cacti/monitor/
Translation: Cacti/monitor
2026-09-28 07:49:57 -05:00