@cryptotaxi247 / netdata-1 / commits / 79bf1c91b

fix for NETDATA.ready() synchronization

Costa Tsaousis (ktsaou) committed Dec 30, 2015 at 07:14 UTC 79bf1c91b03c4dc75c13284c989091508c90ad8b
1 file changed +7 -8
web/index.html
+7 -8
@@ -253,7 +253,7 @@
253 <!-- <script> netdataServer = "http://box:19999"; </script> -->
254
255 <!-- load the dashboard manager - it will do the rest -->
256 - <script type="text/javascript" src="dashboard.js?v12"></script>
256 + <script type="text/javascript" src="dashboard.js?v14"></script>
257 </head>
258
259 <body data-spy="scroll" data-target="#sidebar">
@@ -1079,7 +1079,7 @@ function prepareScreen(data) {
1079 }, 1000);
1080 }
1081
1082 -NETDATA.ready(function() {
1082 +NETDATA.pause(function() {
1083
1084 $('#welcomeModal').on('hidden.bs.modal', function (e) {
1085 NETDATA.updatedDom();
@@ -1091,13 +1091,12 @@ NETDATA.ready(function() {
1091 // download all the charts the server knows
1092 NETDATA.chartRegistry.downloadAll(NETDATA.serverDefault, function(data) {
1093
1094 - // pause the NETDATA thread that updates the charts
1095 - NETDATA.pause(function() {
1094 + // prepare our DOM
1095 + // this will be called when NETDATA is paused
1096 + prepareScreen(data);
1097
1097 - // prepare our DOM
1098 - // this will be called when NETDATA is paused
1099 - prepareScreen(data);
1100 - });
1098 + // due to affix issues, prepareScreen() will unpause
1099 + // netdata as needed
1100 });
1101 });
1102