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

Unified Diff: sksysmon/templates/index.html

Issue 1130673004: Add start, stop, restart buttons to sksysmon. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 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 | « sksysmon/res/imp/unitlist.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sksysmon/templates/index.html
diff --git a/sksysmon/templates/index.html b/sksysmon/templates/index.html
index 7762e8415b961c8d71f7033b2c6e5aee9c06ca97..051ee68efd0ea3944feee79cfaf5ae3fd01557bb 100644
--- a/sksysmon/templates/index.html
+++ b/sksysmon/templates/index.html
@@ -60,14 +60,19 @@
</scaffold-sk>
<script type="text/javascript" charset="utf-8">
- sk.WebComponentsReady.then(function(){
- sk.get("/_/list").then(JSON.parse).then(function(json) {
- $$$('unit-list-sk').units = json;
- }).catch(function(e){
- $$$('paper-toast').text = e;
- $$$('paper-toast').show();
- });
- });
+ (function() {
+ function loadData() {
+ sk.get("/_/list").then(JSON.parse).then(function(json) {
+ $$$('unit-list-sk').units = json;
+ }).catch(function(e){
+ $$$('paper-toast').text = e;
+ $$$('paper-toast').show();
+ });
+ }
+
+ sk.WebComponentsReady.then(loadData);
+ $$$('unit-list-sk').addEventListener('unit-updated', loadData);
+ })();
</script>
</body>
« no previous file with comments | « sksysmon/res/imp/unitlist.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698