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

Side by Side Diff: templates/viewer_base.html

Issue 13892003: Added buildbot appengine frontend for chromium-build app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-build
Patch Set: Review fixes Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>{% block title %}Build Log{% endblock %}</title>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="description" content="">
8 <meta name="author" content="">
9
10 <!-- Le styles -->
11 <script src="http://code.jquery.com/jquery.js"></script>
12 <script src="/static/js/bootstrap.min.js"></script>
13 <script src="/static/js/prettify.js"></script>
14 <style type="text/css">
15 body {
16 padding-top: 60px;
17 padding-bottom: 40px;
18 }
19 .sidebar-nav {
20 padding: 9px 0;
21 }
22
23 @media (max-width: 980px) {
24 /* Enable use of floated navbar text */
25 .navbar-text.pull-right {
26 float: none;
27 padding-left: 5px;
28 padding-right: 5px;
29 }
30 }
31
32 #branding {
33 margin-left: 0;
34 }
35
36 #beta {
37 position: relative;
38 top: -10px;
39 font-size: 11pt;
40 }
41 </style>
42 <link href="/static/css/bootstrap.min.css" rel="stylesheet">
43 <link href="/static/css/bootstrap-responsive.css" rel="stylesheet">
44 {% block head %}{% endblock %}
45 </head>
46 <body>
47 <div class="navbar navbar-fixed-top">
48 <div class="navbar-inner">
49 <ul class="nav pull-right">
50 <li><a id="orig_page" href="{{url}}">Original Page</a></li>
51 </ul>
52 <div id='navbar-container' class="container-fluid">
53 <button type="button" class="btn btn-navbar"
54 data-toggle="collapse" data-target=".nav-collapse">
55 <span class="icon-bar"></span>
56 <span class="icon-bar"></span>
57 <span class="icon-bar"></span>
58 </button>
59 <a id="branding" class="brand" href="/buildbot/">
60 Buildbot Viewer<small id='beta'>Beta</small>
61 </a>
62 <div class="nav-collapse collapse">
63 <ul class="nav">
64 {% for crumb, link in breadcrumbs %}
65 {% if loop.last %}
66 <li class="active">
67 {% else %}
68 <li>
69 {% endif %}
70 <a href="{{link}}">{{crumb}}</a>
71 </li>
72 {% endfor %}
73 </ul>
74 </div><!--/.nav-collapse -->
75 </div>
76 </div>
77 </div>
78 <div id="main-container" class="container-fluid">
79 {% block body %}{% endblock %}
80 {% block footer %}
81 <div class="row">
82 <hr>
83 <div class="span4">
84 {% block sub_footer %}{% endblock sub_footer %}
85 </div>
86 <div class="span2 pull-right">
87 <span class="pull-right">
88 <a href="https://code.google.com/p/chromium/issues/entry?template=Buil d%20Infrastructure&comment=This+is+a+user+reported+issue+with+the+new+build.chro mium.org+interface.&summary=One+liner+issue+description+here">
89 Report an issue
90 </a>
91 </span>
92 <img alt="Chrome" data-g-event="nav-logo" data-g-label=
93 "consumer-home" id="logo" src=
94 "http://www.google.com/intl/en/chrome/assets/common/images/chrome_logo _2x.png">
95 </div>
96 </div>
97 {% endblock %}
98 </div>
99 <script>
100 !function ($) {
101 $(function(){
102 window.prettyPrint && prettyPrint()
103 })
104 }(window.jQuery)
105
106 // Creates a new cookie.
107 function createCookie(name, value, day) {
108 var date = new Date();
109 date.setTime(date.getTime() + (day * 24 * 60 * 60 * 1000));
110 var expires = "; expires=" + date.toGMTString();
111 document.cookie = name + "=" + value+expires + "; path=/";
112 }
113
114 // Deletes a cookie.
115 function eraseCookie(name) {
116 createCookie(name, "", -1);
117 }
118
119 function update_time_ago_sec(text) {
120 $(".time_ago").each(function(){
121 console.log($(this).text());
122 text = $(this).text();
123 r_mins = /(\d+) min/;
124 r_secs = /(\d+) sec/;
125 m_mins = r_mins.exec(text);
126 m_secs = r_secs.exec(text);
127 if (m_secs) {
128 secs = parseInt(m_secs[1]);
129 } else {
130 return;
131 }
132 if (m_mins) {
133 mins = parseInt(m_mins[1]);
134 } else {
135 mins = 0;
136 }
137 secs += 1;
138 if (secs > 59) {
139 mins += 1;
140 secs = 0;
141 }
142 results = "";
143 if (mins) {
144 if (mins == 1) {
145 results += mins + " min ";
146 } else {
147 results += mins + " mins ";
148 }
149 }
150 if (secs == 1) {
151 results += secs + " sec ";
152 } else {
153 results += secs + " secs ";
154 }
155 results += "ago";
156 $(this).text(results);
157 });
158 }
159
160 function update_time_ago_min(text) {
161 $(".time_ago").each(function(){
162 console.log($(this).text());
163 text = $(this).text();
164 r_hrs = /(\d+) hr/;
165 r_mins = /(\d+) min/;
166 r_secs = /(\d+) sec/;
167 jrs = parseInt(r_hrs.exec(text)[1]);
168 mins = parseInt(r_mins.exec(text)[1]);
169 secs = parseInt(r_secs.exec(text)[1]);
170 if (secs) {
171 return;
172 }
173 mins += 1;
174 if (mins > 59) {
175 hrs += 1;
176 mins = 0;
177 }
178 results = "";
179 if (hrs) {
180 if (hrs == 1) {
181 results += hrs + " hr ";
182 } else {
183 results += hrs + " hrs ";
184 }
185 }
186 if (mins == 1) {
187 results += mins + " min ";
188 } else {
189 results += mins + " mins ";
190 }
191 results += "ago";
192 $(this).text(results);
193 });
194 }
195
196 $(document).ready(function(){
197 createCookie('new', true, 99999); // Default to the new page.
198 $("#orig_page").click(function(){
199 eraseCookie('new');
200 });
201
202 // Find .time_ago and makes them count down properly.
203 setInterval(update_time_ago_sec, 1000);
204 setInterval(update_time_ago_min, 60000);
205 });
206 </script>
207 </body>
208 </html>
OLDNEW
« templates/step.html ('K') | « templates/step.html ('k') | utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698