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

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

Issue 2912393002: Add cost to task page (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/ui/build/elements.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ff3b320b5e94925a7133e997f32d3e6dc01ba489..3a042a58ffc650bd456cca1c0c39751762de6912 100644
--- a/appengine/swarming/ui/res/imp/taskpage/task-page.html
+++ b/appengine/swarming/ui/res/imp/taskpage/task-page.html
@@ -491,6 +491,10 @@
<td class$="[[_internalClass(_result.internal_failure)]]">[[_result.internal_failure]]</td>
</tr>
<tr>
+ <td>Cost (USD)</td>
+ <td>$[[_cost(_result)]]</td>
+ </tr>
+ <tr>
<td>Isolated Outputs</td>
<td>
<a href$="[[_isolateLink(_result.outputs_ref)]]">
@@ -801,6 +805,13 @@
return args.join(" ");
},
+ _cost: function(result) {
+ if (!result || !result.costs_usd || !result.costs_usd.length) {
+ return 0;
+ }
+ return result.costs_usd[0].toFixed(4);
+ },
+
_disambiguate: function(taskId, result) {
if (!taskId.endsWith("0") || !result) {
return false;
« no previous file with comments | « appengine/swarming/ui/build/elements.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698