Skip to content

Data Index - Display version information and link to graphql ui from data index webapp. #3401

Open
kumaradityaraj wants to merge 10 commits intoapache:mainfrom
kumaradityaraj:SRVLOGIC-737-DIVersion
Open

Data Index - Display version information and link to graphql ui from data index webapp. #3401
kumaradityaraj wants to merge 10 commits intoapache:mainfrom
kumaradityaraj:SRVLOGIC-737-DIVersion

Conversation

@kumaradityaraj
Copy link
Copy Markdown
Contributor


Closes #3400

✨ Enhance Data Index Webapp Header with Version & Useful Links

📌 Summary

This PR enhances the Data Index Webapp by improving visibility and accessibility of key information. It adds version details and provides direct links to GraphQL UI dev console.

  • NOTE - html-replace-webpack-plugin has been removed because it was breaking the replacement of variables and they are declared in templateParameters

✅ What’s New

  • Version Information

    • Displays the current Data Index version in the webapp UI.
  • Quick Access Links

    • Link to the official documentation.
    • Link to the GraphiQL Dev UI console for interacting with the GraphQL API.

🧪 How to Test

Follow these steps to build and run the webapp locally:

# From the project root
cd incubator-kie-tools/
pnpm -F kogito-data-index-webapp... build:dev
cd packages/kogito-data-index-webapp
pnpm start
Navigate to - http://localhost:9026

📷 Screenshots

Screenshot 2026-01-22 at 2 56 47 PM Screenshot 2026-01-22 at 2 56 53 PM

@kumaradityaraj
Copy link
Copy Markdown
Contributor Author

@fantonangeli Please review this PR. Thank you.

@ricardozanini
Copy link
Copy Markdown
Member

@domhanak can you take a look?

@domhanak
Copy link
Copy Markdown
Contributor

domhanak commented Jan 28, 2026

So I tried this with our data-index-quarkus example. And this is the result. What am I missing?

Checkout this PR:

  1. Build the kogito-data-index-webapp
  2. Build kogito-data-index-postgresql-image
  3. Go to https://github.com/apache/incubator-kie-kogito-examples/tree/main/serverless-workflow-examples/serverless-workflow-data-index-quarkus
  4. Run mvn clean package -Ddata-index-standalone
  5. Run cd docker-compose && ./startServices.sh
  6. Navigate to localhost:8180 -> Landing page opens - 🟢
  7. Select Graph Ql UI -> "Resourece not found" 🟠
  8. Change the URL to -> http://localhost:8180/graphiql -> "You need to enable JavaScript to run this app." ( I have it enabled ) 🟠

Tried in Chrome and Firefox

More observations:
Navigate to /q/graphql-ui -> Logs:
data-index | 2026-01-28 12:26:23,759 WARN [io.ver.ext.web.han.imp.LoggerHandlerImpl] (vert.x-eventloop-thread-4) 172.21.0.1 - - [Wed, 28 Jan 2026 12:26:23 GMT] "GET /q/graphql-ui HTTP/1.1" 404 53 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"

Navigate to /graphiql -> Logs:
data-index | 2026-01-28 12:27:25,530 WARN [io.ver.ext.web.han.imp.LoggerHandlerImpl] (vert.x-eventloop-thread-10) 172.21.0.1 - - [Wed, 28 Jan 2026 12:27:25 GMT] "GET /static/css/main.4107ca80.css HTTP/1.1" 404 53 "http://localhost:8180/graphiql" "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"

@fantonangeli
Copy link
Copy Markdown
Member

@domhanak the message "You need to enable JavaScript to run this app." at the step #8 makes sense as the page tries to download:
http://localhost:8180/static/js/main.4d49fe32.js
and gets a "Resource not found"
What should be the link to the GraphqlUI? Is there any configuration in the example which needs to be tuned?

@domhanak
Copy link
Copy Markdown
Contributor

domhanak commented Feb 3, 2026

@fantonangeli yea - I am just describing the users perspective - he navigates the button but won't lead to him seeing graphql UI but an error.

@domhanak
Copy link
Copy Markdown
Contributor

