Chromium Code Reviews| 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 3a042a58ffc650bd456cca1c0c39751762de6912..f59019c4e2afaf0dc3955d7520437025373d83fd 100644 |
| --- a/appengine/swarming/ui/res/imp/taskpage/task-page.html |
| +++ b/appengine/swarming/ui/res/imp/taskpage/task-page.html |
| @@ -32,6 +32,7 @@ |
| <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html"> |
| <link rel="import" href="/res/imp/bower_components/paper-tabs/paper-tabs.html"> |
| <link rel="import" href="/res/imp/bower_components/polymer/polymer.html"> |
| +<link rel="import" href="/res/imp/bower_components/svg-piechart/svg-piechart.html"> |
| <link rel="import" href="/res/imp/common/common-behavior.html"> |
| <link rel="import" href="/res/imp/common/interval-timer.html"> |
| @@ -236,38 +237,6 @@ |
| quarantined) |
| </td> |
| </tr> |
| - <tr> |
| - <td>Created</td> |
| - <td title$="[[_request.created_ts]]">[[_request.human_created_ts]]</td> |
| - </tr> |
| - <template is="dom-if" if="[[_wasPickedUp(_result)]]"> |
| - <tr> |
| - <td>Started</td> |
| - <td title$="[[_result.started_ts]]">[[_result.human_started_ts]]</td> |
| - </tr> |
| - </template> |
| - <template is="dom-if" if="[[_wasNotPickedUp(_result)]]"> |
| - <tr> |
| - <td>Expires</td> |
| - <td>[[_expires(_request)]]</td> |
| - </tr> |
| - </template> |
| - <template is="dom-if" if="[[_result.human_completed_ts]]"> |
| - <tr> |
| - <td>Completed</td> |
| - <td title$="[[_result.completed_ts]]">[[_result.human_completed_ts]]</td> |
| - </tr> |
| - </template> |
| - <template is="dom-if" if="[[_result.human_abandoned_ts]]"> |
| - <tr> |
| - <td>Abandoned</td> |
| - <td title$="[[_result.abandoned_ts]]">[[_result.human_abandoned_ts]]</td> |
| - </tr> |
| - </template> |
| - <tr> |
| - <td>Last Updated</td> |
| - <td title$="[[_result.modified_ts]]">[[_result.human_modified_ts]]</td> |
| - </tr> |
| <template is="dom-if" if="[[_result.deduped_from]]"> |
| <tr> |
| <td><b>Deduped from</b></td> |
| @@ -278,14 +247,6 @@ |
| </td> |
| </tr> |
| </template> |
| - <tr> |
| - <td>Pending Time</td> |
| - <td>[[_pending(_result)]]</td> |
| - </tr> |
| - <tr> |
| - <td>Duration</td> |
| - <td>[[_result.human_duration]]</td> |
| - </tr> |
| <tr> |
| <td>Priority</td> |
| <td>[[_request.priority]]</td> |
| @@ -456,6 +417,66 @@ |
| </tbody> |
| </table> |
| + <div class="title" hidden$="[[_not(_task_exists)]]">Task Timing Information</div> |
| + <div class="horizontal layout wrap"> |
| + <div class="left flex"> |
| + <table class="task-info" hidden$="[[_not(_task_exists)]]"> |
| + <tbody> |
| + <tr> |
| + <td>Created</td> |
| + <td title$="[[_request.created_ts]]">[[_request.human_created_ts]]</td> |
| + </tr> |
| + <template is="dom-if" if="[[_wasPickedUp(_result)]]"> |
| + <tr> |
| + <td>Started</td> |
| + <td title$="[[_result.started_ts]]">[[_result.human_started_ts]]</td> |
| + </tr> |
| + </template> |
| + <template is="dom-if" if="[[_wasNotPickedUp(_result)]]"> |
| + <tr> |
| + <td>Expires</td> |
| + <td>[[_expires(_request)]]</td> |
| + </tr> |
| + </template> |
| + <template is="dom-if" if="[[_result.human_completed_ts]]"> |
| + <tr> |
| + <td>Completed</td> |
| + <td title$="[[_result.completed_ts]]">[[_result.human_completed_ts]]</td> |
| + </tr> |
| + </template> |
| + <template is="dom-if" if="[[_result.human_abandoned_ts]]"> |
| + <tr> |
| + <td>Abandoned</td> |
| + <td title$="[[_result.abandoned_ts]]">[[_result.human_abandoned_ts]]</td> |
| + </tr> |
| + </template> |
| + <tr> |
| + <td>Last updated</td> |
| + <td title$="[[_result.modified_ts]]">[[_result.human_modified_ts]]</td> |
| + </tr> |
| + <tr> |
| + <td>Pending Time</td> |
| + <td>[[_pending(_result)]]</td> |
|
Sergey Berezin
2017/06/06 18:29:08
Let's also add the corresponding color to pending
ayanaadylova
2017/06/06 18:57:55
Done.
|
| + </tr> |
| + <tr> |
| + <td>Duration</td> |
| + <td>[[_result.human_duration]]</td> |
| + </tr> |
| + </tbody> |
| + </table> |
| + </div> |
| + <div class="right flex"> |
| + <template is="dom-if" if="[[_result.human_completed_ts]]"> |
| + <center> |
| + <svg-piechart |
| + data="[[_computePiechartData(_result)]]" |
| + colors="["rgb(238,135,136)", "rgb(30,120,180)"]"> |
| + </svg-piechart> |
| + </center> |
| + </template> |
| + </div> |
| + </div> |
| + |
| <div class="title" hidden$="[[_not(_task_exists)]]">Task Execution</div> |
| <template is="dom-if" if="[[_wasPickedUp(_result)]]"> |
| <table hidden$="[[_not(_task_exists)]]"> |
| @@ -674,6 +695,7 @@ |
| type: Boolean, |
| value: false, |
| }, |
| + |
| _dialog_prompt: { |
| type: String, |
| value: "", |
| @@ -805,6 +827,15 @@ |
| return args.join(" "); |
| }, |
| + _computePiechartData: function(result) { |
| + var created = new Date(result.created_ts); |
| + var started = new Date(result.started_ts); |
| + var completed = new Date(result.completed_ts); |
| + return [ |
| + this._duration(created, started), |
| + this._duration(started, completed)]; |
| + }, |
| + |
| _cost: function(result) { |
| if (!result || !result.costs_usd || !result.costs_usd.length) { |
| return 0; |
| @@ -819,6 +850,10 @@ |
| return result.try_number > 1; |
| }, |
| + _duration: function(start, end) { |
| + return end.getTime() - start.getTime(); |
| + }, |
| + |
| _empty: function(array) { |
| return !array || array.length == 0; |
| }, |