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

Side by Side Diff: appengine/findit/templates/try_job_dashboard.html

Issue 2259513003: [Findit] Display last build bucket response to try job dashboard (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <title>Try Job Dashboard</title> 3 <title>Try Job Dashboard</title>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <link rel="stylesheet" href="/common.css"> 5 <link rel="stylesheet" href="/common.css">
6 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1. 11.1/themes/smoothness/jquery-ui.css">
6 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script> 7 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script>
8 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.m in.js"></script>
7 <script> 9 <script>
8 function createUrl(parameters) { 10 function createUrl(parameters) {
9 var params = []; 11 var params = [];
10 for (var key in parameters) { 12 for (var key in parameters) {
11 if (parameters[key] != undefined) { 13 if (parameters[key] != undefined) {
12 params.push(key + '=' + parameters[key]) 14 params.push(key + '=' + parameters[key])
13 } 15 }
14 } 16 }
15 17
16 if (params.length == 0) { 18 if (params.length == 0) {
17 return 'try-job-dashboard'; 19 return 'try-job-dashboard';
18 } else { 20 } else {
19 return 'try-job-dashboard?' + params.join('&'); 21 return 'try-job-dashboard?' + params.join('&');
20 } 22 }
21 }; 23 };
22 24
23 function requestDataBetweenDateRange(e) { 25 function requestDataBetweenDateRange(e) {
24 var parameters = {} 26 var parameters = {}
25 parameters['start_date'] = $('#start_date').val() == 'mm/dd/yyyy' ? undefi ned : $('#start_date').val(); 27 parameters['start_date'] = $('#start_date').val() == 'mm/dd/yyyy' ? undefi ned : $('#start_date').val();
26 parameters['end_date'] = $('#end_date').val() == 'mm/dd/yyyy' ? undefined : $('#end_date').val(); 28 parameters['end_date'] = $('#end_date').val() == 'mm/dd/yyyy' ? undefined : $('#end_date').val();
27 newUrl = createUrl(parameters); 29 newUrl = createUrl(parameters);
28 window.location.replace(newUrl); 30 window.location.replace(newUrl);
29 e.preventDefault(); 31 e.preventDefault();
30 }; 32 };
31 33
32 $(document).ready(function() { 34 $(document).ready(function() {
35 $('#buildbucket-response-dialog').dialog({
36 autoOpen: false,
37 modal: true,
38 width: 1200,
39 });
40 $('.show-response').each(function() {
41 $(this).click(function() {
42 var lastBuildbucketResponseText = $(this).attr('data-text');
43 $('#buildbucket-response-dialog').text(lastBuildbucketResponseText);
stgao 2016/08/18 16:52:03 Now the text is a raw string, should we use JSON.s
lijeffrey 2016/08/18 23:59:14 Done.
44 $('#buildbucket-response-dialog').dialog('open');
45 })
46 });
33 $('#submit').click(requestDataBetweenDateRange); 47 $('#submit').click(requestDataBetweenDateRange);
34 }); 48 });
49
35 </script> 50 </script>
36 </head> 51 </head>
37 <body> 52 <body>
38 <form> 53 <form>
39 Start Date 54 Start Date
40 <input type="date" id="start_date" value={{ start_date }}></input> 55 <input type="date" id="start_date" value={{ start_date }}></input>
41 End Date 56 End Date
42 <input type="date" id="end_date" value={{ end_date }}></input> 57 <input type="date" id="end_date" value={{ end_date }}></input>
43 <input type="submit" id="submit"></input> 58 <input type="submit" id="submit"></input>
44 </form> 59 </form>
45 <br> 60 <br>
46 <b>In progress</b> 61 <b>In progress</b>
47 <div> 62 <div>
48 {% if try_jobs_in_progress %} 63 {% if try_jobs_in_progress %}
49 <table> 64 <table>
50 <tr> 65 <tr>
51 <th>Master</th> 66 <th>Master</th>
52 <th>Builder</th> 67 <th>Builder</th>
53 <th>Build #</th> 68 <th>Build #</th>
54 <th>Try Job Type</th> 69 <th>Try Job Type</th>
55 <th>Request Time</th> 70 <th>Request Time</th>
56 <th>Pending Time</th> 71 <th>Pending Time</th>
57 <th>Elapsed Time</th> 72 <th>Elapsed Time</th>
58 <th>Status</th> 73 <th>Status</th>
59 <th>Try Job URL</th> 74 <th>Try Job URL</th>
75 <th>Last Buildbucket Response</th>
60 </tr> 76 </tr>
61 <tbody> 77 <tbody>
62 {% for try_job_display_data in try_jobs_in_progress %} 78 {% for try_job_display_data in try_jobs_in_progress %}
63 <tr> 79 <tr>
64 <td>{{ try_job_display_data.master_name }}</td> 80 <td>{{ try_job_display_data.master_name }}</td>
65 <td>{{ try_job_display_data.builder_name }}</td> 81 <td>{{ try_job_display_data.builder_name }}</td>
66 <td> 82 <td>
67 {% if try_job_display_data.build_number %} 83 {% if try_job_display_data.build_number %}
68 <a href="/waterfall/build-failure?url=https://build.chromium. org/p 84 <a href="/waterfall/build-failure?url=https://build.chromium. org/p
69 /{{try_job_display_data.master_name}}/builders/{{try_job_display_data.builder_na me}} 85 /{{try_job_display_data.master_name}}/builders/{{try_job_display_data.builder_na me}}
70 /builds/{{try_job_display_data.build_number}}" target="_blank">{{try_job_display _data.build_number}} 86 /builds/{{try_job_display_data.build_number}}" target="_blank">{{try_job_display _data.build_number}}
71 </a> 87 </a>
72 {% endif %} 88 {% endif %}
73 </td> 89 </td>
74 <td>{{ try_job_display_data.try_job_type }}</td> 90 <td>{{ try_job_display_data.try_job_type }}</td>
75 <td>{{ try_job_display_data.request_time }}</td> 91 <td>{{ try_job_display_data.request_time }}</td>
76 <td>{{ try_job_display_data.pending_time }}</td> 92 <td>{{ try_job_display_data.pending_time }}</td>
77 <td>{{ try_job_display_data.elapsed_time }}</td> 93 <td>{{ try_job_display_data.elapsed_time }}</td>
78 <td>{{ try_job_display_data.status }}</td> 94 <td>{{ try_job_display_data.status }}</td>
79 <td> 95 <td>
80 {% if try_job_display_data.try_job_url %} 96 {% if try_job_display_data.try_job_url %}
81 <a href="{{ try_job_display_data.try_job_url }}" target="_blan k">link</a> 97 <a href="{{ try_job_display_data.try_job_url }}" target="_blan k">link</a>
82 {% endif %} 98 {% endif %}
83 </td> 99 </td>
100 <td>
101 <button class="show-response" id="in_progress_response_{{ loop.i ndex }}" data-text="{{ try_job_display_data.last_buildbucket_response }}">show</ button>
102 </td>
84 </tr> 103 </tr>
85 {% endfor %} 104 {% endfor %}
86 </tbody> 105 </tbody>
87 </table> 106 </table>
88 {% else %} 107 {% else %}
89 No try-jobs currently in progress withinin the date range requested 108 No try-jobs currently in progress withinin the date range requested
90 {% endif %} 109 {% endif %}
91 </div> 110 </div>
92 <br> 111 <br>
93 <b>Try jobs with error</b> 112 <b>Try jobs with error</b>
94 <div> 113 <div>
95 {% if try_jobs_with_error %} 114 {% if try_jobs_with_error %}
96 <table> 115 <table>
97 <tr> 116 <tr>
98 <th>Master</th> 117 <th>Master</th>
99 <th>Builder</th> 118 <th>Builder</th>
100 <th>Build #</th> 119 <th>Build #</th>
101 <th>Try Job Type</th> 120 <th>Try Job Type</th>
102 <th>Request Time</th> 121 <th>Request Time</th>
103 <th>Pending Time</th> 122 <th>Pending Time</th>
104 <th>Execution Time</th> 123 <th>Execution Time</th>
105 <th>Error Message</th> 124 <th>Error Message</th>
106 <th>Try Job URL</th> 125 <th>Try Job URL</th>
126 <th>Last Buildbucket Response</th>
107 </tr> 127 </tr>
108 <tbody> 128 <tbody>
109 {% for try_job_display_data in try_jobs_with_error %} 129 {% for try_job_display_data in try_jobs_with_error %}
110 <tr> 130 <tr>
111 <td>{{ try_job_display_data.master_name }}</td> 131 <td>{{ try_job_display_data.master_name }}</td>
112 <td>{{ try_job_display_data.builder_name }}</td> 132 <td>{{ try_job_display_data.builder_name }}</td>
113 <td> 133 <td>
114 {% if try_job_display_data.build_number %} 134 {% if try_job_display_data.build_number %}
115 <a href="/waterfall/build-failure?url=https://build.chromium. org/p 135 <a href="/waterfall/build-failure?url=https://build.chromium. org/p
116 /{{try_job_display_data.master_name}}/builders/{{try_job_display_data.builder_na me}} 136 /{{try_job_display_data.master_name}}/builders/{{try_job_display_data.builder_na me}}
117 /builds/{{try_job_display_data.build_number}}" target="_blank">{{try_job_display _data.build_number}} 137 /builds/{{try_job_display_data.build_number}}" target="_blank">{{try_job_display _data.build_number}}
118 </a> 138 </a>
119 {% endif %} 139 {% endif %}
120 </td> 140 </td>
121 <td>{{ try_job_display_data.try_job_type }}</td> 141 <td>{{ try_job_display_data.try_job_type }}</td>
122 <td>{{ try_job_display_data.request_time }}</td> 142 <td>{{ try_job_display_data.request_time }}</td>
123 <td>{{ try_job_display_data.pending_time }}</td> 143 <td>{{ try_job_display_data.pending_time }}</td>
124 <td>{{ try_job_display_data.execution_time }}</td> 144 <td>{{ try_job_display_data.execution_time }}</td>
125 <td>{{ try_job_display_data.error }}</td> 145 <td>{{ try_job_display_data.error }}</td>
126 <td> 146 <td>
127 {% if try_job_display_data.try_job_url %} 147 {% if try_job_display_data.try_job_url %}
128 <a href="{{ try_job_display_data.try_job_url }}" target="_blan k">link</a> 148 <a href="{{ try_job_display_data.try_job_url }}" target="_blan k">link</a>
129 {% endif %} 149 {% endif %}
130 </td> 150 </td>
151 <td>
152 <button class="show-response" id="error_response_{{ loop.index } }" data-text="{{ try_job_display_data.last_buildbucket_response }}">show</button >
153 </td>
131 </tr> 154 </tr>
132 {% endfor %} 155 {% endfor %}
133 </tbody> 156 </tbody>
134 </table> 157 </table>
135 {% else %} 158 {% else %}
136 No try-jobs were detected to have errors within the date range requested 159 No try-jobs were detected to have errors within the date range requested
137 {% endif %} 160 {% endif %}
138 </div> 161 </div>
139 <br> 162 <br>
140 <b>Completed</b> 163 <b>Completed</b>
141 <div> 164 <div>
142 {% if successfully_completed_try_jobs %} 165 {% if successfully_completed_try_jobs %}
143 <table> 166 <table>
144 <tr> 167 <tr>
145 <th>Master</th> 168 <th>Master</th>
146 <th>Builder</th> 169 <th>Builder</th>
147 <th>Build #</th> 170 <th>Build #</th>
148 <th>Try Job Type</th> 171 <th>Try Job Type</th>
149 <th>Request Time</th> 172 <th>Request Time</th>
150 <th>Pending Time</th> 173 <th>Pending Time</th>
151 <th>Execution Time</th> 174 <th>Execution Time</th>
152 <th>Culprit Found</th> 175 <th>Culprit Found</th>
153 <th>Try Job URL</th> 176 <th>Try Job URL</th>
177 <th>Last Buildbucket Response</th>
154 </tr> 178 </tr>
155 <tbody> 179 <tbody>
156 {% for try_job_display_data in successfully_completed_try_jobs %} 180 {% for try_job_display_data in successfully_completed_try_jobs %}
157 <tr> 181 <tr>
158 <td>{{ try_job_display_data.master_name }}</td> 182 <td>{{ try_job_display_data.master_name }}</td>
159 <td>{{ try_job_display_data.builder_name }}</td> 183 <td>{{ try_job_display_data.builder_name }}</td>
160 <td> 184 <td>
161 {% if try_job_display_data.build_number %} 185 {% if try_job_display_data.build_number %}
162 <a href="/waterfall/build-failure?url=https://build.chromium. org/p 186 <a href="/waterfall/build-failure?url=https://build.chromium. org/p
163 /{{try_job_display_data.master_name}}/builders/{{try_job_display_data.builder_na me}} 187 /{{try_job_display_data.master_name}}/builders/{{try_job_display_data.builder_na me}}
164 /builds/{{try_job_display_data.build_number}}" target="_blank">{{try_job_display _data.build_number}} 188 /builds/{{try_job_display_data.build_number}}" target="_blank">{{try_job_display _data.build_number}}
165 </a> 189 </a>
166 {% endif %} 190 {% endif %}
167 </td> 191 </td>
168 <td>{{ try_job_display_data.try_job_type }}</td> 192 <td>{{ try_job_display_data.try_job_type }}</td>
169 <td>{{ try_job_display_data.request_time }}</td> 193 <td>{{ try_job_display_data.request_time }}</td>
170 <td>{{ try_job_display_data.pending_time }}</td> 194 <td>{{ try_job_display_data.pending_time }}</td>
171 <td>{{ try_job_display_data.execution_time }}</td> 195 <td>{{ try_job_display_data.execution_time }}</td>
172 <td>{{ try_job_display_data.culprit_found }}</td> 196 <td>{{ try_job_display_data.culprit_found }}</td>
173 <td> 197 <td>
174 {% if try_job_display_data.try_job_url %} 198 {% if try_job_display_data.try_job_url %}
175 <a href="{{ try_job_display_data.try_job_url }}" target="_blan k">link</a> 199 <a href="{{ try_job_display_data.try_job_url }}" target="_blan k">link</a>
176 {% endif %} 200 {% endif %}
177 </td> 201 </td>
202 <td>
203 <button class="show-response" id="completed_response_{{ loop.ind ex }}" data-text="{{ try_job_display_data.last_buildbucket_response }}">show</bu tton>
chanli 2016/08/17 21:17:38 It seems the tables share most of the columns, so
lijeffrey 2016/08/18 23:59:14 That would require this entire file be rewritten,
204 </td>
178 </tr> 205 </tr>
179 {% endfor %} 206 {% endfor %}
180 </tbody> 207 </tbody>
181 </table> 208 </table>
182 {% else %} 209 {% else %}
183 No try-jobs have completed within the time range requested 210 No try-jobs have completed within the time range requested
184 {% endif %} 211 {% endif %}
185 </div> 212 </div>
213 <div id="buildbucket-response-dialog" title="Buildbucket response"></div>
186 </body> 214 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698