domhanak commented Feb 3, 2026

Even if the data-index-service is deployed as dev service or addon we still miss the / ther. Afaik it is due to implementation at https://github.com/apache/incubator-kie-kogito-apps/blob/main/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/vertx/VertxRouterSetupHelper.java#L52 but I could be mistaken

@domhanak
Copy link
Copy Markdown
Contributor

@fantonangeli @kumaradityaraj so the different option for DI deployment are not going to be taken into account?

@fantonangeli
Copy link
Copy Markdown
Member

@fantonangeli @kumaradityaraj so the different option for DI deployment are not going to be taken into account?

@domhanak As the GraphQL-UI link is written at build time and then included by the DI as HTML+CSS, I cannot think to a way for the webapp to receive / guess the link.
Would you have some suggestion?

@domhanak
Copy link
Copy Markdown
Contributor

domhanak commented Mar 4, 2026

@fantonangeli unless we can somehow determine what kind of deployment it is I do not see a way.

@fantonangeli
Copy link
Copy Markdown
Member

There is an error on ubuntu-latest,0 related to @kie-tools/kn-plugin-workflow, which is not related to this PR

@fantonangeli
Copy link
Copy Markdown
Member

@domhanak @ricardozanini Because the DI landing page is simply copied as dist files from @kie-tools/sonataflow-image-common. See: https://github.com/apache/incubator-kie-tools/blob/main/packages/sonataflow-image-common/package.json#L18
I think it cannot read or receive properties from Quarkus.
I'm open to suggestions.

@ricardozanini
Copy link
Copy Markdown
Member

@fantonangeli leave the URL as it was standalone deployment, doesn't matter if it got it wrong in the extension. Let's move on with this.

@fantonangeli
Copy link
Copy Markdown
Member

Hi @treblereel we are having a failure in kn-plugin-workflow in ubuntu-0 and also in main branch, are you aware of this?

2026-03-09T21:33:57.3293125Z make[2]: Entering directory '/home/runner/work/incubator-kie-tools/incubator-kie-tools/packages/kn-plugin-workflow'
2026-03-09T21:33:57.3300609Z CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.QuarkusPlatformGroupId=io.quarkus.platform -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.QuarkusVersion=3.27.2 -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.PluginVersion=0.0.0 -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.DevModeImage=docker.io/apache/incubator-kie-sonataflow-devmode:main -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.KogitoVersion=999-20260220-local -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.BuilderImage=docker.io/apache/incubator-kie-sonataflow-builder:main" -o ./dist/kn-workflow-linux-amd64 cmd/main.go
2026-03-09T21:33:57.3306301Z make[2]: Leaving directory '/home/runner/work/incubator-kie-tools/incubator-kie-tools/packages/kn-plugin-workflow'
2026-03-09T21:33:57.3307619Z 🚀 Installing the SonataFlow Operator...
2026-03-09T21:33:57.3308419Z ✅ Subscription created successfully
2026-03-09T21:33:57.3309333Z 🎉 SonataFlow Operator successfully installed, wait for the operator to be ready.
2026-03-09T21:33:57.3311219Z Timeout waiting for operator to be ready
2026-03-09T21:33:57.3312154Z -------------------------------------------------
2026-03-09T21:33:57.3312457Z 
2026-03-09T21:33:57.3312471Z 
2026-03-09T21:33:57.3312478Z 
2026-03-09T21:33:57.3318629Z ##[error]❌ There are 1 test failures. 5262 tests succedded, though :)

@fantonangeli
Copy link
Copy Markdown
Member

@kumaradityaraj this PR is a bit outdated, can you please re-sync, so we see the result of the CI?

@fantonangeli
Copy link
Copy Markdown
Member

@domhanak can we merge this?

@fantonangeli
Copy link
Copy Markdown
Member

@kumaradityaraj can you please sync this PR?

@fantonangeli
Copy link
Copy Markdown
Member

@domhanak @ricardozanini if there are no objection I'm going to merge this PR

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.

Data Index - Display version information and link to graphql ui from data index webapp.

4 participants