| 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>
|
| +
|
| +
|
|
|