HystrixViewer.js is a simple JavaScript library for monitoring Hystrix Metrics in real time. It's a port of Hystrix Dashboard and relies on Hystrix metrics instead of Hystrix stream.
This library is very easy to use. You can create a Hystrix Dashboard by calling addHystrixDashboard
method.
The method takes a div id.
hystrixViewer.addHystrixDashboard('#hystrix-div');
hystrixViewer.refresh(data);
The viewer can be updated by calling refresh
method.
hystrixViewer.refresh(data);
- Download all the javascript and css files from dist directory.
- The documentation and working example can be found here in demo.
The HystrixViewer depends on the following libraries:
- D3 is a JavaScript library for manipulating documents based on data.
- jQuery is a quintessential JavaScriptIt for manipulating HTML documents.
npm install gulp
- Install the library's dependencies:
npm install
- To build the Javascript library, type:
gulp build:js
P.S. If your OS does not recognize gulp, trying installing command line interface of gulp by typing:
npm install --global gulp-cli
- To build the css library, type
gulp build:css
- To build everything at the same time, type
gulp
- To build with Google closure compiler, type
gulp compile
- To unit test, type
gulp test
The HystrixViewer.js code is shared under the terms of Apache License v2.0.