fantonangeli commented on code in PR #3401:
URL:
https://github.com/apache/incubator-kie-tools/pull/3401#discussion_r2717373156
##########
packages/kogito-data-index-webapp/env/index.js:
##########
@@ -37,6 +37,10 @@ module.exports =
composeEnv([require("@kie-tools/root-env/env")], {
default: "GraphQL DOCS",
description: "Documentation link text",
},
+ KOGITO_DATA_INDEX_WEBAPP_version: {
+ default: "1.0.0",
+ description: "Version",
Review Comment:
We should not invent a new versioning, we can get it from the `package.json`
```suggestion
default: require("../package.json").version,
description: "Kogito Data Index Version",
```
##########
packages/kogito-data-index-webapp/webpack.config.js:
##########
@@ -38,26 +37,14 @@ module.exports = async (webpackEnv) =>
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "src/index.html"),
filename: "index.html",
- chunks: ["app"],
- }),
- new HtmlReplaceWebpackPlugin([
- {
- pattern: /\${KOGITO_DATA_INDEX_WEBAPP_TITLE}/g,
- replacement: () => env.kogitoDataIndexWebapp.title ?? "",
- },
- {
- pattern: /\${KOGITO_DATA_INDEX_WEBAPP_LOGO}/g,
- replacement: () => env.kogitoDataIndexWebapp.logo ?? "",
- },
- {
- pattern: /\${KOGITO_DATA_INDEX_WEBAPP_DOCLINK_HREF}/g,
- replacement: () => env.kogitoDataIndexWebapp.docLink.href ?? "",
+ templateParameters: {
Review Comment:
Thanks a lot, this will simplify the development
##########
packages/kogito-data-index-webapp/src/index.html:
##########
@@ -42,9 +46,10 @@ <h4>Your Data Index service is up and working!</h4>
modify that data.
</p>
<div>
- <a href="${KOGITO_DATA_INDEX_WEBAPP_DOCLINK_HREF}" class="btn"
target="_blank"
- >${KOGITO_DATA_INDEX_WEBAPP_DOCLINK_TEXT}</a
+ <a href="<%= KOGITO_DATA_INDEX_WEBAPP_DOCLINK_HREF %>" class="btn"
target="_blank"
+ ><%= KOGITO_DATA_INDEX_WEBAPP_DOCLINK_TEXT %></a
>
+ <a href="http://0.0.0.0:8080/q/graphql-ui" class="btn"
target="_blank">GraphQL UI</a>
Review Comment:
Please don't hardcode the url and the link text, you can use the env file
like you already did.
As a default value for the URL please use a relative link: `/q/graphql-ui`
as we don't know the port and the IP, if we are in a cluster for instance.
##########
packages/kogito-data-index-webapp/src/index.html:
##########
@@ -22,16 +22,20 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>${KOGITO_DATA_INDEX_WEBAPP_TITLE}</title>
+ <title><%= KOGITO_DATA_INDEX_WEBAPP_TITLE %></title>
<link rel="stylesheet" href="styles.css" />
<link rel="shortcut icon" type="image/x-icon"
href="${KOGITO_DATA_INDEX_WEBAPP_LOGO}" />
</head>
<body>
<div class="maindiv">
<div class="container">
- <div class="logo" style="display: flex; justify-content: center">
- <img src="${KOGITO_DATA_INDEX_WEBAPP_LOGO}" alt="KIE Logo" />
- <h1>${KOGITO_DATA_INDEX_WEBAPP_TITLE}</h1>
+ <div class="logo" style="display: flex; justify-content: center;
align-items: center">
+ <img src="<%= KOGITO_DATA_INDEX_WEBAPP_LOGO %>" alt="KIE Logo" />
+
+ <div style="display: flex; flex-direction: column; gap: 4px">
+ <h1 style="margin: 0"><%= KOGITO_DATA_INDEX_WEBAPP_TITLE %></h1>
+ <h6 style="margin: 0; font-weight: normal"><%=
KOGITO_DATA_INDEX_WEBAPP_VERSION %></h6>
Review Comment:
The font colour is white on white with the light UI variant
<img width="588" height="111" alt="Image"
src="https://github.com/user-attachments/assets/864c46ca-f755-4504-bc4c-61c332160492"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]