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

Unified Diff: appengine/swarming/elements/res/imp/botpage/bot-page-data.html

Issue 2338383002: Refactor prior to adding task-page (Closed) Base URL: git@github.com:luci/luci-py@master
Patch Set: Address nits Created 4 years, 3 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
Index: appengine/swarming/elements/res/imp/botpage/bot-page-data.html
diff --git a/appengine/swarming/elements/res/imp/botpage/bot-page-data.html b/appengine/swarming/elements/res/imp/botpage/bot-page-data.html
index b333d1b5dda5eaa726af1108f3226948f3689529..8f03b9154430e108ee096e0a88ed670423edfc66 100644
--- a/appengine/swarming/elements/res/imp/botpage/bot-page-data.html
+++ b/appengine/swarming/elements/res/imp/botpage/bot-page-data.html
@@ -12,9 +12,14 @@
that data into usable data structures.
Properties:
- busy: Boolean, if we are fetching any data from the server.
+ // input
+ auth_headers: Object, the OAuth2 header to include in the request. This
+ should come from swarming-app.
+ bot_id: String, the id of the bot to fetch data on.
+ // output
bot: Object, The information about the bot. See swarming_rpcs.py#BotInfo
for all relevent fields.
+ busy: Boolean, if we are fetching any data from the server.
events: Array<Object>, The most recent events that pertain to this bot.
Contains the following fields: "event_type", "message", "ts" (timestamp),
"quarantined", "version".
@@ -227,7 +232,7 @@
});
if (task.duration) {
- task.human_duration = sk.human.strDuration(task.duration) || "0s";
+ task.human_duration = this._humanDuration(task.duration);
} else {
var end = task.completed_ts || task.abandoned_ts || task.modified_ts || new Date();
task.human_duration = this._timeDiffExact(task.started_ts, end);

Powered by Google App Engine
This is Rietveld 408576698