This is an automated email from the ASF dual-hosted git repository.
fantonangeli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 71e98dce45a Jobs Service - Display version information from jobs
service webapp. (#3411)
71e98dce45a is described below
commit 71e98dce45a750171be1e3b2b8bd558ed855ba8f
Author: Kumar Aditya Raj <[email protected]>
AuthorDate: Thu Jan 29 16:30:32 2026 +0530
Jobs Service - Display version information from jobs service webapp. (#3411)
Co-authored-by: kumaradityaraj <[email protected]>
---
packages/kogito-jobs-service-webapp/env/index.js | 5 ++
packages/kogito-jobs-service-webapp/package.json | 1 -
packages/kogito-jobs-service-webapp/src/index.html | 24 +++++----
packages/kogito-jobs-service-webapp/src/styles.css | 8 +++
.../kogito-jobs-service-webapp/webpack.config.js | 37 ++++----------
pnpm-lock.yaml | 57 ++++++++++------------
6 files changed, 64 insertions(+), 68 deletions(-)
diff --git a/packages/kogito-jobs-service-webapp/env/index.js
b/packages/kogito-jobs-service-webapp/env/index.js
index 6d9f447f97b..17296179972 100644
--- a/packages/kogito-jobs-service-webapp/env/index.js
+++ b/packages/kogito-jobs-service-webapp/env/index.js
@@ -45,6 +45,10 @@ module.exports =
composeEnv([require("@kie-tools/root-env/env")], {
default: "SonataFlow Jobs Service docs",
description: "Documentation link text",
},
+ KOGITO_JOBS_SERVICE_WEBAPP_version: {
+ default: require("../package.json").version,
+ description: "Kogito Jobs Service Version",
+ },
}),
get env() {
return {
@@ -62,6 +66,7 @@ module.exports =
composeEnv([require("@kie-tools/root-env/env")], {
href:
getOrDefault(this.vars.SONATAFLOW_JOBS_SERVICE_WEBAPP_docLinkHref),
text:
getOrDefault(this.vars.SONATAFLOW_JOBS_SERVICE_WEBAPP_docLinkText),
},
+ version: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_WEBAPP_version),
},
};
},
diff --git a/packages/kogito-jobs-service-webapp/package.json
b/packages/kogito-jobs-service-webapp/package.json
index f4c708657e5..c6c17d90e4a 100644
--- a/packages/kogito-jobs-service-webapp/package.json
+++ b/packages/kogito-jobs-service-webapp/package.json
@@ -25,7 +25,6 @@
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"copy-webpack-plugin": "^11.0.0",
- "html-replace-webpack-plugin": "^2.6.0",
"html-webpack-plugin": "^5.3.2",
"jest": "^29.7.0",
"rimraf": "^3.0.2",
diff --git a/packages/kogito-jobs-service-webapp/src/index.html
b/packages/kogito-jobs-service-webapp/src/index.html
index cf394acfc83..9bdd24f5cde 100644
--- a/packages/kogito-jobs-service-webapp/src/index.html
+++ b/packages/kogito-jobs-service-webapp/src/index.html
@@ -22,16 +22,22 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>${KOGITO_JOBS_SERVICE_WEBAPP_TITLE}</title>
+ <title><%= KOGITO_JOBS_SERVICE_WEBAPP_TITLE %></title>
<link rel="stylesheet" href="styles.css" />
- <link rel="shortcut icon" type="image/x-icon"
href="${KOGITO_JOBS_SERVICE_WEBAPP_LOGO}" />
+ <link rel="shortcut icon" type="image/x-icon" href="<%=
KOGITO_JOBS_SERVICE_WEBAPP_LOGO %>" />
</head>
<body>
<div class="maindiv">
<div class="container">
- <div class="logo" style="display: flex; justify-content: center">
- <img src="${KOGITO_JOBS_SERVICE_WEBAPP_LOGO}" alt="KIE Logo" />
- <h1>${KOGITO_JOBS_SERVICE_WEBAPP_TITLE}</h1>
+ <div class="logo" style="display: flex; justify-content: center;
align-items: center">
+ <img src="<%= KOGITO_JOBS_SERVICE_WEBAPP_LOGO %>" alt="KIE Logo" />
+
+ <div style="display: flex; flex-direction: column; gap: 4px">
+ <h1 style="margin: 0"><%= KOGITO_JOBS_SERVICE_WEBAPP_TITLE %></h1>
+ <h6 style="margin: 0; font-weight: normal" class="versionInfo">
+ <%= KOGITO_JOBS_SERVICE_WEBAPP_VERSION %>
+ </h6>
+ </div>
</div>
<div>
<h4>Your Jobs service is up and working!</h4>
@@ -43,13 +49,13 @@
</p>
<div class="linkbutton">
<div>
- <a href="${SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_HREF}"
class="btn" target="_blank"
- >${SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT}</a
+ <a href="<%= SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_HREF %>"
class="btn" target="_blank"
+ ><%= SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT %></a
>
</div>
<div>
- <a href="${KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_HREF}" class="btn"
target="_blank"
- >${KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT}</a
+ <a href="<%= KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_HREF %>"
class="btn" target="_blank"
+ ><%= KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT %></a
>
</div>
</div>
diff --git a/packages/kogito-jobs-service-webapp/src/styles.css
b/packages/kogito-jobs-service-webapp/src/styles.css
index 2792b3d77e4..b69a90bd76c 100644
--- a/packages/kogito-jobs-service-webapp/src/styles.css
+++ b/packages/kogito-jobs-service-webapp/src/styles.css
@@ -81,6 +81,10 @@ p {
justify-content: space-around;
}
+.versionInfo {
+ color: #1f1e1e;
+}
+
@media (prefers-color-scheme: dark) {
.maindiv,
.container {
@@ -91,4 +95,8 @@ p {
p {
color: #fefefe;
}
+
+ .versionInfo {
+ color: #fff;
+ }
}
diff --git a/packages/kogito-jobs-service-webapp/webpack.config.js
b/packages/kogito-jobs-service-webapp/webpack.config.js
index 7c0864878ab..a2618cb91b1 100644
--- a/packages/kogito-jobs-service-webapp/webpack.config.js
+++ b/packages/kogito-jobs-service-webapp/webpack.config.js
@@ -22,7 +22,6 @@ const CopyPlugin = require("copy-webpack-plugin");
const { merge } = require("webpack-merge");
const common = require("@kie-tools-core/webpack-base/webpack.common.config");
const { env } = require("./env");
-const HtmlReplaceWebpackPlugin = require("html-replace-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = async (webpackEnv) =>
@@ -38,34 +37,16 @@ module.exports = async (webpackEnv) =>
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "src/index.html"),
filename: "index.html",
- chunks: ["app"],
- }),
- new HtmlReplaceWebpackPlugin([
- {
- pattern: /\${KOGITO_JOBS_SERVICE_WEBAPP_TITLE}/g,
- replacement: () => env.kogitoJobsServiceWebapp.title ?? "",
- },
- {
- pattern: /\${KOGITO_JOBS_SERVICE_WEBAPP_LOGO}/g,
- replacement: () => env.kogitoJobsServiceWebapp.logo ?? "",
- },
- {
- pattern: /\${KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_HREF}/g,
- replacement: () => env.kogitoJobsServiceWebapp.docLinkKogito.href ??
"",
- },
- {
- pattern: /\${KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT}/g,
- replacement: () => env.kogitoJobsServiceWebapp.docLinkKogito.text ??
"",
+ templateParameters: {
+ KOGITO_JOBS_SERVICE_WEBAPP_TITLE: env.kogitoJobsServiceWebapp.title,
+ KOGITO_JOBS_SERVICE_WEBAPP_LOGO: env.kogitoJobsServiceWebapp.logo,
+ KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_HREF:
env.kogitoJobsServiceWebapp.docLinkKogito.href,
+ KOGITO_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT:
env.kogitoJobsServiceWebapp.docLinkKogito.text,
+ SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_HREF:
env.kogitoJobsServiceWebapp.docLinkSonataflow.href,
+ SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT:
env.kogitoJobsServiceWebapp.docLinkSonataflow.text,
+ KOGITO_JOBS_SERVICE_WEBAPP_VERSION:
env.kogitoJobsServiceWebapp.version,
},
- {
- pattern: /\${SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_HREF}/g,
- replacement: () =>
env.kogitoJobsServiceWebapp.docLinkSonataflow.href ?? "",
- },
- {
- pattern: /\${SONATAFLOW_JOBS_SERVICE_WEBAPP_DOCLINK_TEXT}/g,
- replacement: () =>
env.kogitoJobsServiceWebapp.docLinkSonataflow.text ?? "",
- },
- ]),
+ }),
],
ignoreWarnings: [/Failed to parse source map/],
devServer: {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4a6f4b68cd0..8bb95ce7b76 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -765,7 +765,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
rimraf:
specifier: ^3.0.2
version: 3.0.2
@@ -1090,7 +1090,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
rimraf:
specifier: ^3.0.2
version: 3.0.2
@@ -3195,7 +3195,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
devDependencies:
'@babel/core':
specifier: ^7.16.0
@@ -3350,7 +3350,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
devDependencies:
'@babel/core':
specifier: ^7.16.0
@@ -6516,7 +6516,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
rimraf:
specifier: ^3.0.2
version: 3.0.2
@@ -7101,9 +7101,6 @@ importers:
copy-webpack-plugin:
specifier: ^11.0.0
version: 11.0.0([email protected](@swc/[email protected])([email protected]))
- html-replace-webpack-plugin:
- specifier: ^2.6.0
- version: 2.6.0
html-webpack-plugin:
specifier: ^5.3.2
version: 5.3.2([email protected](@swc/[email protected])([email protected]))
@@ -7455,7 +7452,7 @@ importers:
version: 11.4.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
react-virtualized-auto-sizer:
specifier: ^1.0.7
version: 1.0.7([email protected]([email protected]))([email protected])
@@ -7748,7 +7745,7 @@ importers:
version: 7.2.4([email protected]([email protected]))([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
react-sortable-hoc:
specifier: ^2.0.0
version:
2.0.0([email protected])([email protected]([email protected]))([email protected])
@@ -8129,7 +8126,7 @@ importers:
version: 0.9.7([email protected])([email protected])([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
uniforms:
specifier: ^3.10.2
version: 3.10.2([email protected])
@@ -8272,7 +8269,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
devDependencies:
'@babel/core':
specifier: ^7.16.0
@@ -8531,7 +8528,7 @@ importers:
version: 0.9.7([email protected])([email protected])([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
util:
specifier: ^0.12.5
version: 0.12.5
@@ -9175,7 +9172,7 @@ importers:
version: 17.0.2
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
devDependencies:
'@babel/core':
specifier: ^7.16.0
@@ -10049,7 +10046,7 @@ importers:
version: 4.1.4([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
short-unique-id:
specifier: ^4.4.4
version: 4.4.4
@@ -10563,7 +10560,7 @@ importers:
version: 0.9.7([email protected])([email protected])([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
devDependencies:
'@babel/core':
specifier: ^7.16.0
@@ -11776,7 +11773,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
typescript:
specifier: ^5.5.3
version: 5.5.3
@@ -12117,7 +12114,7 @@ importers:
version: 17.0.2([email protected])
react-router-dom:
specifier: ^6.30.2
- version: 6.30.0([email protected]([email protected]))([email protected])
+ version: 6.30.3([email protected]([email protected]))([email protected])
devDependencies:
'@babel/core':
specifier: ^7.16.0
@@ -19636,8 +19633,8 @@ packages:
selenium-webdriver: '>=4.6.1'
typescript: '>=4.6.2'
- '@remix-run/[email protected]':
- resolution: {integrity:
sha512-O3rHJzAQKamUz1fvE0Qaw0xSFqsA/yafi2iqeE0pvdFtCO1viYx8QL6f3Ln/aCCTLxs68SLf0KPM9eSeM8yBnA==}
+ '@remix-run/[email protected]':
+ resolution: {integrity:
sha512-Ic6m2U/rMjTkhERIa/0ZtXJP17QUi2CbWE7cqx4J58M8aA3QTfW+2UlQ4psvTX9IO1RfNVhK3pcpdjej7L+t2w==}
engines: {node: '>=14.0.0'}
'@repeaterjs/[email protected]':
@@ -28956,15 +28953,15 @@ packages:
react: 0.14.x || 15.x || 16.x || 17.x
react-dom: 0.14.x || 15.x || 16.x || 17.x
- [email protected]:
- resolution: {integrity:
sha512-x30B78HV5tFk8ex0ITwzC9TTZMua4jGyA9IUlH1JLQYQTFyxr/ZxwOJq7evg1JX1qGVUcvhsmQSKdPncQrjTgA==}
+ [email protected]:
+ resolution: {integrity:
sha512-pxPcv1AczD4vso7G4Z3TKcvlxK7g7TNt3/FNGMhfqyntocvYKj+GCatfigGDjbLozC4baguJ0ReCigoDJXb0ag==}
engines: {node: '>=14.0.0'}
peerDependencies:
react: '>=16.8'
react-dom: '>=16.8'
- [email protected]:
- resolution: {integrity:
sha512-D3X8FyH9nBcTSHGdEKurK7r8OYE1kKFn3d/CF+CoxbSHkxU7o37+Uh7eAHRXr6k2tSExXYO++07PeXJtA/dEhQ==}
+ [email protected]:
+ resolution: {integrity:
sha512-XRnlbKMTmktBkjCLE8/XcZFlnHvr2Ltdr1eJX4idL55/9BbORzyZEaIkBFDhFGCEWBBItsVrDxwx3gnisMitdw==}
engines: {node: '>=14.0.0'}
peerDependencies:
react: '>=16.8'
@@ -42137,7 +42134,7 @@ snapshots:
type-fest: 4.30.1
typescript: 5.5.3
- '@remix-run/[email protected]': {}
+ '@remix-run/[email protected]': {}
'@repeaterjs/[email protected]': {}
@@ -56386,16 +56383,16 @@ snapshots:
react-dom: 17.0.2([email protected])
react-draggable: 4.4.4([email protected]([email protected]))([email protected])
- [email protected]([email protected]([email protected]))([email protected]):
+ [email protected]([email protected]([email protected]))([email protected]):
dependencies:
- '@remix-run/router': 1.23.0
+ '@remix-run/router': 1.23.2
react: 17.0.2
react-dom: 17.0.2([email protected])
- react-router: 6.30.0([email protected])
+ react-router: 6.30.3([email protected])
- [email protected]([email protected]):
+ [email protected]([email protected]):
dependencies:
- '@remix-run/router': 1.23.0
+ '@remix-run/router': 1.23.2
react: 17.0.2
[email protected]([email protected]):
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]