A Hawtio reimplementation based on TypeScript + React. This project reimplements the following Hawtio JS components in one project:
This project uses tsup and Webpack for building packages.
See also Developing Hawtio.next for the project styling, guidelines, and more details on development.
You need to have installed the following tools before developing the project.
Important
Building requires Yarn Berry (v2+). The default installation version of yarn on many operating systems is 1.22.19 (the classic version). This might cause a problem when building the project. As a result, the mandated minimum version has been set to 4.0.0.
If yarn install
is attempted with a version lower than 4.0.0 then an error message is displayed, eg.
$ /usr/bin/yarn install
yarn install v1.22.19
[1/5] Validating package.json...
error @hawtio/[email protected]: The engine "yarn" is incompatible with this module. Expected version ">=4". Got "1.22.19"
error Found incompatible module.
If you have enabled corepack
already, the project should automatically use the version of yarn committed to the repository itself.
corepack enable
$ yarn --version
4.0.1
After checking out the project, run the following command to set up the project dependencies.
yarn install
Then, build the whole project first.
yarn build:all
You can start developing the project by running the following command and then opening http://localhost:3000/ in the browser.
yarn start
Then run another Java application which has a Jolokia endpoint from a different terminal, and connect to it from the Connect tab in the Hawtio console. For example, you can run this Spring Boot example in background.
mvn spring-boot:run
You can connect to this example application at the Jolokia URL: http://localhost:10001/actuator/hawtio/jolokia. Open the Connect tab and create a connection with the following parameters:
- Name: <any name>
- Scheme: HTTP
- Host:
localhost
- Port:
10001
- Path:
/actuator/hawtio/jolokia
To build the project for production, run the following command. It's built into the build/
directory.
yarn build:all
To execute the unit tests, run the following command.
yarn test:all
It is recommended to run linting against the code periodically with the following command.
yarn lint && yarn format:check
Read Running E2E tests locally.
When making a PR E2E tests from hawtio/hawtio will be run against your frontend.
If you want to specify a different branch to run the tests from you can add
`branch: [remote:]branch`
to the PR description, ie. branch: e2e-test-fix
or in your own fork branch: jdoe:my-branch
.