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

Unified Diff: Tools/GardeningServer/ui/ct-tree-status-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, 4 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-tree-status-card.html
diff --git a/Tools/GardeningServer/ui/ct-tree-status-card.html b/Tools/GardeningServer/ui/ct-tree-status-card.html
new file mode 100644
index 0000000000000000000000000000000000000000..56de845a3e77d39d33decd92be3771309124de10
--- /dev/null
+++ b/Tools/GardeningServer/ui/ct-tree-status-card.html
@@ -0,0 +1,59 @@
+<!--
+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-tree-status-card" attributes="group">
+ <template>
+ <style>
+ #failure {
+ flex: 1;
+ }
+
+ #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>
ojan 2014/09/02 02:35:11 This formatting is funky.
shans 2014/09/04 01:59:43 Acknowledged.
+ </template>
+ <script>
+ Polymer('ct-tree-status-card', {
ojan 2014/09/02 02:35:11 No need for the string name here. It's inferred fo
shans 2014/09/04 01:59:43 Done.
+ group: null,
+ commits: null,
+ _commits: function() {
+ if (!this.group)
+ return undefined;
+ return this.group.commitList(this.commits);
+ },
+ ready: function() {
+ var dataTable = google.visualization.arrayToDataTable([
+ ['', 'Minimum', 'Actual'],
+ ['Open', 80, this.group.data.percent_open]
+ ]);
+
+ var options = {
+ title: 'tree status',
+ vAxis: {minValue: 0},
+ series: [{color: 'grey'}, {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