From 864c08638ca5e84cb94525dc393a77dadc23fc01 Mon Sep 17 00:00:00 2001 From: Thiago Lugli Date: Thu, 24 Oct 2024 12:18:27 -0300 Subject: [PATCH] kie-issues#1560: Migrate Tasks Console pages to the Management Console and remove the Task Console (#2700) --- .../docker-compose/README.md | 4 +- .../docker-compose/docker-compose.yml | 25 +- .../docker-compose/startServices.sh | 5 +- .../env/index.js | 9 - .../install.js | 5 - .../package.json | 1 - packages/kogito-task-console/Containerfile | 51 - packages/kogito-task-console/README.md | 138 -- packages/kogito-task-console/entrypoint.sh | 27 - packages/kogito-task-console/env/index.js | 59 - packages/kogito-task-console/package.json | 38 - .../README.md | 89 +- .../install.js | 5 +- .../package.json | 3 +- .../src/Chart.lock | 7 +- .../src/Chart.yaml | 3 - .../src/README.md | 76 +- .../src/charts/task-console/Chart.yaml | 6 - .../src/charts/task-console/README.md | 46 - .../task-console/templates/_helpers.tpl | 40 - .../templates/deployment.yaml.helm | 112 - .../task-console/templates/hpa.yaml.helm | 28 - .../task-console/templates/ingress.yaml.helm | 61 - .../task-console/templates/route.yaml.helm | 25 - .../task-console/templates/service.yaml.helm | 18 - .../templates/serviceaccount.yaml.helm | 12 - .../tests/test-connection.yaml.helm | 15 - .../src/charts/task-console/values.yaml | 118 - .../src/templates/NOTES.txt | 46 - .../src/values-kubernetes.yaml | 5 - .../src/values-minikube-nginx.yaml | 5 - .../src/values-openshift.yaml | 6 - .../README.md | 35 + .../docs/taskconsole.png | Bin .../docs/taskdetails.png} | Bin .../docs/taskfilters.png} | Bin .../docs/taskforms.png} | Bin .../docs/taskstates.png} | Bin .../package.json | 2 + .../resources/form-displayer.html | 0 .../ManagementConsole/ManagementConsole.tsx | 16 +- .../ManagementConsoleNav.tsx | 13 +- .../ManagementConsoleRoutes.tsx | 12 +- .../JobsContainer.tsx} | 4 +- .../TaskFormContainer/TaskFormContainer.tsx | 4 +- .../TasksContainer/TasksContainer.tsx} | 2 +- .../JobsPage.tsx} | 13 +- .../pages/TaskDetailsPage/TaskDetailsPage.tsx | 34 +- .../FormNotification/FormNotification.tsx | 0 .../components/pages/TasksPage/TasksPage.tsx} | 20 +- .../src/components/pages/index.ts | 4 +- .../src/components/styles.css | 8 + .../src/resources/form-displayer.ts | 2 +- .../webpack.config.js | 1 + .../src/TaskForms/TaskFormGatewayApi.ts | 42 +- .../src/TaskInbox/TaskInboxGatewayApi.ts | 2 +- .../src/TaskInbox/TaskInboxQueries.ts | 24 +- .../src/utils/QueryUtils.ts | 7 +- .../README.md | 109 - .../build/defaultEnvJson.js | 40 - .../dev/config/kogito-realm.json | 1996 ----------------- .../dev/server/MockData/controllers.js | 127 -- .../dev/server/MockData/forms/ApplyForVisa.js | 98 - .../server/MockData/forms/ConfirmTravel.js | 84 - .../MockData/forms/ConfirmTravelDraft7.js | 92 - .../dev/server/MockData/forms/EmptyForm.js | 23 - .../dev/server/MockData/graphql.js | 728 ------ .../dev/server/MockData/rest.js | 49 - .../dev/server/MockData/types.js | 637 ------ .../dev/server/app.js | 23 - .../dev/server/config/index.js | 25 - .../dev/server/server.js | 196 -- .../docs/testusersystem-add-user.png | Bin 150582 -> 0 bytes .../docs/testusersystem-menu-add.png | Bin 116452 -> 0 bytes .../docs/testusersystem-menu.png | Bin 116466 -> 0 bytes .../env/index.js | 51 - .../package.json | 101 - .../console/TaskConsole/TaskConsole.tsx | 66 - .../console/TaskConsoleNav/TaskConsoleNav.tsx | 42 - .../TaskConsoleRoutes/TaskConsoleRoutes.tsx | 33 - .../src/components/console/index.ts | 21 - .../src/components/pages/index.ts | 20 - .../src/components/styles.css | 25 - .../TaskConsoleContextsProvider.tsx | 37 - .../src/declare.d.ts | 27 - .../src/env/Env.ts | 36 - .../src/env/EnvConstants.ts | 22 - .../src/env/EnvJson.ts | 29 - .../src/favicon.ico | Bin 1371 -> 0 bytes .../src/index.html | 33 - .../src/index.tsx | 107 - .../src/static/env.json | 1 - .../src/static/taskConsoleLogo.svg | 153 -- .../tsconfig.json | 12 - .../webpack.config.js | 140 -- pnpm-lock.yaml | 259 +-- repo/graph.dot | 10 - repo/graph.json | 44 - 98 files changed, 258 insertions(+), 6571 deletions(-) delete mode 100644 packages/kogito-task-console/Containerfile delete mode 100644 packages/kogito-task-console/README.md delete mode 100644 packages/kogito-task-console/entrypoint.sh delete mode 100644 packages/kogito-task-console/env/index.js delete mode 100644 packages/kogito-task-console/package.json delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/docs/taskconsole.png (100%) rename packages/{runtime-tools-task-console-webapp/docs/details.png => runtime-tools-management-console-webapp/docs/taskdetails.png} (100%) rename packages/{runtime-tools-task-console-webapp/docs/filters.png => runtime-tools-management-console-webapp/docs/taskfilters.png} (100%) rename packages/{runtime-tools-task-console-webapp/docs/forms.png => runtime-tools-management-console-webapp/docs/taskforms.png} (100%) rename packages/{runtime-tools-task-console-webapp/docs/states.png => runtime-tools-management-console-webapp/docs/taskstates.png} (100%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/resources/form-displayer.html (100%) rename packages/runtime-tools-management-console-webapp/src/components/containers/{JobsManagementContainer/JobsManagementContainer.tsx => JobsContainer/JobsContainer.tsx} (93%) rename packages/{runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components => runtime-tools-management-console-webapp/src/components/containers}/TaskFormContainer/TaskFormContainer.tsx (95%) rename packages/{runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx => runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx} (96%) rename packages/runtime-tools-management-console-webapp/src/components/pages/{JobsManagementPage/JobsManagementPage.tsx => JobsPage/JobsPage.tsx} (76%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx (88%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/src/components/pages/TaskDetailsPage/components/FormNotification/FormNotification.tsx (100%) rename packages/{runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx => runtime-tools-management-console-webapp/src/components/pages/TasksPage/TasksPage.tsx} (75%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/src/resources/form-displayer.ts (94%) delete mode 100644 packages/runtime-tools-task-console-webapp/README.md delete mode 100644 packages/runtime-tools-task-console-webapp/build/defaultEnvJson.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/config/kogito-realm.json delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/controllers.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/ApplyForVisa.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/ConfirmTravel.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/ConfirmTravelDraft7.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/EmptyForm.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/graphql.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/rest.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/types.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/app.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/config/index.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/server.js delete mode 100644 packages/runtime-tools-task-console-webapp/docs/testusersystem-add-user.png delete mode 100644 packages/runtime-tools-task-console-webapp/docs/testusersystem-menu-add.png delete mode 100644 packages/runtime-tools-task-console-webapp/docs/testusersystem-menu.png delete mode 100644 packages/runtime-tools-task-console-webapp/env/index.js delete mode 100644 packages/runtime-tools-task-console-webapp/package.json delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/TaskConsole/TaskConsole.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/TaskConsoleNav/TaskConsoleNav.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/TaskConsoleRoutes/TaskConsoleRoutes.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/index.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/pages/index.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/styles.css delete mode 100644 packages/runtime-tools-task-console-webapp/src/context/TaskConsoleContext/TaskConsoleContextsProvider.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/declare.d.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/env/Env.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/env/EnvConstants.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/env/EnvJson.ts delete mode 100755 packages/runtime-tools-task-console-webapp/src/favicon.ico delete mode 100755 packages/runtime-tools-task-console-webapp/src/index.html delete mode 100755 packages/runtime-tools-task-console-webapp/src/index.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/static/env.json delete mode 100644 packages/runtime-tools-task-console-webapp/src/static/taskConsoleLogo.svg delete mode 100644 packages/runtime-tools-task-console-webapp/tsconfig.json delete mode 100644 packages/runtime-tools-task-console-webapp/webpack.config.js diff --git a/examples/jbpm-compact-architecture-example/docker-compose/README.md b/examples/jbpm-compact-architecture-example/docker-compose/README.md index efc66a2e671..62c8d80dd1a 100644 --- a/examples/jbpm-compact-architecture-example/docker-compose/README.md +++ b/examples/jbpm-compact-architecture-example/docker-compose/README.md @@ -6,14 +6,13 @@ To allow a quick setup of all services required to run this demo, we provide a d - PgAdmin - Kogito Example Service (Only available if the example has been compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`) - Kogito Management Console -- Kogito Task Console - Keycloak The docker compose template provides three profiles to enable starting only the set of services you want to use. The profiles are: - **infra**: Starts only the minimal infrastructure to run the example (Postgresql, pgadmin, Kogito Data Index) - **example**: Starts the services in _infra_ profile and the Kogito Example Service. Requires the example to be compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`. -- **full** (default): includes all the above and also starts the **Management Console**, **Task Console** and a **Keycloak** to handle the consoles authentication. Requires the example to be compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`. +- **full** (default): includes all the above and also starts the **Management Console** and **Keycloak** to handle the console authentication. Requires the example to be compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`. > NOTE: In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available > in [here](https://docs.docker.com/compose/install/). @@ -34,7 +33,6 @@ Once the services are started (depending on the profile), the following ports wi - PgAdmin: 8055 - Kogito Example Service: 8080 - Kogito Management Console: 8280 -- Kogito Task Console: 8380 - Keycloak: 8480 ## Stopping and removing volume data diff --git a/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml b/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml index 6e7484029c4..4490b4adaea 100644 --- a/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml +++ b/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml @@ -97,27 +97,14 @@ services: depends_on: jbpm-compact-architecture-example-service: condition: service_started + # keycloak: + # condition: service_healthy volumes: - ./svg/:/home/kogito/data/svg/ environment: RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE: "DEV" RUNTIME_TOOLS_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8080/graphql - - task-console: - container_name: task-console - image: ${KOGITO_TASK_CONSOLE_IMAGE} - profiles: ["full"] - ports: - - 8380:8080 - depends_on: - jbpm-compact-architecture-example-service: - condition: service_started - keycloak: - condition: service_healthy - environment: - RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE: "PROD" - RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8080/graphql - KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth - KOGITO_CONSOLES_KEYCLOAK_REALM: kogito - KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: kogito-console-quarkus + # KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration + # KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth + # KOGITO_CONSOLES_KEYCLOAK_REALM: kogito + # KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: kogito-console-quarkus diff --git a/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh b/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh index e8a42f5b2ee..a24bd93e4e7 100755 --- a/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh +++ b/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh @@ -6,8 +6,6 @@ echo "Script requires your Kogito Example to be compiled" PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) KOGITO_MANAGEMENT_CONSOLE_IMAGE=$(cd ../ && mvn help:evaluate -Dexpression=kogito.management-console.image -q -DforceStdout) -KOGITO_TASK_CONSOLE_IMAGE=$(cd ../ && mvn help:evaluate -Dexpression=kogito.task-console.image -q -DforceStdout) - if [ -n "$1" ]; then if [[ ("$1" == "full") || ("$1" == "infra") || ("$1" == "example")]]; @@ -17,14 +15,13 @@ if [ -n "$1" ]; then echo "Unknown docker profile '$1'. The supported profiles are:" echo "* 'infra': Use this profile to start only the minimum infrastructure to run the example (postgresql, data-index & jobs-service)." echo "* 'example': Use this profile to start the example infrastructure and the kogito-example service. Requires the example to be compiled using the 'container' profile (-Pcontainer)" - echo "* 'full' (default): Starts full example setup, including infrastructure (database, data-index & jobs-service), the kogito-example-service container and the runtime consoles (management-console, task-console & keycloak). Requires the example to be compiled using the 'container' profile (-Pcontainer)" + echo "* 'full' (default): Starts full example setup, including infrastructure (database, data-index & jobs-service), the kogito-example-service container and the runtime consoles (management-console & keycloak). Requires the example to be compiled using the 'container' profile (-Pcontainer)" exit 1; fi fi echo "PROJECT_VERSION=${PROJECT_VERSION}" > ".env" echo "KOGITO_MANAGEMENT_CONSOLE_IMAGE=${KOGITO_MANAGEMENT_CONSOLE_IMAGE}" >> ".env" -echo "KOGITO_TASK_CONSOLE_IMAGE=${KOGITO_TASK_CONSOLE_IMAGE}" >> ".env" echo "COMPOSE_PROFILES='${PROFILE}'" >> ".env" if [ "$(uname)" == "Darwin" ]; then diff --git a/examples/jbpm-compact-architecture-example/env/index.js b/examples/jbpm-compact-architecture-example/env/index.js index a047ba465e4..16c5c38a4fe 100644 --- a/examples/jbpm-compact-architecture-example/env/index.js +++ b/examples/jbpm-compact-architecture-example/env/index.js @@ -23,26 +23,17 @@ const { env: { kogitoManagementConsole: kogitoManagementConsoleImageEnv }, } = require("@kie-tools/kogito-management-console/env"); -const { - env: { kogitoTaskConsole: kogitoTaskConsoleImageEnv }, -} = require("@kie-tools/kogito-task-console/env"); - module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ JBPM_COMPACT_ARCHITECTURE_EXAMPLE__managementConsoleImage: { default: `${kogitoManagementConsoleImageEnv.registry}/${kogitoManagementConsoleImageEnv.account}/${kogitoManagementConsoleImageEnv.name}:${kogitoManagementConsoleImageEnv.buildTag}`, description: "The image for the Kogito Management Console.", }, - JBPM_COMPACT_ARCHITECTURE_EXAMPLE__taskConsoleImage: { - default: `${kogitoTaskConsoleImageEnv.registry}/${kogitoTaskConsoleImageEnv.account}/${kogitoTaskConsoleImageEnv.name}:${kogitoTaskConsoleImageEnv.buildTag}`, - description: "The image for the Kogito Task Console.", - }, }), get env() { return { jbpmCompactArchitectureExample: { kogitoManagementConsoleImage: getOrDefault(this.vars.JBPM_COMPACT_ARCHITECTURE_EXAMPLE__managementConsoleImage), - kogitoTaskConsoleImage: getOrDefault(this.vars.JBPM_COMPACT_ARCHITECTURE_EXAMPLE__taskConsoleImage), version: require("../package.json").version, }, }; diff --git a/examples/jbpm-compact-architecture-example/install.js b/examples/jbpm-compact-architecture-example/install.js index fea906ae027..bfd7bde0f2b 100644 --- a/examples/jbpm-compact-architecture-example/install.js +++ b/examples/jbpm-compact-architecture-example/install.js @@ -29,8 +29,3 @@ setPomProperty({ key: "kogito.management-console.image", value: env.jbpmCompactArchitectureExample.kogitoManagementConsoleImage, }); - -setPomProperty({ - key: "kogito.task-console.image", - value: env.jbpmCompactArchitectureExample.kogitoTaskConsoleImage, -}); diff --git a/examples/jbpm-compact-architecture-example/package.json b/examples/jbpm-compact-architecture-example/package.json index 0798fce2a16..ea517540de3 100644 --- a/examples/jbpm-compact-architecture-example/package.json +++ b/examples/jbpm-compact-architecture-example/package.json @@ -41,7 +41,6 @@ }, "devDependencies": { "@kie-tools/kogito-management-console": "workspace:*", - "@kie-tools/kogito-task-console": "workspace:*", "@kie-tools/root-env": "workspace:*", "run-script-os": "^1.1.6" }, diff --git a/packages/kogito-task-console/Containerfile b/packages/kogito-task-console/Containerfile deleted file mode 100644 index 6c8f1034d94..00000000000 --- a/packages/kogito-task-console/Containerfile +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 - -ARG KOGITO_TASK_CONSOLE_PORT=8080 - -ENV RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE="PROD" - -COPY entrypoint.sh dist-dev/image-env-to-json-standalone dist-dev/EnvJson.schema.json /tmp/ - -RUN microdnf --disableplugin=subscription-manager -y install httpd \ - && microdnf --disableplugin=subscription-manager clean all \ - && echo "Mutex posixsem" >> /etc/httpd/conf/httpd.conf \ - && sed -i -e "/#ServerName www.example.com:80/aHeader set Content-Security-Policy \"frame-ancestors 'self';\"" /etc/httpd/conf/httpd.conf \ - && sed -i -e 's/Options Indexes FollowSymLinks/Options -Indexes +FollowSymLinks/' /etc/httpd/conf/httpd.conf \ - && sed -i "s/Listen 80/Listen ${KOGITO_TASK_CONSOLE_PORT}/g" /etc/httpd/conf/httpd.conf \ - && sed -i "s/#ServerName www.example.com:80/ServerName 127.0.0.1:${KOGITO_TASK_CONSOLE_PORT}/g" /etc/httpd/conf/httpd.conf \ - && sed -i '$ a ServerTokens Prod' /etc/httpd/conf/httpd.conf \ - && sed -i '$ a ServerSignature Off' /etc/httpd/conf/httpd.conf \ - && sed -i -e '//a RewriteEngine on\n RewriteCond %{REQUEST_FILENAME} -f [OR]\n RewriteCond %{REQUEST_FILENAME} -d\n RewriteRule ^ - [L]\n RewriteRule ^ index.html [L]' /etc/httpd/conf/httpd.conf \ - && chmod -R g=u /etc/httpd/conf \ - && mkdir /task-console \ - && mv -t /task-console /tmp/entrypoint.sh /tmp/image-env-to-json-standalone /tmp/EnvJson.schema.json \ - && chgrp -R 0 /var/log/httpd /var/run/httpd /var/www/html /task-console \ - && chmod -R g=u /var/log/httpd /var/run/httpd /var/www/html /task-console \ - && chmod +x /task-console/entrypoint.sh /task-console/image-env-to-json-standalone - -COPY dist-dev/runtime-tools-task-console-webapp /task-console/app - -RUN if [ -f /task-console/app/env.json ]; then chmod a+w /task-console/app/env.json; fi - -EXPOSE ${KOGITO_TASK_CONSOLE_PORT} - -USER 1000 - -ENTRYPOINT [ "/task-console/entrypoint.sh" ] diff --git a/packages/kogito-task-console/README.md b/packages/kogito-task-console/README.md deleted file mode 100644 index 23229fca149..00000000000 --- a/packages/kogito-task-console/README.md +++ /dev/null @@ -1,138 +0,0 @@ - - -# kogito-task-console - -This package contains the `Containerfile/Dockerfile` and scripts to build a container image for Task Console. It also generated a JSON Schema for the `env.json` file, enabling it to be validated. - -## Additional requirements - -- docker - -## Build - -- Enable the image to be built: - - ```bash - export KIE_TOOLS_BUILD__buildContainerImages=true - ``` - -- (Optional) The image name and tags can be customized by setting the following environment variables: - - ```bash - export KOGITO_TASK_CONSOLE__registry= - export KOGITO_TASK_CONSOLE__account= - export KOGITO_TASK_CONSOLE__name= - export KOGITO_TASK_CONSOLE__buildTag= - ``` - - > Default values can be found [here](./env/index.js). - -- After optionally setting up the environment variables, run the following in the root folder of the repository to build the package: - - ```bash - pnpm -F @kie-tools/kogito-task-console... build:prod - ``` - -- Then check if the image is correctly stored: - - ```bash - docker images - ``` - -## Run - -- Start up a clean container with: - - ```bash - docker run -t -p 8080:8080 -i --rm docker.io/apache/incubator-kie-kogito-task-console:main - ``` - - Task Console will be up at http://localhost:8080 - -## Customization - -1. Run a container with custom environment variables: - - [comment]: <> (//TODO: Use EnvJson.schema.json to generate this documentation somehow.. See https://github.com/kiegroup/kie-issues/issues/16) - - | Name | Description | Default | - | :---------------------------------------------------------: | :-----------------------------------------------------------: | :-------------------------------------------------------------------------------------: | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE` | Env Mode: "PROD" or "DEV". PROD enables Keycloak integration. | "PROD" | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_NAME` | Task Console app name. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_VERSION` | Task Console app version. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_STATES_LIST` | Pre-selected task states. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_ACTIVE_STATES_LIST` | Pre-selected task active states. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT` | The URL that points to the Data Index service. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK` | Disables Keycloak health-check. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_UPDATE_TOKEN_VALIDITY` | Update token validity in minutes. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL` | Keycloak health-check URL. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_REALM` | Keycloak realm name. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_URL` | Keycloak auth URL. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID` | Keycloak Client ID. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - - ### Examples - - 1. Using a different Data Index Service. - - ```bash - docker run -t -p 8080:8080 -e RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT= -i --rm docker.io/apache/incubator-kie-kogito-task-console:main - ``` - - _NOTE: Replace `docker` with `podman` if necessary._ - -2. Write a custom `Containerfile/Dockerfile` from the image: - - ```docker - FROM docker.io/apache/incubator-kie-kogito-task-console:main - - ENV RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT= - ``` - -3. Create the application from the image in OpenShift and set the deployment environment variable right from the OpenShift UI. - -## Custom Port - -The port used internally on the container can be changed: - -When building, set the `KOGITO_TASK_CONSOLE__port` environment variable to any port you want, and the Containerfile will be built using that port. - ---- - -Apache KIE (incubating) is an effort undergoing incubation at The Apache Software -Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is -required of all newly accepted projects until a further review indicates that -the infrastructure, communications, and decision making process have stabilized -in a manner consistent with other successful ASF projects. While incubation -status is not necessarily a reflection of the completeness or stability of the -code, it does indicate that the project has yet to be fully endorsed by the ASF. - -Some of the incubating project’s releases may not be fully compliant with ASF -policy. For example, releases may have incomplete or un-reviewed licensing -conditions. What follows is a list of known issues the project is currently -aware of (note that this list, by definition, is likely to be incomplete): - -- Hibernate, an LGPL project, is being used. Hibernate is in the process of - relicensing to ASL v2 -- Some files, particularly test files, and those not supporting comments, may - be missing the ASF Licensing Header - -If you are planning to incorporate this work into your product/project, please -be aware that you will need to conduct a thorough licensing review to determine -the overall implications of including this work. For the current status of this -project through the Apache Incubator visit: -https://incubator.apache.org/projects/kie.html diff --git a/packages/kogito-task-console/entrypoint.sh b/packages/kogito-task-console/entrypoint.sh deleted file mode 100644 index a68f59c1593..00000000000 --- a/packages/kogito-task-console/entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Copying the Task Console assets here is essential for when the container is running with the readOnlyRootFilesystem flag. -# But, just like any other directory modified during runtime, the /var/www/html must be a mounted volume in the container in this case. -cp -R /task-console/app/* /var/www/html - -/task-console/image-env-to-json-standalone --directory /var/www/html --json-schema /task-console/EnvJson.schema.json - -httpd -D FOREGROUND diff --git a/packages/kogito-task-console/env/index.js b/packages/kogito-task-console/env/index.js deleted file mode 100644 index 07cac3a780b..00000000000 --- a/packages/kogito-task-console/env/index.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); - -const rootEnv = require("@kie-tools/root-env/env"); - -module.exports = composeEnv([rootEnv], { - vars: varsWithName({ - KOGITO_TASK_CONSOLE__registry: { - default: "docker.io", - description: "E.g., `docker.io` or `quay.io`.", - }, - KOGITO_TASK_CONSOLE__account: { - default: "apache", - description: "E.g,. `apache` or `kie-tools-bot`", - }, - KOGITO_TASK_CONSOLE__name: { - default: "incubator-kie-kogito-task-console", - description: "Name of the image itself.", - }, - KOGITO_TASK_CONSOLE__buildTag: { - default: rootEnv.env.root.streamName, - description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0", - }, - KOGITO_TASK_CONSOLE__port: { - default: 8080, - description: "The internal container port.", - }, - }), - get env() { - return { - kogitoTaskConsole: { - registry: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__registry), - account: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__account), - name: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__name), - buildTag: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__buildTag), - port: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__port), - version: require("../package.json").version, - }, - }; - }, -}); diff --git a/packages/kogito-task-console/package.json b/packages/kogito-task-console/package.json deleted file mode 100644 index 10273fd9fcf..00000000000 --- a/packages/kogito-task-console/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "private": true, - "name": "@kie-tools/kogito-task-console", - "version": "0.0.0", - "description": "", - "license": "Apache-2.0", - "homepage": "https://github.com/apache/incubator-kie-tools", - "repository": { - "type": "git", - "url": "https://github.com/apache/incubator-kie-tools.git" - }, - "bugs": { - "url": "https://github.com/apache/incubator-kie-tools/issues" - }, - "scripts": { - "build:dev": "pnpm cleanup && pnpm env-json:schema:generate && pnpm copy:assets && run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", - "build:prod": "pnpm cleanup && pnpm env-json:schema:generate && pnpm copy:assets && run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", - "cleanup": "rimraf dist-dev && mkdir dist-dev", - "copy:assets": "pnpm copy:webapp-assets && pnpm copy:image-env-to-json", - "copy:image-env-to-json": "run-script-os", - "copy:image-env-to-json:linux:darwin": "cp ./node_modules/@kie-tools/image-env-to-json/dist/linux/image-env-to-json-standalone ./dist-dev/", - "copy:image-env-to-json:win32": "pnpm powershell \"Copy-Item ./node_modules/@kie-tools/image-env-to-json/dist/linux/image-env-to-json-standalone ./dist-dev/\"", - "copy:webapp-assets": "run-script-os", - "copy:webapp-assets:linux:darwin": "cp -R ./node_modules/@kie-tools/runtime-tools-task-console-webapp/dist/ ./dist-dev/runtime-tools-task-console-webapp", - "copy:webapp-assets:win32": "pnpm powershell \"Copy-Item -R ./node_modules/@kie-tools/runtime-tools-task-console-webapp/dist/ ./dist-dev/runtime-tools-task-console-webapp\"", - "env-json:schema:generate": "ts-json-schema-generator --tsconfig ./node_modules/@kie-tools/runtime-tools-task-console-webapp/tsconfig.json --path ./node_modules/@kie-tools/runtime-tools-task-console-webapp/src/env/EnvJson.ts --type EnvJson --id EnvJson --out ./dist-dev/EnvJson.schema.json", - "image:docker:build": "kie-tools--image-builder build -r \"$(build-env kogitoTaskConsole.registry)\" -a \"$(build-env kogitoTaskConsole.account)\" -n \"$(build-env kogitoTaskConsole.name)\" -t \"$(build-env kogitoTaskConsole.buildTag)\" --build-arg KOGITO_TASK_CONSOLE_PORT=\"$(build-env kogitoTaskConsole.port)\"" - }, - "devDependencies": { - "@kie-tools/image-builder": "workspace:*", - "@kie-tools/image-env-to-json": "workspace:*", - "@kie-tools/root-env": "workspace:*", - "@kie-tools/runtime-tools-task-console-webapp": "workspace:*", - "rimraf": "^3.0.2", - "run-script-os": "^1.1.6", - "ts-json-schema-generator": "^1.1.2" - } -} diff --git a/packages/runtime-tools-consoles-helm-chart/README.md b/packages/runtime-tools-consoles-helm-chart/README.md index 753c17c4152..f26136b9c6f 100644 --- a/packages/runtime-tools-consoles-helm-chart/README.md +++ b/packages/runtime-tools-consoles-helm-chart/README.md @@ -17,7 +17,7 @@ # runtime-tools-consoles-helm-chart -This chart can be used to deploy Task and Management consoles images on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +This chart can be used to deploy the Management Console image on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. ## Additional requirements @@ -27,7 +27,6 @@ This chart can be used to deploy Task and Management consoles images on a [Kuber ## Components - Management Console -- Task Console ## Installing the Chart @@ -55,12 +54,6 @@ In order to get runtime-tools-consoles running you need to run these commands: export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Management Console URL: http://127.0.0.1:8081" kubectl --namespace default port-forward $POD_NAME 8081:$CONTAINER_PORT - -2. Run the following commands in a separate terminal to port-forward Task Console application: - export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/component=task-console,app.kubernetes.io/instance=runtime-tools-consoles" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Task Console URL: http://127.0.0.1:8080" - kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT ``` ### Minikube install @@ -86,7 +79,6 @@ Run the following commands: export MINIKUBE_IP=$(minikube ip) echo "\n# Minikube Runtime Tools Consoles Helm Chart hostnames" | sudo tee -a /etc/hosts echo "$MINIKUBE_IP management-console.local" | sudo tee -a /etc/hosts - echo "$MINIKUBE_IP task-console.local" | sudo tee -a /etc/hosts ``` ### Kubernetes install @@ -108,8 +100,6 @@ REVISION: 1 NOTES: 1. Management Console available at: http://management-console. -2. Task Console available at: - http://task-console. ``` ### OpenShift install @@ -139,8 +129,6 @@ REVISION: 1 NOTES: 1. Management Console available at: https://management-console. -2. Task Console available at: - https://task-console. ``` ## Installing a released version from the OCI registry: @@ -196,51 +184,36 @@ The following table lists the configurable parameters of the Runtime Tools Conso -| Key | Type | Default | Description | -| -------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | -| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | -| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | -| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | -| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | -| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | -| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | -| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | -| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | -| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | -| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | -| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | -| fullnameOverride | string | `""` | Overrides charts full name | -| nameOverride | string | `""` | Overrides charts name | -| management-console.appNameOverride | string | `""` | Overrides the deployed application name | -| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| management-console.enabled | bool | `true` | Enable or disable Management Console installation | -| management-console.fullnameOverride | string | `""` | Overrides charts full name | -| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| management-console.name | string | `"management-console"` | Component name | -| management-console.nameOverride | string | `""` | Overrides charts name | -| management-console.nodeSelector | object | `{}` | | -| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | -| task-console.appNameOverride | string | `""` | Overrides the deployed application name | -| task-console.appTaskActiveStatesListOverride | string | `""` | Overrides the Task Console active states list | -| task-console.appTaskStatesListOverride | string | `""` | Overrides the Task Console states list | -| task-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| task-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| task-console.enabled | bool | `true` | Enable or disable Task Console installation | -| task-console.fullnameOverride | string | `""` | Overrides charts full name | -| task-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-task-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| task-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| task-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"task-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| task-console.name | string | `"task-console"` | Component name | -| task-console.nameOverride | string | `""` | Overrides charts name | -| task-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"task-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| task-console.service | object | `{"nodePort":"","port":8080,"targetPort":8080,"type":"ClusterIP"}` | Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| task-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | +| Key | Type | Default | Description | +| ------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | +| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | +| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | +| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | +| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | +| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | +| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | +| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | +| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | +| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | +| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | +| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | +| fullnameOverride | string | `""` | Overrides charts full name | +| nameOverride | string | `""` | Overrides charts name | +| management-console.appNameOverride | string | `""` | Overrides the deployed application name | +| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | +| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | +| management-console.enabled | bool | `true` | Enable or disable Management Console installation | +| management-console.fullnameOverride | string | `""` | Overrides charts full name | +| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | +| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | +| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | +| management-console.name | string | `"management-console"` | Component name | +| management-console.nameOverride | string | `""` | Overrides charts name | +| management-console.nodeSelector | object | `{}` | | +| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | +| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | +| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | --- diff --git a/packages/runtime-tools-consoles-helm-chart/install.js b/packages/runtime-tools-consoles-helm-chart/install.js index f6772ba9f2b..2a4ef2108bd 100644 --- a/packages/runtime-tools-consoles-helm-chart/install.js +++ b/packages/runtime-tools-consoles-helm-chart/install.js @@ -23,7 +23,7 @@ const fs = require("fs"); // Set version for the Chart (and its dependencies) and Subcharts console.log("[runtime-tools-consoles-helm-chart install.js] Updating Chart.yaml files..."); -const chartFiles = ["src/Chart.yaml", "src/charts/task-console/Chart.yaml", "src/charts/management-console/Chart.yaml"]; +const chartFiles = ["src/Chart.yaml", "src/charts/management-console/Chart.yaml"]; chartFiles.forEach((file) => { const doc = yaml.parseDocument(fs.readFileSync(file, "utf8")); if (file == "src/Chart.yaml") { @@ -33,7 +33,6 @@ chartFiles.forEach((file) => { doc.setIn(["appVersion"], env.runtimeToolsConsolesHelmChart.tag); if (doc.getIn(["dependencies"])) { doc.setIn(["dependencies", "0", "version"], env.runtimeToolsConsolesHelmChart.tag); - doc.setIn(["dependencies", "1", "version"], env.runtimeToolsConsolesHelmChart.tag); } console.log(yaml.stringify(doc)); fs.writeFileSync(file, yaml.stringify(doc), "utf8"); @@ -41,7 +40,7 @@ chartFiles.forEach((file) => { // Set tags used for images console.log("[runtime-tools-consoles-helm-chart install.js] Updating values.yaml files..."); -const valuesFiles = ["src/charts/task-console/values.yaml", "src/charts/management-console/values.yaml"]; +const valuesFiles = ["src/charts/management-console/values.yaml"]; valuesFiles.forEach((file) => { const doc = yaml.parseDocument(fs.readFileSync(file, "utf8")); doc.setIn(["image", "tag"], env.root.streamName); diff --git a/packages/runtime-tools-consoles-helm-chart/package.json b/packages/runtime-tools-consoles-helm-chart/package.json index 6417a365bcb..69554b0ff3f 100644 --- a/packages/runtime-tools-consoles-helm-chart/package.json +++ b/packages/runtime-tools-consoles-helm-chart/package.json @@ -25,8 +25,7 @@ "update-readmes": "node scripts/update-readmes.js && pnpm format" }, "dependencies": { - "@kie-tools/kogito-management-console": "workspace:*", - "@kie-tools/kogito-task-console": "workspace:*" + "@kie-tools/kogito-management-console": "workspace:*" }, "devDependencies": { "@kie-tools/root-env": "workspace:*", diff --git a/packages/runtime-tools-consoles-helm-chart/src/Chart.lock b/packages/runtime-tools-consoles-helm-chart/src/Chart.lock index c2311558156..fd4d0ce91a7 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/Chart.lock +++ b/packages/runtime-tools-consoles-helm-chart/src/Chart.lock @@ -2,8 +2,5 @@ dependencies: - name: management-console repository: "" version: 0.0.0 -- name: task-console - repository: "" - version: 0.0.0 -digest: sha256:bd9701735749abd6ed320a0f90d3b9b6dae4ac27b5c7e3b5d72de1037016a3d3 -generated: "2024-08-09T11:12:50.052943-03:00" +digest: sha256:84cd8d19b35a87b2a5393ae1880b8c76be191f4c1839739cd6783454b02c503f +generated: "2024-10-23T12:57:15.741355-03:00" diff --git a/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml b/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml index 2c74756c5f1..442f09e499e 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml @@ -8,6 +8,3 @@ dependencies: - name: management-console version: 0.0.0 condition: management-console.enabled - - name: task-console - version: 0.0.0 - condition: task-console.enabled diff --git a/packages/runtime-tools-consoles-helm-chart/src/README.md b/packages/runtime-tools-consoles-helm-chart/src/README.md index 835c5537dde..d48cf608cb0 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/README.md +++ b/packages/runtime-tools-consoles-helm-chart/src/README.md @@ -26,55 +26,39 @@ A Helm chart to deploy Runtime Tools Consoles on Kubernetes | Repository | Name | Version | | ---------- | ------------------ | ------- | | | management-console | 0.0.0 | -| | task-console | 0.0.0 | ## Values -| Key | Type | Default | Description | -| -------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | -| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | -| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | -| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | -| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | -| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | -| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | -| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | -| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | -| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | -| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | -| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | -| fullnameOverride | string | `""` | Overrides charts full name | -| nameOverride | string | `""` | Overrides charts name | -| management-console.appNameOverride | string | `""` | Overrides the deployed application name | -| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| management-console.enabled | bool | `true` | Enable or disable Management Console installation | -| management-console.fullnameOverride | string | `""` | Overrides charts full name | -| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| management-console.name | string | `"management-console"` | Component name | -| management-console.nameOverride | string | `""` | Overrides charts name | -| management-console.nodeSelector | object | `{}` | | -| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | -| task-console.appNameOverride | string | `""` | Overrides the deployed application name | -| task-console.appTaskActiveStatesListOverride | string | `""` | Overrides the Task Console active states list | -| task-console.appTaskStatesListOverride | string | `""` | Overrides the Task Console states list | -| task-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| task-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| task-console.enabled | bool | `true` | Enable or disable Task Console installation | -| task-console.fullnameOverride | string | `""` | Overrides charts full name | -| task-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-task-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| task-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| task-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"task-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| task-console.name | string | `"task-console"` | Component name | -| task-console.nameOverride | string | `""` | Overrides charts name | -| task-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"task-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| task-console.service | object | `{"nodePort":"","port":8080,"targetPort":8080,"type":"ClusterIP"}` | Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| task-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | +| Key | Type | Default | Description | +| ------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | +| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | +| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | +| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | +| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | +| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | +| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | +| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | +| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | +| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | +| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | +| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | +| fullnameOverride | string | `""` | Overrides charts full name | +| nameOverride | string | `""` | Overrides charts name | +| management-console.appNameOverride | string | `""` | Overrides the deployed application name | +| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | +| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | +| management-console.enabled | bool | `true` | Enable or disable Management Console installation | +| management-console.fullnameOverride | string | `""` | Overrides charts full name | +| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | +| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | +| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | +| management-console.name | string | `"management-console"` | Component name | +| management-console.nameOverride | string | `""` | Overrides charts name | +| management-console.nodeSelector | object | `{}` | | +| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | +| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | +| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | --- diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml deleted file mode 100644 index ad9821ad989..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: task-console -description: A Helm chart to deploy Runtime Tools Task Console on Kubernetes -type: application -version: 0.0.0 -appVersion: 0.0.0 diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md deleted file mode 100644 index d83d76cb985..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# task-console - -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square) - -A Helm chart to deploy Runtime Tools Task Console on Kubernetes - -## Values - -| Key | Type | Default | Description | -| ------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| appNameOverride | string | `""` | Overrides the deployed application name | -| appTaskActiveStatesListOverride | string | `""` | Overrides the Task Console active states list | -| appTaskStatesListOverride | string | `""` | Overrides the Task Console states list | -| appVersionOverride | string | `""` | Overrides the deployed application version | -| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| enabled | bool | `true` | Enable or disable Task Console installation | -| fullnameOverride | string | `""` | Overrides charts full name | -| image | object | `{"account":"apache","name":"incubator-kie-kogito-task-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"task-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| name | string | `"task-console"` | Component name | -| nameOverride | string | `""` | Overrides charts name | -| openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"task-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| service | object | `{"nodePort":"","port":8080,"targetPort":8080,"type":"ClusterIP"}` | Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | - ---- - -Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl deleted file mode 100644 index fdede13cbb1..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -Create a fully qualified name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "taskConsole.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name .Values.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - -{{/* -These can be overriden by the base chart. -*/}} -{{- define "selectorLabels" -}} -{{- end -}} -{{- define "labels" -}} -{{- end -}} - -{{- define "taskConsole.selectorLabels" -}} -app.kubernetes.io/component: {{ .Values.name | quote }} -{{ include "selectorLabels" . }} -{{- end -}} - -{{- define "taskConsole.labels" -}} -{{ include "taskConsole.selectorLabels" . }} -{{ include "labels" . }} -{{- end -}} - -{{/* -Create the name of the service account to use for the task console component -*/}} -{{- define "taskConsole.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "taskConsole.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm deleted file mode 100644 index e14c0d7f7e0..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm +++ /dev/null @@ -1,112 +0,0 @@ -{{- $dataIndexUrl := .Values.global.dataIndexUrl | required ".Values.global.dataIndexUrl is required." -}} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "taskConsole.fullname" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "taskConsole.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "taskConsole.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "taskConsole.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Values.name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.registry }}/{{ .Values.image.account }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - {{- with .Values.env }} - env: - {{- tpl (toYaml .) $ | nindent 12 }} - {{- end }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE - value: {{ .Values.global.environment }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT - value: {{ $dataIndexUrl }} - {{- if .Values.appNameOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_NAME - value: {{ .Values.appNameOverride }} - {{- end }} - {{- if .Values.appVersionOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_VERSION - value: {{ .Values.appVersionOverride }} - {{- end }} - {{- if .Values.appTaskStatesListOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_STATES_LIST - value: {{ .Values.appTaskStatesListOverride }} - {{- end }} - {{- if .Values.appTaskActiveStatesListOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_ACTIVE_STATES_LIST - value: {{ .Values.appTaskActiveStatesListOverride }} - {{- end }} - {{- if .Values.global.keycloakHealthCheck }} - - name: KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK - value: true - {{- end }} - {{- if .Values.global.keycloakTokenValidity }} - - name: KOGITO_CONSOLES_KEYCLOAK_UPDATE_TOKEN_VALIDITY - value: {{ .Values.global.keycloakTokenValidity }} - {{- end }} - {{- if .Values.global.keycloakHealthCheckUrl }} - - name: KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL - value: {{ .Values.global.keycloakHealthCheckUrl }} - {{- end }} - {{- if .Values.global.keycloakRealm }} - - name: KOGITO_CONSOLES_KEYCLOAK_REALM - value: {{ .Values.global.keycloakRealm }} - {{- end }} - {{- if .Values.global.keycloakUrl }} - - name: KOGITO_CONSOLES_KEYCLOAK_URL - value: {{ .Values.global.keycloakUrl }} - {{- end }} - {{- if .Values.global.keycloakClientId }} - - name: KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID - value: {{ .Values.global.keycloakClientId }} - {{- end }} - ports: - - name: http - containerPort: {{ .Values.service.targetPort }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm deleted file mode 100644 index c20d58f6716..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "taskConsole.fullname" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "taskConsole.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm deleted file mode 100644 index 985d68395d1..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "taskConsole.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ tpl .Values.ingress.className . | quote }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ tpl .host $ | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm deleted file mode 100644 index 359caa20f27..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm +++ /dev/null @@ -1,25 +0,0 @@ -{{- if and (.Capabilities.APIVersions.Has "route.openshift.io/v1/Route") (.Values.openshiftRoute.enabled) -}} -{{- $fullName := include "taskConsole.fullname" . -}} -{{- $svcPort := .Values.service.targetPort -}} -kind: Route -apiVersion: route.openshift.io/v1 -metadata: - name: {{ $fullName }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} - {{- with .Values.openshiftRoute.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - host: {{ tpl .Values.openshiftRoute.host . | quote }} - to: - name: {{ $fullName }} - kind: Service - port: - targetPort: {{ $svcPort }} - {{- with .Values.openshiftRoute.tls }} - tls: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm deleted file mode 100644 index 4ca1e450e18..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "taskConsole.fullname" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetPort }} - protocol: TCP - name: http - {{- if (and (eq .Values.service.type "NodePort")) }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} - selector: - {{- include "taskConsole.selectorLabels" . | nindent 4 }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm deleted file mode 100644 index 527cc3cb033..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "taskConsole.serviceAccountName" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm deleted file mode 100644 index 9347d65d3f6..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "task-console.fullname" . }}-test-connection" - labels: - {{- include "task-console.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "task-console.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml deleted file mode 100644 index 431d6bfd3b3..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml +++ /dev/null @@ -1,118 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Task Console application -# -- Enable or disable Task Console installation -enabled: true - -# -- Component name -name: task-console - -# -- Overrides the deployed application name -appNameOverride: "" - -# -- Overrides the deployed application version -appVersionOverride: "" - -# -- Overrides the Task Console states list -appTaskStatesListOverride: "" - -# -- Overrides the Task Console active states list -appTaskActiveStatesListOverride: "" - -# @ignored -replicaCount: 1 - -# -- Image source configuration for the Management Console image -image: - registry: docker.io - account: apache - name: incubator-kie-kogito-task-console - pullPolicy: IfNotPresent - tag: "main" # AUTO-GENERATED BY install.js. DO NOT CHANGE MANUALLY. - -# -- Pull secrets used when pulling Management Console image -imagePullSecrets: [] - -# -- Overrides charts name -nameOverride: "" -# -- Overrides charts full name -fullnameOverride: "" - -# -- Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) -serviceAccount: - create: true - annotations: {} - name: "" - -# @ignored -podAnnotations: {} - -# @ignored -podSecurityContext: {} - -# @ignored -securityContext: {} - -# -- Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) -service: - type: ClusterIP - port: 8080 - targetPort: 8080 - nodePort: "" - -# -- Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) -ingress: - enabled: false - className: "{{ .Values.global.kubernetesIngressClass }}" - annotations: {} - hosts: - - host: task-console.{{ .Values.global.kubernetesClusterDomain }} - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - -# -- Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) -openshiftRoute: - enabled: false - annotations: {} - host: task-console.{{ .Values.global.openshiftRouteDomain }} - tls: - termination: edge - insecureEdgeTerminationPolicy: None - -# @ignored -resources: {} - -# -- Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - -# @ignored -nodeSelector: {} - -# @ignored -tolerations: [] - -# @ignored -affinity: {} diff --git a/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt b/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt index 90aa9790ab6..55da498cc10 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt +++ b/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt @@ -29,33 +29,6 @@ In order to get {{ .Release.Name }} running you need to run these commands: {{- end }} {{- end }} -{{- if and (index .Values "task-console" "enabled") (index .Values "task-console" "ingress" "enabled") }} -2. Task Console available at: -{{- range $host := index .Values "task-console" "ingress" "hosts" }} - {{- range .paths }} - http{{ if index $.Values "task-console" "ingress" "tls" }}s{{ end }}://{{ tpl $host.host $ }}{{ .path }} - {{- end }} -{{- end }} -{{- else }} - -2. Run the following commands in a separate terminal to port-forward Task Console application: -{{- if contains "NodePort" ( index .Values "task-console" "service" "type" ) }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "taskConsole.fullname" ( index .Subcharts "task-console" ) }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" ( index .Values "task-console" "service" "type" ) }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "taskConsole.fullname" ( index .Subcharts "task-console" ) }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "taskConsole.fullname" ( index .Subcharts "task-console" ) }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ index .Values "task-console" "service" "port" }} -{{- else if contains "ClusterIP" ( index .Values "task-console" "service" "type" ) }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/component={{ index .Values "task-console" "name" }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Task Console URL: http://127.0.0.1:{{ index .Values "task-console" "service" "port" }}" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME {{ index .Values "task-console" "service" "port" }}:$CONTAINER_PORT -{{- end }} -{{- end }} - {{- else if eq .Values.global.ingressSource "minikube" }} You may need to add the above hostnames to your /etc/hosts file, mapping them to your minikube ip. @@ -70,13 +43,6 @@ Run the following commands: {{- end }} {{- end }} {{- end }} -{{- if index .Values "task-console" "enabled" }} -{{- range $host := index .Values "task-console" "ingress" "hosts" }} - {{- range .paths }} - echo "$MINIKUBE_IP {{ tpl $host.host $ }}" | sudo tee -a /etc/hosts - {{- end }} -{{- end }} -{{- end }} {{- else if eq .Values.global.ingressSource "openshift" }} @@ -84,10 +50,6 @@ Run the following commands: 1. Management Console available at: http{{ if index $.Values "management-console" "openshiftRoute" "tls" }}s{{ end }}://{{ tpl (index .Values "management-console" "openshiftRoute" "host") . }} {{- end }} -{{- if index .Values "task-console" "enabled" }} -2. Task Console available at: - http{{ if index $.Values "task-console" "openshiftRoute" "tls" }}s{{ end }}://{{ tpl (index .Values "task-console" "openshiftRoute" "host") . }} -{{- end }} {{- else }} {{- if and ( index .Values "management-console" "enabled" ) ( index .Values "management-console" "ingress" "enabled" ) }} @@ -98,13 +60,5 @@ Run the following commands: {{- end }} {{- end }} {{- end }} -{{- if and ( index .Values "task-console" "enabled" ) ( index .Values "task-console" "ingress" "enabled" ) }} -2. Task Console available at: -{{- range $host := index .Values "task-console" "ingress" "hosts" }} - {{- range .paths }} - http{{ if index $.Values "task-console" "ingress" "tls" }}s{{ end }}://{{ tpl $host.host $ }}{{ .path }} - {{- end }} -{{- end }} -{{- end }} {{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml b/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml index 1ee20785f24..d08ceb6dd66 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml @@ -17,11 +17,6 @@ # under the License. # -# Task Console application -task-console: - ingress: - enabled: true - # Management Console application management-console: ingress: diff --git a/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml b/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml index a040808a5a3..07af76f1645 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml @@ -17,11 +17,6 @@ # under the License. # -# Task Console application -task-console: - ingress: - enabled: true - # Management Console application management-console: ingress: diff --git a/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml b/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml index 7146a9fee1c..9470e232095 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml @@ -17,12 +17,6 @@ # under the License. # -# Task Console application -task-console: - openshiftRoute: - enabled: true - host: task-console.{{ .Values.global.openshiftRouteDomain }} - # Management Console application management-console: openshiftRoute: diff --git a/packages/runtime-tools-management-console-webapp/README.md b/packages/runtime-tools-management-console-webapp/README.md index 6210e53c8d1..4083d328dfe 100644 --- a/packages/runtime-tools-management-console-webapp/README.md +++ b/packages/runtime-tools-management-console-webapp/README.md @@ -185,6 +185,41 @@ The milestones panel show the list of milestones present and their current state ![Milestones](./docs/milestones.png?raw=true "Milestones") +## Working with the Tasks panel + +The tasks panel shows a list of user tasks which are available for a process. Each column contains detailed information about the user task which are - _Name_, _Process_, _Priority_, _Status_, _Started_ and _Last update_. The columns are sortable. + +![Tasks](./docs/taskconsole.png?raw=true "Tasks") + +The task console consist of filters, which can be used to narrow down the search on a user task. There are two filters available + +- A filter based on the status(dropdown) +- A filter based on the task name(text search) + +![Filters](./docs/taskfilters.png?raw=true "Filters") + +The _Status_ filter can be dropped down to view the and select the states available + +![States](./docs/taskstates.png?raw=true "States") + +A _refresh_ button is available to refresh the list of user tasks + +A _Reset to default_ button is available to reset the filters to its initial state. + +The user task list also supports pagination. + +Clicking on the name of the user task will navigate to another screen, which consist of the auto generated forms. + +### Task details + +The task details page consist of an auto generated forms and buttons to perform corresponding action on the user tasks. + +![Forms](./docs/taskforms.png?raw=true "Forms") + +The task details page also contains a _View details_ button, to view more details about the task. + +![Details](./docs/taskdetails.png?raw=true "Details") + ## Enabling Keycloak security ### Starting and Configuring the Keycloak Server diff --git a/packages/runtime-tools-task-console-webapp/docs/taskconsole.png b/packages/runtime-tools-management-console-webapp/docs/taskconsole.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/taskconsole.png rename to packages/runtime-tools-management-console-webapp/docs/taskconsole.png diff --git a/packages/runtime-tools-task-console-webapp/docs/details.png b/packages/runtime-tools-management-console-webapp/docs/taskdetails.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/details.png rename to packages/runtime-tools-management-console-webapp/docs/taskdetails.png diff --git a/packages/runtime-tools-task-console-webapp/docs/filters.png b/packages/runtime-tools-management-console-webapp/docs/taskfilters.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/filters.png rename to packages/runtime-tools-management-console-webapp/docs/taskfilters.png diff --git a/packages/runtime-tools-task-console-webapp/docs/forms.png b/packages/runtime-tools-management-console-webapp/docs/taskforms.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/forms.png rename to packages/runtime-tools-management-console-webapp/docs/taskforms.png diff --git a/packages/runtime-tools-task-console-webapp/docs/states.png b/packages/runtime-tools-management-console-webapp/docs/taskstates.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/states.png rename to packages/runtime-tools-management-console-webapp/docs/taskstates.png diff --git a/packages/runtime-tools-management-console-webapp/package.json b/packages/runtime-tools-management-console-webapp/package.json index 6a568f18fb8..1e58f2cbd96 100644 --- a/packages/runtime-tools-management-console-webapp/package.json +++ b/packages/runtime-tools-management-console-webapp/package.json @@ -56,6 +56,8 @@ "@graphql-codegen/typescript": "^2.8.8", "@graphql-codegen/typescript-operations": "^2.5.13", "@graphql-codegen/typescript-react-apollo": "^3.3.7", + "@kie-tools-core/envelope": "workspace:*", + "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/webpack-base": "workspace:*", "@kie-tools/eslint": "workspace:*", "@kie-tools/root-env": "workspace:*", diff --git a/packages/runtime-tools-task-console-webapp/resources/form-displayer.html b/packages/runtime-tools-management-console-webapp/resources/form-displayer.html similarity index 100% rename from packages/runtime-tools-task-console-webapp/resources/form-displayer.html rename to packages/runtime-tools-management-console-webapp/resources/form-displayer.html diff --git a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx index d7dfcd4c2ef..dea6d49fa17 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx @@ -31,6 +31,8 @@ import { PageLayout } from "@kie-tools/runtime-tools-components/dist/components/ import { ProcessListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList"; import { ProcessDetailsContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails"; import { JobsManagementContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement"; +import { TaskInboxContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox"; +import { TaskFormContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms"; interface IOwnProps { apolloClient: ApolloClient; @@ -64,11 +66,15 @@ const ManagementConsole: React.FC = ({ apolloClient, userContext, chi - - - - - + + + + + + + + + diff --git a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx index 62c15c8972d..279d056c599 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx @@ -34,9 +34,16 @@ const ManagementConsoleNav: React.FC = ({ pathname }) => { Process Instances - - - Jobs Management + + + Jobs + + + + + + + Tasks diff --git a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx index 4201fee73db..18be1aabe22 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx @@ -18,7 +18,7 @@ */ import * as React from "react"; import { Redirect, Route, Switch } from "react-router-dom"; -import { JobsManagementPage, ProcessListPage, ProcessDetailsPage } from "../../pages"; +import { JobsPage, ProcessListPage, ProcessDetailsPage, TasksPage, TaskDetailsPage } from "../../pages"; import { PageNotFound } from "@kie-tools/runtime-tools-shared-webapp-components/dist/PageNotFound"; import { NoData } from "@kie-tools/runtime-tools-shared-webapp-components/dist/NoData"; @@ -27,17 +27,17 @@ const ManagementConsoleRoutes: React.FC = () => { } /> - + + + } /> } + render={(_props) => } /> ( - - )} + render={(_props) => } /> ); diff --git a/packages/runtime-tools-management-console-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx b/packages/runtime-tools-management-console-webapp/src/components/containers/JobsContainer/JobsContainer.tsx similarity index 93% rename from packages/runtime-tools-management-console-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx rename to packages/runtime-tools-management-console-webapp/src/components/containers/JobsContainer/JobsContainer.tsx index e4cdf71052d..4bc5e8611ad 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/containers/JobsContainer/JobsContainer.tsx @@ -24,9 +24,9 @@ import { useJobsManagementGatewayApi, } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement"; -const JobsManagementContainer: React.FC = () => { +const JobsContainer: React.FC = () => { const gatewayApi: JobsManagementGatewayApi = useJobsManagementGatewayApi(); return ; }; -export default JobsManagementContainer; +export default JobsContainer; diff --git a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components/TaskFormContainer/TaskFormContainer.tsx b/packages/runtime-tools-management-console-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx similarity index 95% rename from packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components/TaskFormContainer/TaskFormContainer.tsx rename to packages/runtime-tools-management-console-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx index 7899ec20456..8e74e503305 100644 --- a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components/TaskFormContainer/TaskFormContainer.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx @@ -48,7 +48,7 @@ const TaskFormContainer: React.FC = ({ driver={{ doSubmit(phase?: string, payload?: any): Promise { return gatewayApi - .doSubmit(userTask, phase, payload) + .doSubmitAsAnonymous(userTask, phase, payload) .then((result) => onSubmitSuccess(phase)) .catch((error) => { const message = error.response ? error.response.data : error.message; @@ -56,7 +56,7 @@ const TaskFormContainer: React.FC = ({ }); }, getTaskFormSchema(): Promise> { - return gatewayApi.getTaskFormSchema(userTask); + return gatewayApi.getTaskFormSchemaAsAnonymous(userTask); }, getCustomForm(): Promise
{ return gatewayApi.getCustomForm(userTask); diff --git a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx b/packages/runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx similarity index 96% rename from packages/runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx rename to packages/runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx index 9f0f921d274..07daf8e161c 100644 --- a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx @@ -45,7 +45,7 @@ const TaskInboxContainer: React.FC = ({ ouiaId, ouiaSafe }) => { return ( = () => { +const JobsPage: React.FC = () => { useEffect(() => { - return ouiaPageTypeAndObjectId("jobs-management"); + return ouiaPageTypeAndObjectId("jobs"); }); return ( - - {/* */} + - + ); }; -export default JobsManagementPage; +export default JobsPage; diff --git a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx b/packages/runtime-tools-management-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx similarity index 88% rename from packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx rename to packages/runtime-tools-management-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx index f4921801abe..42765ff8469 100644 --- a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx @@ -36,7 +36,7 @@ import { PageSection } from "@patternfly/react-core/dist/js/components/Page"; import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye"; import { Grid, GridItem } from "@patternfly/react-core/dist/js/layouts/Grid"; import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex"; -import TaskFormContainer from "./components/TaskFormContainer/TaskFormContainer"; +import TaskFormContainer from "../../containers/TaskFormContainer/TaskFormContainer"; import FormNotification, { Notification } from "./components/FormNotification/FormNotification"; import { TaskInboxGatewayApi, @@ -102,7 +102,7 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui message: submitMessage, details: notificationDetails, customAction: { - label: "Go to Task Inbox", + label: "Go to Tasks", onClick: () => { setNotification(null); goToInbox(); @@ -116,7 +116,7 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui const goToInbox = () => { taskInboxGatewayApi.clearOpenTask(); - props.history.push("/"); + props.history.push("/Tasks"); }; const onSubmitSuccess = (phase: string) => { @@ -136,9 +136,9 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui - - - + + + @@ -154,9 +154,9 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui - - - + + +