Skip to content

Use package manager for 3rd party JS in Storm-UI#8427

Merged
reiabreu merged 4 commits intomasterfrom
7815
Mar 18, 2026
Merged

Use package manager for 3rd party JS in Storm-UI#8427
reiabreu merged 4 commits intomasterfrom
7815

Conversation

@rzo1
Copy link
Contributor

@rzo1 rzo1 commented Mar 16, 2026

  • Replace all 19 vendored JavaScript/CSS files in WEB-INF/ with proper npm
    dependency management and webpack bundling
  • All frontend dependencies are now declared in package.json and bundled at
    build time — no vendored JS/CSS remains in VCS
  • Upgrade all dependencies to latest compatible versions, including jQuery
    4.0, DataTables 2.x, Cytoscape 3.x, Mustache 4.x, js-yaml 4.x
  • Replace the third-party jsonFormatter jQuery plugin (MIT, used eval()) with
    a clean ASF-licensed reimplementation using JSON.parse()
  • Add Cypress E2E test suite (37 tests, 7 specs) with mocked Storm REST API
    covering all UI pages
  • Add WebappBundleTest.java to verify webpack bundles exist on classpath
  • Update LICENSE-binary paths and versions for npm-managed packages

Screenies:

Bildschirmfoto 2026-03-16 um 20 25 41 image

rzo1 added 3 commits March 16, 2026 10:11
  Replace vendored JS/CSS libraries with npm + webpack build pipeline

  Removes 19 vendored JavaScript and CSS files from WEB-INF that were
  checked directly into VCS and replaces them with proper npm dependency
  management and webpack bundling.

  Changes:
  - Add package.json with all UI dependencies (jQuery, Bootstrap, DataTables,
    Mustache, Moment.js, vis.js, Cytoscape, etc.) managed via npm
  - Add webpack.config.js producing 3 minified bundles: main, visualize, flux
  - Integrate frontend-maven-plugin to run npm install + webpack during
    Maven generate-resources phase
  - Update all 10 HTML pages to reference webpack bundles instead of
    individual script/link tags
  - Add Cypress E2E test suite (35 tests across 7 specs) with mocked
    Storm REST API to verify all UI pages render correctly
  - Add WebappBundleTest.java to verify webpack bundles exist on classpath
  - Update RAT exclusions for npm/webpack artifacts
  - Upgrade DataTables to 2.x and Cytoscape to 3.x for proper module support
    - Replace third-party jsonFormatter plugin with ASF-licensed
      reimplementation (uses JSON.parse instead of eval)
    - Update LICENSE-binary paths and versions for npm packages
  Upgrade all frontend dependencies to their latest compatible versions:
  - jQuery 3.5.1 -> 4.0.0 (with compatibility shims for removed APIs)
  - js-yaml 3.14.1 -> 4.1.1
  - moment 2.29.4 -> 2.30.1
  - cytoscape 3.30.4 -> 3.33.1
  - cypress 13.x -> 15.x, express 4.x -> 5.x, webpack-cli 5.x -> 7.x,
    css-minimizer-webpack-plugin 7.x -> 8.x

  jQuery 4 removed several legacy APIs ($.parseJSON, $.trim, $.isArray,
  $.isFunction, $.isNumeric, $.type) that are still used by inline HTML
  scripts and the jquery-blockui plugin. Added compatibility shims in
  main-entry.js so all existing UI code continues to work.

  Bootstrap stays at 3.3.1 — upgrading to 5.x would require rewriting
  all HTML templates.
@rzo1 rzo1 marked this pull request as draft March 16, 2026 09:34
@rzo1 rzo1 requested review from avermeer, jnioche and reiabreu March 16, 2026 19:59
@rzo1 rzo1 added this to the 2.8.5 milestone Mar 16, 2026
@rzo1 rzo1 marked this pull request as ready for review March 16, 2026 20:00
@rzo1 rzo1 changed the title DRAFT: #7815 - Use package manager for 3rd party JS in Storm-UI #7815 - Use package manager for 3rd party JS in Storm-UI Mar 16, 2026
@reiabreu reiabreu merged commit 922ab94 into master Mar 18, 2026
12 checks passed
@reiabreu reiabreu changed the title #7815 - Use package manager for 3rd party JS in Storm-UI Use package manager for 3rd party JS in Storm-UI Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants