<commit_before>= Hawkular Console

[.lead]
*Hawkular Console* is the home of the UI console for Hawkular.  The current console is based on https://github.com/hawtio/hawtio/blob/master/docs/Overview2dotX.md[Hawt.io 2], which is (now) a javascript based client-side framework.
This console application pulls in various bower packages (libs) and Hawt.io 2 plugins (which are also bower packages) to plug-n-play various functionality to the console. Since one of the bower packages it pulls in is our Hawt.io plugin, it loads this plugin and adds it to the nav bar.

== UI Directory Structure

* ui - directory for various Hawkular UIs (currently only one)

** ui/console - The main angular.js Hawkular UI console. For more info please see: http://www.hawkular.org/docs/dev/ui-dev.html[Hawkular UI Dev Guide]

The general idea here being hawt.io UIs which are composed of plugins (that can swapped around like legos between the various UIs)

== Maven Install

The easiest way to build the console is to use maven (inside the `console` directory):

`mvn install`

No system http://nodejs.org/[Node.js] dependencies are needed.
http://nodejs.org/[Node.js] and its related modules are managed by the https://github.com/eirslett/frontend-maven-plugin[frontend-maven-plugin].
They are downloaded to the build target (./console/target) directory, where the actual http://gulpjs.com/[Gulp] based build process
(triggered by the maven plugin) happens.

To save some time during the build process, the downloaded http://nodejs.org/[Node.js] files and its related modules
don't have to be deleted after invoking the `clean` target. If you want to persist the node.js related stuff in the target
directory, please use the `cache` profile:

`mvn clean -Pcache`

In that case, the http://nodejs.org/[Node.js] is not deleted and doesn't have to be downloaded again, together with
npm modules and bower packages. Be aware, this causes the libraries not being updated.

== Hawkular-ui-components development

For the ease of development we're using the watch feature of the gulp tool. Gulp can watch for changes in source files
and update the compiled console accordingly. To use this feature, you must start Hawkular from the 
`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.x.z.Final/` directory. Once the server is up and running you have to 
start the actual gulp task responsible for watching the changes. To achieve this, traverse to the 
`$HAWKULAR_ROOT/ui/console/target/gulp-build/` directory and run:

`gulp watch-server`

The advantage of this approach is, that is scans for file changes in the source directory and apply them directly 
into the target directory (`$HAWKULAR_ROOT/dist/target/wildfly-x.y.z.Final/`), which is suitable for console 
developing since it doesn't require the whole maven build to see the actual changes in the console UI.

If you want to use your local version of hawkular-ui-components, you can use the `link` profile and the
https://oncletom.io/2013/live-development-bower-component/[bower link functionality]. In the hawkular-ui-components,
link your bower package with:<commit_msg>More directory fix<commit_after>= Hawkular Console

[.lead]
*Hawkular Console* is the home of the UI console for Hawkular.  The current console is based on https://github.com/hawtio/hawtio/blob/master/docs/Overview2dotX.md[Hawt.io 2], which is (now) a javascript based client-side framework.
This console application pulls in various bower packages (libs) and Hawt.io 2 plugins (which are also bower packages) to plug-n-play various functionality to the console. Since one of the bower packages it pulls in is our Hawt.io plugin, it loads this plugin and adds it to the nav bar.

== UI Directory Structure

* ui - directory for various Hawkular UIs (currently only one)

** ui/console - The main angular.js Hawkular UI console. For more info please see: http://www.hawkular.org/docs/dev/ui-dev.html[Hawkular UI Dev Guide]

The general idea here being hawt.io UIs which are composed of plugins (that can swapped around like legos between the various UIs)

== Maven Install

The easiest way to build the console is to use maven (inside the `console` directory):

`mvn install`

No system http://nodejs.org/[Node.js] dependencies are needed.
http://nodejs.org/[Node.js] and its related modules are managed by the https://github.com/eirslett/frontend-maven-plugin[frontend-maven-plugin].
They are downloaded to the build target (./console/target) directory, where the actual http://gulpjs.com/[Gulp] based build process
(triggered by the maven plugin) happens.

To save some time during the build process, the downloaded http://nodejs.org/[Node.js] files and its related modules
don't have to be deleted after invoking the `clean` target. If you want to persist the node.js related stuff in the target
directory, please use the `cache` profile:

`mvn clean -Pcache`

In that case, the http://nodejs.org/[Node.js] is not deleted and doesn't have to be downloaded again, together with
npm modules and bower packages. Be aware, this causes the libraries not being updated.

== Hawkular-ui-components development

For the ease of development we're using the watch feature of the gulp tool. Gulp can watch for changes in source files
and update the compiled console accordingly. To use this feature, you must start Hawkular from the 
`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.x.z.Final/` directory. Once the server is up and running you have to 
start the actual gulp task responsible for watching the changes. To achieve this, traverse to the 
`$HAWKULAR_ROOT/ui/console/target/gulp-build/` directory and run:

`gulp watch-server`

The advantage of this approach is, that is scans for file changes in the source directory and apply them directly 
into the target directory (`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.y.z.Final/`), which is suitable for console 
developing since it doesn't require the whole maven build to see the actual changes in the console UI.

If you want to use your local version of hawkular-ui-components, you can use the `link` profile and the
https://oncletom.io/2013/live-development-bower-component/[bower link functionality]. In the hawkular-ui-components,
link your bower package with:
{'fraction_non_alphanumeric': 0.07645650438946529, 'fraction_numerical': 0.0022346368715083797, 'mean_word_length': 4.420415224913495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2171561', 'n_tokens_mistral': 1832, 'n_tokens_neox': 1740, 'n_words': 833}