Skip to content

mmuzikar/hawtio-next

 
 

Repository files navigation

Hawtio.next

Test Lint

A Hawtio reimplementation based on TypeScript + React. This project reimplements the following Hawtio JS components in one project:

Development

This project was generated with Create React App and is managed through CRACO for customised Webpack configurations.

See also Developing Hawtio.next for the project styling, guidelines, and more details on development.

Prerequisites

You need to have installed the following tools before developing the project.

Minimum Version of Yarn is 3.4.1

The default installation version of yarn on many operating systems is 1.22-19 (the classic version). This causes a problem as the development app downloads the @hawtio/react package rather than using the project directory. As a result, the mandated minimum version has been set to 3.4.1.

If yarn install is attempted with a version lower than 3.4.1 then an error message is displayed, eg.

$ /usr/bin/yarn install yarn install v1.22.19 [1/5] Validating package.json... error @hawtio/next-root@0.0.0: The engine "yarn" is incompatible with this module. Expected version ">=3.4.1". Got "1.22.19" error Found incompatible module.

To upgrade such a version to 3.4.1, use yarn's own set-version command:

yarn set version 3.4.1

This will download the 3.4.1 internals to hawtio-next/.yarn which are then deferred to by the installed yarn binary.

Developing

After checking out the project, run the following command to set up the project dependencies.

yarn install

To develop the project, run the following command and then open 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

Building

To build the project for production, run the following command. It's built into the build/ directory.

yarn build

Testing

To execute the unit tests, run the following command.

yarn test

Linting

It is recommended to run linting against the code periodically with the following command.

yarn lint

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.0%
  • JavaScript 1.8%
  • Other 1.2%