summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/benchmarks/benchmarks.coffee15
-rw-r--r--widgets/benchmarks/benchmarks.html23
-rw-r--r--widgets/benchmarks/benchmarks.scss13
3 files changed, 51 insertions, 0 deletions
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 @@
+<h1 class="title"><a href="https://benchmarks.leap.se/"><span data-bind="title"></span></a></h1>
+
+<p>&nbsp;</p>
+
+<h4><a href="https://benchmarks.leap.se"><span>Current Status</span></a></h4>
+
+<p>
+ <a href="https://benchmarks.leap.se">
+ <span data-bind="is-benchmarked-status"></span>
+ </a>
+</p>
+
+<p>&nbsp;</p>
+
+<h4><a href="https://benchmarks.leap.se">Recent Outliers</a></h4>
+
+<p>
+ <a href="https://benchmarks.leap.se">
+ <span data-bind="good" data-addclass-good="hasGoodOutliers"></span> / <span data-bind="bad" data-addclass-bad="hasBadOutliers"></span></a>
+ </a>
+</p>
+
+<p class="updated-at" data-bind="updatedAtMessage"></p>
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;
+}