JS chart load issue fixed

pull/130/head
hunterlong 2019-01-17 01:24:44 -08:00
parent 3b014eb891
commit 46fd58888f
3 changed files with 6 additions and 4 deletions

View File

@ -111,13 +111,15 @@ $('select#service_type').on('change', function() {
}
});
function AjaxChart(chart, service, start=0, end=9999999999, group="hour") {
function AjaxChart(chart, service, start=0, end=9999999999, group="hour", retry=true) {
$.ajax({
url: "/api/services/"+service+"/data?start="+start+"&end="+end+"&group="+group,
type: 'GET',
success: function(data) {
if (data.data.length < 12) {
AjaxChart(chart, service, 0, 9999999999, "second")
if (retry) {
AjaxChart(chart, service, 0, 9999999999, "second", false);
}
return;
} else if (data.data.length === 0) {
return;

View File

@ -1,6 +1,6 @@
// Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at
// 2019-01-16 20:48:58.36586 -0800 PST m=+0.534954367
// 2019-01-17 01:23:49.15263 -0800 PST m=+0.644968431
//
// This contains the most recently Markdown source for the Statping Wiki.
package source

View File

@ -1 +1 @@
0.80.37
0.80.38