This is an extension plugin that adds AI functionality to Hawtio. This plugin is intended for use with Hawtio v5.
<dependency>
<groupId>io.hawt.ai</groupId>
<artifactId>hawtio-ai-plugin</artifactId>
<version>0.1.1</version>
</dependency>npm i @hawtio/ai-pluginYarn
yarn add @hawtio/ai-pluginThe key components of the project are as follows:
| Components | Description |
|---|---|
| hawtio-ai-plugin | Hawtio AI plugin itself; TypeScript project. |
| hawtio-ai-plugin-test-app | Test project for developing the Hawtio AI plugin, based on Spring Boot. |
mvn clean installmvn spring-boot:run -pl app -Dskip.yarnThe test application's Hawtio console can be accessed at: http://localhost:8080/hawtio/
Note
Faster plugin development cycle
You can develop a plugin step by step by running mvn install or mvn spring-boot:run while checking the behaviour in the browser each time, but in this way you cannot run a quick development feedback cycle.
You can instead develop the frontend project of the plugin in a fast feedback cycle by running the test application on the backend while starting the plugin itself in development mode with yarn start, as follows.
To develop the plugin, firstly launch the test application on the backend:
mvn spring-boot:run -Dskip.yarnThen, in another terminal, start the plugin project in development mode:
cd plugin
yarn startNow you should be able to preview the plugin under development at http://localhost:3001/hawtio/. However, since it still hasn't been connected to a backend JVM, you can only test features that don't require the JMX MBean tree.
To test the features that depend on the JMX MBean tree, use Connect plugin http://localhost:3001/hawtio/connect to connect to the test application running in the background. The Jolokia endpoint should be available at http://localhost:8080/hawtio/jolokia.
Now you can preview all kinds of features provided by the plugin on the console under development, and run a faster development cycle by utilising hot reloading provided by Webpack.