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

Unified Diff: appengine/swarming/ui/res/imp/taskpage/task-page.html

Issue 2497663003: Make silent task retries more obvious (Closed)
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/ui/res/imp/taskpage/task-page.html
diff --git a/appengine/swarming/ui/res/imp/taskpage/task-page.html b/appengine/swarming/ui/res/imp/taskpage/task-page.html
index 6493a507757ec76e26cf86ac369d1da6d94f70b1..ffe8c409564119fa11acf50e4eef87c8c65c7be9 100644
--- a/appengine/swarming/ui/res/imp/taskpage/task-page.html
+++ b/appengine/swarming/ui/res/imp/taskpage/task-page.html
@@ -41,6 +41,7 @@
<link rel="import" href="/res/imp/common/url-param.html">
<link rel="import" href="task-page-data.html">
+<link rel="import" href="task-disambiguation.html">
<dom-module id="task-page">
<template>
@@ -90,6 +91,9 @@
<url-param name="id"
value="{{task_id}}">
</url-param>
+ <url-param name="try_detail"
+ value="{{_try_detail}}">
+ </url-param>
<url-param name="request_detail"
value="{{_request_detail}}">
</url-param>
@@ -109,7 +113,7 @@
server_details="{{_server_details}}"
signed_in="{{_signed_in}}"
- busy="[[_busy]]"
+ busy="[[_or(_busy1,busy2)]]"
name="Swarming Task Page">
<h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2>
@@ -121,7 +125,7 @@
auth_headers="[[_auth_headers]]"
task_id="[[task_id]]"
- busy="{{_busy}}"
+ busy="{{_busy1}}"
request="{{_request}}"
result="{{_result}}"
stdout="{{_stdout}}"
@@ -141,6 +145,17 @@
</template>
</div>
<h2 hidden$="[[_task_exists]]">Task not found.</h2>
+
+ <template is="dom-if" if="[[_disambiguate(task_id,_result)]]">
+ <h2>Displaying a summary for a task with multiple tries</h2>
+ <task-disambiguation
+ busy="{{busy2}}"
+ auth_headers="[[_auth_headers]]"
+ task_id="[[task_id]]"
+ summary_result="[[_result]]">
+ </task-disambiguation>
+ </template>
+
<table hidden$="[[_not(_task_exists)]]">
<tr>
<td>Name</td>
@@ -148,7 +163,7 @@
</tr>
<tr>
<td>State</td>
- <td class$="[[_stateClass(_result)]]">[[_state(_result)]]</td>
+ <td class$="[[_stateClass(_result)]]">[[state(_result)]]</td>
</tr>
<tr>
<td>Created</td>
@@ -459,6 +474,9 @@
</div>
<template is="dom-if" if="[[_supportsMilo(_request,_show_raw)]]">
+ <div class="milo tabbed" hidden$="[[_isSummaryLink(task_id)]]">
+ Milo results are only generated for task summaires, that is, tasks whose ids end in 0. Tasks ending in 1 or 2 represent possible retries of tasks. See <a href="//goo.gl/LE4rwV">the docs</a> for more.
+ </div>
<iframe id="miloFrame" class="milo tabbed" src$="[[_getDisplayServerLink(_server_details.display_server_url_template,task_id)]]"></iframe>
</template>
<template is="dom-if" if="[[_show_raw]]">
@@ -587,6 +605,13 @@
return packages;
},
+ _disambiguate: function(taskId, result) {
+ if (!taskId.endsWith("0") || !result) {
+ return false;
+ }
+ return result.try_number > 1;
+ },
+
_expires: function(request) {
var delta = parseInt(request.expiration_secs);
if (delta) {
@@ -633,6 +658,10 @@
"&hash=" + ref.isolated;
},
+ _isSummaryLink: function(taskId) {
+ return taskId && taskId.endsWith(0);
+ },
+
_noMilo: function(result) {
return !this._tag(result, "allow_milo");
},
@@ -732,25 +761,7 @@
return !showRaw && request && this._tag(request, "allow_milo");
},
- _state: function(result) {
- if (!result) {
- return "";
- }
- if (result.state === this.COMPLETED) {
- if (result.failure) {
- return this.COMPLETED_FAILURE;
- }
- if (result.try_number === "0") {
- return this.COMPLETED_DEDUPED;
- }
- return this.COMPLETED_SUCCESS;
- }
- return result.state;
- },
- _stateClass: function(result) {
- return this.stateClass(this._state(result));
- },
_toggleDetails: function() {
this.set("_request_detail", !this._request_detail);

Powered by Google App Engine
This is Rietveld 408576698