| 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>
|
|
|