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

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

Issue 2391583002: Several small changes to new UI pages (Closed) Base URL: git@github.com:luci/luci-py@uptime
Patch Set: rebase Created 4 years, 2 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/elements/res/imp/tasklist/task-list.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/elements/res/imp/taskpage/task-page.html
diff --git a/appengine/swarming/elements/res/imp/taskpage/task-page.html b/appengine/swarming/elements/res/imp/taskpage/task-page.html
index d7f2ca2fad100ed11a394f6cfb116c3882e617a8..facc4d2f88df2ed14d46ee665d3a53f9a033c481 100644
--- a/appengine/swarming/elements/res/imp/taskpage/task-page.html
+++ b/appengine/swarming/elements/res/imp/taskpage/task-page.html
@@ -118,7 +118,6 @@
<task-page-data
id="data"
auth_headers="[[_auth_headers]]"
- refresh_interval="[[_refresh_interval]]"
task_id="[[task_id]]"
busy="{{_busy}}"
@@ -428,6 +427,7 @@
class="refresh_input"
label="Refresh Interval (seconds)"
value="{{_refresh_interval}}"
+ title="How often to refresh all information about the task"
auto-validate
min="1"
max="1000"
@@ -457,7 +457,7 @@
<error-toast></error-toast>
- <interval-timer period="[[_refresh_interval]]" on-trigger="_refreshOutput">
+ <interval-timer period="[[_refresh_interval]]" on-trigger="_softRefresh">
</interval-timer>
</template>
@@ -651,20 +651,25 @@
this.$.data.reload();
},
- _refreshOutput: function() {
- this.$.data.reloadStdout();
- var miloFrame = this.$$("iframe")
- if (miloFrame) {
- miloFrame.src = this._getMiloLink(this.milo_prefix,this.task_id);
- }
- },
-
_requestUpdated: function(request) {
if (this._noMilo(request)) {
this.set("_show_raw", 1);
}
},
+ _softRefresh: function() {
+ if (this._result && this._result.state !== "RUNNING" &&
+ this._result.state !== "PENDING") {
+ console.log("Don't reload because not running");
+ return;
+ }
+ this.$.data.reload();
+ var miloFrame = this.$$("iframe")
+ if (miloFrame) {
+ miloFrame.src = this._getMiloLink(this.milo_prefix,this.task_id);
+ }
+ },
+
_retryTask: function() {
if (!this._request) {
sk.errorMessage("Task not yet loaded", 3000);
« no previous file with comments | « appengine/swarming/elements/res/imp/tasklist/task-list.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698