tiagobento commented on code in PR #2536:
URL:
https://github.com/apache/incubator-kie-tools/pull/2536#discussion_r1722078515
##########
packages/runtime-tools-process-dev-ui-webapp/src/envelope/RuntimeToolsDevUIEnvelopeApiImpl.ts:
##########
@@ -61,9 +61,14 @@ export class RuntimeToolsDevUIEnvelopeApiImpl implements
RuntimeToolsDevUIEnvelo
this.view().setDataIndexUrl(initArgs.dataIndexUrl);
this.view().setUsers(initArgs.users);
this.view().navigateTo(initArgs.page);
+ this.view().setDevUIOrigin &&
this.view().setDevUIOrigin(initArgs.devUIOrigin);
this.view().setDevUIUrl && this.view().setDevUIUrl(initArgs.devUIUrl);
- this.view().setOpenApiPath &&
this.view().setOpenApiPath(initArgs.openApiPath);
- this.view().setRemoteKogitoAppUrl &&
this.view().setRemoteKogitoAppUrl(initArgs.remoteKogitoAppUrl);
+ this.view().setQuarkusAppOrigin &&
this.view().setQuarkusAppOrigin(initArgs.quarkusAppOrigin);
+ this.view().setQuarkusAppRootPath &&
this.view().setQuarkusAppRootPath(initArgs.quarkusAppRootPath);
+ this.view().setShouldReplaceQuarkusAppOriginWithWebappOrigin &&
+ this.view().setShouldReplaceQuarkusAppOriginWithWebappOrigin(
+ initArgs.shouldReplaceQuarkusAppOriginWithWebappOrigin
+ );
this.view().setAvailablePages &&
this.view().setAvailablePages(initArgs.availablePages);
this.view().setCustomLabels &&
this.view().setCustomLabels(initArgs.customLabels);
this.view().setOmittedProcessTimelineEvents &&
Review Comment:
You can use optional chaining here, I think it will look much better... like
`this.view().setAvailablePages?.(initArgs.availablePages)`
no?
##########
packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/RuntimeTools/RuntimeTools.tsx:
##########
@@ -59,7 +63,9 @@ const RuntimeTools: React.FC<IOwnProps> = ({
const httpLink = new HttpLink({
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
- uri: dataIndexUrl,
+ uri: shouldReplaceQuarkusAppOriginWithWebappOrigin
+ ? dataIndexUrl.replace(quarkusAppOrigin, devUIOrigin)
+ : dataIndexUrl,
Review Comment:
Do we still need `@ts-ignore`?
##########
packages/jbpm-quarkus-devui/jbpm-quarkus-devui-deployment/src/main/java/org/jbpm/quarkus/devui/deployment/DevConsoleProcessor.java:
##########
@@ -112,19 +114,21 @@ public CardPageBuildItem pages(
String uiPath =
nonApplicationRootPathBuildItem.resolveManagementPath(BASE_RELATIVE_URL,
managementInterfaceBuildTimeConfig, launchModeBuildItem, true);
- String openapiPath = getProperty(configurationBuildItem,
systemPropertyBuildItems, "quarkus.smallrye-openapi.path");
String devUIUrl = getProperty(configurationBuildItem,
systemPropertyBuildItems, "kogito.dev-ui.url");
- String dataIndexUrl = getProperty(configurationBuildItem,
systemPropertyBuildItems, "kogito.data-index.url");
+ String dataIndexUrl = getProperty(configurationBuildItem,
systemPropertyBuildItems, "kogito.dataindex.http.url");
Review Comment:
Not sure I understand this very well. We're changing our public API? What
other places do we need to update? Maybe the examples?
##########
packages/runtime-tools-process-dev-ui-webapp/src/components/contexts/DevUIAppContext.tsx:
##########
@@ -70,12 +74,20 @@ export class DevUIAppContextImpl implements DevUIAppContext
{
return this.args.devUIUrl;
}
- getOpenApiPath(): string {
- return this.args.openApiPath;
+ getDevUIOrigin(): string {
+ return this.args.devUIOrigin;
}
- getRemoteKogitoAppUrl(): string {
- return this.args.remoteKogitoAppUrl;
+ getQuarkusAppOrigin(): string {
+ return this.args.quarkusAppOrigin;
+ }
+
+ getQuarkusAppRootPath(): string {
+ return this.args.quarkusAppRootPath;
+ }
+
+ getShouldReplaceQuarkusAppOriginWithWebappOrigin(): boolean {
Review Comment:
```suggestion
shouldReplaceQuarkusAppOriginWithWebappOrigin(): boolean {
```
?
--
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]