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

Side by Side Diff: Tools/GardeningServer/ui/ct-last-updated.html

Issue 728023004: Remove GardeningServer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <polymer-element name="ct-last-updated" attributes="date">
8 <template>
9 <template if="{{ date }}">
10 <style>
11 .stale_5minutes {
12 color: orange;
13 }
14 .stale_10minutes {
15 color: red;
16 }
17 .stale_20minutes {
18 background-color: red;
19 color: black;
20 }
21 </style>
22 <span class="{{ date | _style }}">Updated @ {{ date | _hours }}:{{ date | _minutes }}</div>
23 </template>
24 </template>
25 <script>
26 (function() {
27 Polymer({
28 date: null,
29 _style: function(date) {
30 var staleness = date.minutesAgo();
31 if (staleness >= 20)
32 return "stale_20minutes";
33 if (staleness >= 10)
34 return "stale_10minutes";
35 if (staleness >= 5)
36 return "stale_5minutes";
37 return "";
38 },
39
40 _hours: function(date) {
41 return date.getHours();
42 },
43 _minutes: function(date) {
44 return date.getMinutes().toString().padLeft(2, '0');
45 },
46 });
47 })();
48
49 </script>
50 </polymer-element>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-failure-stream.html ('k') | Tools/GardeningServer/ui/ct-master-failure-card.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698