13 Commits
Author SHA1 Message Date
TheWitness d34fbaacc4 fix: Restore base javascript files for testing (#8037)
* fix: Restore base javascript files for testing

* fix: screenfull 6.0.2 is missing screenfull.js

* fix: Restoring screenful after discovering how the files are managed

* fix: Remove node modules directory after installing modules

* fix: Change in screenfull.js behavior affects cacti

* fix: Restore jQuery 4 compatibility in the tablesorter pager plugin

$.isArray()/$.trim() were removed in jQuery 4.0, which this PR pins in
package.json. The restored jquery.tablesorter.pager.js still called
E.isArray(...)/E.trim(...), so any Ajax pager response threw before
rendering. Also fix a TypeError in the countChildRows branch, which
indexed into `a` while it was still an undeclared var.

Add patches/tablesorter+2.32.0.patch so the fix survives the next
`npm run build:js` sync from node_modules, following the existing
pace-js patch-package precedent.

* fix: Rewrite screenfull's ESM export during sync-js instead of downgrading

screenfull 6+ ships ESM-only (`export default screenfull;` in
node_modules/screenfull/index.js), which throws "export declarations
may only appear at top level of a module" when the copied file is
loaded as a classic <script>.

Add a post-copy transform step to build/sync-js.mjs that rewrites that
line to `window.screenfull = screenfull;` for include/js/screenfull.js,
so the 6.0.2 pin in package.json can be kept instead of reverting to
5.2.0. Throws if the expected export line isn't found, so a future
screenfull release changing its export shape fails the build loudly
rather than silently shipping a broken asset.

Updates tests/js/sync_js.test.mjs to cover the transform and its
failure mode.
2026-09-18 06:16:35 -07:00
Thomas Vincent ca2e4f07c2 Build releases from managed dependencies (#7888)
* chore: manage front-end JavaScript libraries with npm and Dependabot

Move all third-party front-end JavaScript to npm so Dependabot tracks it, and
drop the committed copies in favour of a build. package.json pins jquery,
jquery-ui, jstree (3.3.12 -> 3.3.17), billboard.js, pace-js, tablesorter and
jquery-validation; build/sync-js.mjs copies their dist files into include/js/
and runs on npm install via postinstall.

pace-js carries a one-line local fix (a stray regex alternation that made it
match the empty string) applied through patch-package
(patches/pace-js+1.2.4.patch); the fix should be sent upstream so the patch can
be dropped. Only Cacti's own themed jquery-ui/jstree CSS stays committed.

An npm ecosystem is added to dependabot.yml for develop. The release pipeline
and any workflow that serves Cacti pages must run 'npm ci' (which builds via
postinstall) before use, since the generated files are no longer in the tree.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* hardening: remove vendored development artifacts

* feat(release): attach the built artifact to the release

The workflow already builds an attested, checksummed archive carrying the
Composer dependencies, then discards it after thirty days.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: fail the publish step when the bundle is empty

An unmatched glob would otherwise reach gh as a literal path.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: treat the maintenance lock notice as expected log output

The line records the lock working, so a second maintenance run overlapping
in CI failed unrelated pull requests.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: consolidate release dependency changelog

* ci: build managed JavaScript in release artifacts

* test: cover managed JavaScript build end to end

* deps: complete phpseclib 4 migration

* deps: update patch-package to audited release

* ci: satisfy workflow shell policy

* chore: source DOMPurify from npm and update it to 3.4.14

Add dompurify to the npm-managed set (was committed at 3.4.7) and bump to 3.4.14.
DOMPurify is the client-side XSS sanitizer used on tree labels, device tooltips
and plugin messages; keeping it current with upstream bypass fixes matters more
than for the UI libraries.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: preserve release changelog ordering

* test: preserve DOMPurify source map in npm build

* chore: source htmx, d3, big.js, lzjs and screenfull from npm

Add the remaining unmodified third-party libraries to the npm-managed build:
htmx.org 2.0.6, d3 7.8.2, big.js 6.2.2, lzjs 1.3.1 and screenfull 3.3.3. Each
was verified byte-identical (lzjs differs only in a JSDoc comment) to the copies
being removed. htmx in particular moves from a hand-tracked SHA pin to npm with
lockfile integrity.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test: cover phpseclib 4 integration

* ci: build managed assets before htmx tests

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-09-01 23:11:49 -07:00
Thomas VincentandTheWitness 255667b49d chore(assets): update jQuery UI and theme assets (#7082)
* chore(assets): update jQuery UI and theme assets

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(codex): restore jQuery UI compatibility and fix PHPStan issues

* fix(midwinter): restore full-width multiselect button rules dropped in jquery-ui rebuild

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: ignore phpstan function.alreadyNarrowedType identifier

Clears the level 6 alreadyNarrowedType error on lib/data_query.php:2591 that
develop currently emits, matching the sibling narrowing identifiers already ignored.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-06-24 14:49:05 -04:00
TheWitness 0290ab334e QA: Restore backward compatibility setting 2024-11-14 20:10:56 -05:00
TheWitness 3e668a9837 QA: Update jQueryUI to 1.14.1 2024-11-14 20:05:07 -05:00
TheWitness 59dbaae53b QA: Restore jQueryUI.js 2024-08-09 15:33:08 -04:00
TheWitness c7ac731bc5 Revert "Feature: Update jQueryUI to 1.14.0"
This reverts commit 7e1925647f.
2024-08-09 15:25:09 -04:00
TheWitness 7e1925647f Feature: Update jQueryUI to 1.14.0 2024-08-08 17:31:59 -04:00
TheWitness 12e6d5828c Upgrading jQuery and jQueryUI
jQuery to version 3.6.1 and jQueryUI to version 1.13.2
2022-10-19 19:49:14 -04:00
cigamit 1e28d3579c Resolving Issue #186
Cacti 1.x does not support jQueryUI 1.12.x.  This is the first of likely
a few commits to introduce jQueryUI 1.12.x into the core of Cacti.
2018-04-23 19:34:03 -05:00
cigamit 4e9f0245de Upgrade jQuery and jQueruUI to Latest Stable
Upgrade JQuery to 1.11.3, and JQueryUI to 1.11.4
2015-07-01 17:45:54 -05:00
Tony Roman 35d7e6eda3 Fix missing images and screwed up jquery files
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.8@7467 860744bd-22fc-0310-8c96-e9fe5004b5ca
2014-11-03 02:47:17 +00:00
Tony Roman 73790a388e Getting ready for overdue release!
- Update version to 0.8.8c
 - bug#0002228: GPL incompatible files included in Cacti project in include/treeview
 - feature: Added native jquery, jqueryui, and jstree
 - feature: Fixed issues with 'Clear' under preview not working
 - feature: Added new Tree navigation
 - feature: Added Columns and Thumbnails to Preview
 - feature: Added Columns to Tree (Preview only)
 - feature: Both Graphs and Columns default to 'Default'
 - feature: Resolved Left hand navigation taking entire page


git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.8@7466 860744bd-22fc-0310-8c96-e9fe5004b5ca
2014-11-03 01:28:29 +00:00