From bb8c98053434e5aa0de09b0a2a0fbe35e69542f3 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 17 Oct 2017 02:21:23 -0200 Subject: Add benchmark status to dashboard. A "benchmarks" widget is added, together with a update job. The job queries the benchmarks.leap.se website and shows current benchmarking status and outliers. It's a simple start for something that can get more complex depending on identified needs. --- widgets/benchmarks/benchmarks.coffee | 15 +++++++++++++++ widgets/benchmarks/benchmarks.html | 23 +++++++++++++++++++++++ widgets/benchmarks/benchmarks.scss | 13 +++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 widgets/benchmarks/benchmarks.coffee create mode 100644 widgets/benchmarks/benchmarks.html create mode 100644 widgets/benchmarks/benchmarks.scss (limited to 'widgets') diff --git a/widgets/benchmarks/benchmarks.coffee b/widgets/benchmarks/benchmarks.coffee new file mode 100644 index 0000000..1d47b7c --- /dev/null +++ b/widgets/benchmarks/benchmarks.coffee @@ -0,0 +1,15 @@ +class Dashing.Benchmarks extends Dashing.Widget + + ready: -> + # This is fired when the widget is done being rendered + + onData: (data) -> + # Handle incoming data + # You can access the html node of this widget with `@node` + # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. + + @accessor 'hasBadOutliers', -> + @get('bad') > 0 + + @accessor 'hasGoodOutliers', -> + @get('good') > 0 diff --git a/widgets/benchmarks/benchmarks.html b/widgets/benchmarks/benchmarks.html new file mode 100644 index 0000000..d7dda1c --- /dev/null +++ b/widgets/benchmarks/benchmarks.html @@ -0,0 +1,23 @@ +

+ +

 

+ +

Current Status

+ +

+ + + +

+ +

 

+ +

Recent Outliers

+ +

+ + / + +

+ +

diff --git a/widgets/benchmarks/benchmarks.scss b/widgets/benchmarks/benchmarks.scss new file mode 100644 index 0000000..7acfe24 --- /dev/null +++ b/widgets/benchmarks/benchmarks.scss @@ -0,0 +1,13 @@ +.widget-benchmarks { + background-color: black; +} + +.good { + color: green; + font-weight: bold; +} + +.bad { + color: #d93c38; + font-weight: bold; +} -- cgit v1.2.3