This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new f3bef0363 Upgrade vis.js to vis-network 10.0.2 and vis-data 8.0.3 in
/storm-webapp; Fix Java 20 -> 21 in YAML files; Fix Frontend Plugin to use Node
24
f3bef0363 is described below
commit f3bef0363dd976add491326a4aa7a7ec6e1a875c
Author: Richard Zowalla <[email protected]>
AuthorDate: Fri Apr 3 08:36:49 2026 +0200
Upgrade vis.js to vis-network 10.0.2 and vis-data 8.0.3 in /storm-webapp;
Fix Java 20 -> 21 in YAML files; Fix Frontend Plugin to use Node 24
---
.github/workflows/nightlies.yaml | 4 +-
.github/workflows/snapshots.yaml | 4 +-
.github/workflows/update-license-files.yml | 4 +-
storm-webapp/package-lock.json | 124 ++++++++++++++-------
storm-webapp/package.json | 3 +-
storm-webapp/pom.xml | 2 +-
.../apache/storm/daemon/ui/WEB-INF/visualize.html | 2 +-
storm-webapp/src/main/webapp/js/visualization.js | 49 ++++++--
storm-webapp/src/main/webapp/js/visualize-entry.js | 8 +-
9 files changed, 140 insertions(+), 60 deletions(-)
diff --git a/.github/workflows/nightlies.yaml b/.github/workflows/nightlies.yaml
index b6badea36..465f12edd 100644
--- a/.github/workflows/nightlies.yaml
+++ b/.github/workflows/nightlies.yaml
@@ -40,11 +40,11 @@ jobs:
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 #
v6.2.0
with:
python-version: '3.10'
- - name: Set up JDK ${{ matrix.java }}
+ - name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 #
v5.2.0
with:
distribution: temurin
- java-version: 20
+ java-version: 21
- name: Ensure a clean state without storm artifacts
run: rm -rf ~/.m2/repository/org/apache/storm
- name: Set up project dependencies
diff --git a/.github/workflows/snapshots.yaml b/.github/workflows/snapshots.yaml
index c58a2a30a..e00cc97bf 100644
--- a/.github/workflows/snapshots.yaml
+++ b/.github/workflows/snapshots.yaml
@@ -40,11 +40,11 @@ jobs:
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 #
v6.2.0
with:
python-version: '3.10'
- - name: Set up JDK ${{ matrix.java }}
+ - name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 #
v5.2.0
with:
distribution: temurin
- java-version: 20
+ java-version: 21
- id: extract_version
name: Extract project version
shell: bash
diff --git a/.github/workflows/update-license-files.yml
b/.github/workflows/update-license-files.yml
index 518c6751c..a81e5ff8a 100644
--- a/.github/workflows/update-license-files.yml
+++ b/.github/workflows/update-license-files.yml
@@ -42,11 +42,11 @@ jobs:
with:
python-version: '3.10'
- - name: Set up JDK 17
+ - name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 #
v5.2.0
with:
distribution: temurin
- java-version: 17
+ java-version: 21
- name: Ensure clean state without storm artifacts
run: rm -rf ~/.m2/repository/org/apache/storm
diff --git a/storm-webapp/package-lock.json b/storm-webapp/package-lock.json
index cabd14626..aef79537c 100644
--- a/storm-webapp/package-lock.json
+++ b/storm-webapp/package-lock.json
@@ -24,7 +24,8 @@
"moment": "2.30.1",
"mustache": "4.2.0",
"typeahead.js": "0.11.1",
- "vis": "4.21.0"
+ "vis-data": "8.0.3",
+ "vis-network": "10.0.2"
},
"devDependencies": {
"css-loader": "^7.1.1",
@@ -99,6 +100,19 @@
"node": ">=14.17.0"
}
},
+ "node_modules/@egjs/hammerjs": {
+ "version": "2.0.17",
+ "resolved":
"https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
+ "integrity":
"sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/hammerjs": "^2.0.36"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
"node_modules/@hapi/address": {
"version": "5.1.1",
"resolved":
"https://registry.npmjs.org/@hapi/address/-/address-5.1.1.tgz",
@@ -303,6 +317,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/hammerjs": {
+ "version": "2.0.46",
+ "resolved":
"https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.46.tgz",
+ "integrity":
"sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/@types/istanbul-lib-coverage": {
"version": "2.0.6",
"resolved":
"https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
@@ -1368,6 +1389,19 @@
"node": ">=4.0.0"
}
},
+ "node_modules/component-emitter": {
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/component-emitter/-/component-emitter-2.0.0.tgz",
+ "integrity":
"sha512-4m5s3Me2xxlVKG9PkZpQqHQR7bgpnN7joDMJ4yvVkVXngjoITG76IaZmzmywSeRTeTpc6N6r3H3+KyUurV8OYw==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/content-disposition": {
"version": "1.0.1",
"resolved":
"https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
@@ -1999,14 +2033,6 @@
"dev": true,
"license": "ISC"
},
- "node_modules/emitter-component": {
- "version": "1.1.2",
- "resolved":
"https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.2.tgz",
- "integrity":
"sha512-QdXO3nXOzZB4pAjM0n6ZE+R9/+kPpECA/XSELIcc54NeYVnBqIk+4DFiBgK+8QbV3mdvTG6nedl7dTYgO+5wDw==",
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved":
"https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -2721,15 +2747,6 @@
"lodash": "^4.17.15"
}
},
- "node_modules/hammerjs": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
- "integrity":
"sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.8.0"
- }
- },
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -3267,7 +3284,8 @@
"node_modules/keycharm": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/keycharm/-/keycharm-0.2.0.tgz",
- "integrity":
"sha512-i/XBRTiLqRConPKioy2oq45vbv04e8x59b0mnsIRQM+7Ec/8BC7UcL5pnC4FMeGb8KwG7q4wOMw7CtNZf5tiIg=="
+ "integrity":
"sha512-i/XBRTiLqRConPKioy2oq45vbv04e8x59b0mnsIRQM+7Ec/8BC7UcL5pnC4FMeGb8KwG7q4wOMw7CtNZf5tiIg==",
+ "peer": true
},
"node_modules/kind-of": {
"version": "6.0.3",
@@ -4451,15 +4469,6 @@
"node": ">= 0.6.0"
}
},
- "node_modules/propagating-hammerjs": {
- "version": "1.5.0",
- "resolved":
"https://registry.npmjs.org/propagating-hammerjs/-/propagating-hammerjs-1.5.0.tgz",
- "integrity":
"sha512-3PUXWmomwutoZfydC+lJwK1bKCh6sK6jZGB31RUX6+4EXzsbkDZrK4/sVR7gBrvJaEIwpTVyxQUAd29FKkmVdw==",
- "license": "MIT",
- "dependencies": {
- "hammerjs": "^2.0.8"
- }
- },
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved":
"https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@@ -5569,7 +5578,6 @@
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity":
"sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
- "dev": true,
"license": "MIT",
"bin": {
"uuid": "dist/bin/uuid"
@@ -5600,18 +5608,54 @@
"extsprintf": "^1.2.0"
}
},
- "node_modules/vis": {
- "version": "4.21.0",
- "resolved": "https://registry.npmjs.org/vis/-/vis-4.21.0.tgz",
- "integrity":
"sha512-jonDXTGm2mFU/X6Kg9pvkZEQtXh2J6+NlDJD1tDP7TDCFy+qNeKlsTcXKQtv4nAtUIiKo6sphCt4kbRlEKw75A==",
- "deprecated": "Please consider using https://github.com/visjs",
+ "node_modules/vis-data": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/vis-data/-/vis-data-8.0.3.tgz",
+ "integrity":
"sha512-jhnb6rJNqkKR1Qmlay0VuDXY9ZlvAnYN1udsrP4U+krgZEq7C0yNSKdZqmnCe13mdnf9AdVcdDGFOzy2mpPoqw==",
"license": "(Apache-2.0 OR MIT)",
- "dependencies": {
- "emitter-component": "^1.1.1",
- "hammerjs": "^2.0.8",
- "keycharm": "^0.2.0",
- "moment": "^2.18.1",
- "propagating-hammerjs": "^1.4.6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/visjs"
+ },
+ "peerDependencies": {
+ "uuid": "^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 ||
^13.0.0",
+ "vis-util": ">=6.0.0"
+ }
+ },
+ "node_modules/vis-network": {
+ "version": "10.0.2",
+ "resolved":
"https://registry.npmjs.org/vis-network/-/vis-network-10.0.2.tgz",
+ "integrity":
"sha512-qPl8GLYBeHEFqiTqp4VBbYQIJ2EA8KLr7TstA2E8nJxfEHaKCU81hQLz7hhq11NUpHbMaRzBjW5uZpVKJ45/wA==",
+ "license": "(Apache-2.0 OR MIT)",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/visjs"
+ },
+ "peerDependencies": {
+ "@egjs/hammerjs": "^2.0.0",
+ "component-emitter": "^1.3.0 || ^2.0.0",
+ "keycharm": "^0.2.0 || ^0.3.0 || ^0.4.0",
+ "uuid": "^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 ||
^13.0.0",
+ "vis-data": ">=8.0.0",
+ "vis-util": ">=6.0.0"
+ }
+ },
+ "node_modules/vis-util": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/vis-util/-/vis-util-6.0.0.tgz",
+ "integrity":
"sha512-qtpts3HRma0zPe4bO7t9A2uejkRNj8Z2Tb6do6lN85iPNWExFkUiVhdAq5uLGIUqBFduyYeqWJKv/jMkxX0R5g==",
+ "license": "(Apache-2.0 OR MIT)",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/visjs"
+ },
+ "peerDependencies": {
+ "@egjs/hammerjs": "^2.0.0",
+ "component-emitter": "^1.3.0 || ^2.0.0"
}
},
"node_modules/wait-on": {
diff --git a/storm-webapp/package.json b/storm-webapp/package.json
index 93796ee96..d335902e9 100644
--- a/storm-webapp/package.json
+++ b/storm-webapp/package.json
@@ -28,7 +28,8 @@
"moment": "2.30.1",
"mustache": "4.2.0",
"typeahead.js": "0.11.1",
- "vis": "4.21.0"
+ "vis-data": "8.0.3",
+ "vis-network": "10.0.2"
},
"devDependencies": {
"css-loader": "^7.1.1",
diff --git a/storm-webapp/pom.xml b/storm-webapp/pom.xml
index 20ba3626c..50c28a991 100644
--- a/storm-webapp/pom.xml
+++ b/storm-webapp/pom.xml
@@ -160,7 +160,7 @@
<artifactId>frontend-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
- <nodeVersion>v20.18.0</nodeVersion>
+ <nodeVersion>v24.14.1</nodeVersion>
<workingDirectory>${basedir}</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
diff --git
a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/WEB-INF/visualize.html
b/storm-webapp/src/main/java/org/apache/storm/daemon/ui/WEB-INF/visualize.html
index 2a8dedf71..4bcc66c98 100644
---
a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/WEB-INF/visualize.html
+++
b/storm-webapp/src/main/java/org/apache/storm/daemon/ui/WEB-INF/visualize.html
@@ -73,7 +73,7 @@
<details>
<summary>
{{#:show_link}}
- <a href="#"
onclick="network.selectNodes(['{{:component}}']);
handleNodeClickEvent('{{:component}}'); return false;">{{:component}}</a>
+ <a href="#"
data-component="{{:component}}" class="component-link">{{:component}}</a>
{{/:show_link}}
{{^:show_link}}
{{:component}}
diff --git a/storm-webapp/src/main/webapp/js/visualization.js
b/storm-webapp/src/main/webapp/js/visualization.js
index baaf92c46..afc96af77 100644
--- a/storm-webapp/src/main/webapp/js/visualization.js
+++ b/storm-webapp/src/main/webapp/js/visualization.js
@@ -16,6 +16,23 @@
* limitations under the License.
*/
+function tooltipElement(lines) {
+ var container = document.createElement("div");
+ lines.forEach(function(line, i) {
+ if (line.bold) {
+ var b = document.createElement("b");
+ b.textContent = line.text;
+ container.appendChild(b);
+ } else {
+ container.appendChild(document.createTextNode(line.text));
+ }
+ if (i < lines.length - 1) {
+ container.appendChild(document.createElement("br"));
+ }
+ });
+ return container;
+}
+
var visNS = {
// Update / refresh setting
shouldUpdate: true,
@@ -257,10 +274,12 @@ function parseNode(nodeJson, nodeId) {
selectedCol = "#ffc180";
}
- // Generate title
- var title = "<b>" + nodeId + "</b><br/>";
- title += "Capacity: " + nodeJson[":capacity"] + "<br/>";
- title += "Latency: " + nodeJson[":latency"]
+ // Generate title as DOM element (vis-network 10 does not render HTML
strings)
+ var title = tooltipElement([
+ { text: nodeId, bold: true },
+ { text: "Capacity: " + nodeJson[":capacity"] },
+ { text: "Latency: " + nodeJson[":latency"] }
+ ])
// Construct the node
var node = {
@@ -317,7 +336,11 @@ function parseEdge(edgeJson, sourceId) {
"from": edgeJson[":component"],
"to": sourceId,
"label": edgeJson[":stream"],
- "title": "From: " + edgeJson[":component"] + "<br>To: " + sourceId
+ "<br>Grouping: " + edgeJson[":grouping"]
+ "title": tooltipElement([
+ { text: "From: " + edgeJson[":component"] },
+ { text: "To: " + sourceId },
+ { text: "Grouping: " + edgeJson[":grouping"] }
+ ])
});
}
}
@@ -410,12 +433,22 @@ function asc_sort(a, b){
return ($(b).text()) < ($(a).text()) ? 1 : -1;
}
-// Expose for Cypress testing and inline script access
-window.visNS = visNS;
-window.checkStream = checkStream;
+// Expose for Cypress testing only
+if (window.Cypress) {
+ window.visNS = visNS;
+ window.checkStream = checkStream;
+}
$(document).ready(function() {
visNS.networkContainer = document.getElementById("mynetwork");
update();
+
+ // Delegated handler replaces inline onclick on component links
+ $(document).on('click', '.component-link', function(e) {
+ e.preventDefault();
+ var comp = $(this).attr('data-component');
+ visNS.network.selectNodes([comp]);
+ handleNodeClickEvent(comp);
+ });
});
diff --git a/storm-webapp/src/main/webapp/js/visualize-entry.js
b/storm-webapp/src/main/webapp/js/visualize-entry.js
index 572d81a89..b92f03151 100644
--- a/storm-webapp/src/main/webapp/js/visualize-entry.js
+++ b/storm-webapp/src/main/webapp/js/visualize-entry.js
@@ -21,7 +21,7 @@
// --- CSS ---
require('bootstrap/dist/css/bootstrap.min.css');
-require('vis/dist/vis.min.css');
+require('vis-network/styles/vis-network.min.css');
require('../css/style.css');
// --- jQuery ---
@@ -52,8 +52,10 @@ $.url = function (param) {
return u;
};
-// --- vis.js ---
-var vis = require('vis');
+// --- vis-network + vis-data ---
+var vis = {};
+vis.Network = require('vis-network/peer').Network;
+vis.DataSet = require('vis-data/peer').DataSet;
window.vis = vis;
// --- Custom Storm visualization code ---