Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1743)

Unified Diff: Tools/GardeningServer/ui/ct-cycle-time-card.html

Issue 476903004: [sheriff-o-matic]: Basic trooper display for sheriff-o-matic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/ui/ct-cycle-time-card.html
diff --git a/Tools/GardeningServer/ui/ct-cycle-time-card.html b/Tools/GardeningServer/ui/ct-cycle-time-card.html
new file mode 100644
index 0000000000000000000000000000000000000000..185071f2a236055af8d68020d36c16004db45107
--- /dev/null
+++ b/Tools/GardeningServer/ui/ct-cycle-time-card.html
@@ -0,0 +1,66 @@
+<!--
+Copyright 2014 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+
+<polymer-element name="ct-cycle-time-card" attributes="group">
+ <template>
+ <style>
+ #failure {
+ flex: 1;
+ margin-left: 10px;
+ }
+
+ #details {
+ color: red;
+ font-weight: bold;
+ }
+
+ .snoozed {
+ opacity: 0.5;
+ }
+ </style>
+ <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}">
+ <div id="details">
+ {{ group.tree }}: {{ group.data.details }}
+ </div>
+ <div id='chart'></div>
+ <div><a href="{{ group.data.url }}">link</a>
+ </div>
+ </template>
+ <script>
+ Polymer('ct-cycle-time-card', {
+ group: null,
+ commits: null,
+ _commits: function() {
+ if (!this.group)
+ return undefined;
+ return this.group.commitList(this.commits);
+ },
+ ready: function() {
+
+ function fromPercent(v) {
+ return Number(v.substring(0, v.length - 1));
+ }
+
+ var dataTable = google.visualization.arrayToDataTable([
+ ['', 'Median', 'Max'],
+ ['percent of builds', fromPercent(this.group.data.percent_over_median_slo), fromPercent(this.group.data.percent_over_max_slo)]
+ ]);
+
+ var options = {
+ title: 'cycle times over SLO',
+ vAxis: {minValue: 0},
+ series: [{color: 'orange'}, {color: 'red'}]
+ };
+
+ var chart = new google.visualization.ColumnChart(this.$.chart);
+ chart.draw(dataTable, options);
+ },
+ });
+ </script>
+</polymer-element>
+
+

Powered by Google App Engine
This is Rietveld 408576698