mirror of https://github.com/statping/statping
js updates
parent
8bc58a842b
commit
31b9fe4b9f
|
@ -2,10 +2,7 @@ os:
|
|||
- linux
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- "1.11.1"
|
||||
|
||||
go: 1.11.x
|
||||
go_import_path: github.com/hunterlong/statping
|
||||
|
||||
cache:
|
||||
|
|
|
@ -111,32 +111,7 @@ let options = {
|
|||
series: [
|
||||
{
|
||||
name: "Response Time",
|
||||
data: [
|
||||
{
|
||||
x: "02-10-2017 GMT",
|
||||
y: 34
|
||||
},
|
||||
{
|
||||
x: "02-11-2017 GMT",
|
||||
y: 43
|
||||
},
|
||||
{
|
||||
x: "02-12-2017 GMT",
|
||||
y: 31
|
||||
},
|
||||
{
|
||||
x: "02-13-2017 GMT",
|
||||
y: 43
|
||||
},
|
||||
{
|
||||
x: "02-14-2017 GMT",
|
||||
y: 33
|
||||
},
|
||||
{
|
||||
x: "02-15-2017 GMT",
|
||||
y: 52
|
||||
}
|
||||
]
|
||||
data: [],
|
||||
}
|
||||
],
|
||||
xaxis: {
|
||||
|
@ -152,10 +127,12 @@ const startOn = UTCTime() - (86400 * 14);
|
|||
|
||||
async function RenderCharts() {
|
||||
{{ range .Services }}
|
||||
let chart{{.Id}} = new ApexCharts(document.querySelector("#service_{{js .Id}}"), options);{{end}}
|
||||
options.fill.colors = {{if .Online}}["#48d338"]{{else}}["#dd3545"]{{end}};
|
||||
options.stroke.colors = {{if .Online}}["#3aa82d"]{{else}}["#c23342"]{{end}};
|
||||
|
||||
{{ range .Services }}
|
||||
await RenderChart(chart{{js .Id}}, {{js .Id}}, startOn);{{end}}
|
||||
let chart{{.Id}} = new ApexCharts(document.querySelector("#service_{{js .Id}}"), options);
|
||||
|
||||
await RenderChart(chart{{js .Id}}, {{js .Id}}, startOn);{{end}}
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
|
|
@ -303,6 +303,8 @@ async function RenderHeatmap() {
|
|||
}
|
||||
|
||||
async function RenderChartLatency() {
|
||||
options.fill.colors = {{if $s.Online}}["#48d338"]{{else}}["#dd3545"]{{end}};
|
||||
options.stroke.colors = {{if $s.Online}}["#3aa82d"]{{else}}["#c23342"]{{end}};
|
||||
let chart = new ApexCharts(document.querySelector("#service"), options);
|
||||
await RenderChart(chart,{{$s.Id}},{{.StartUnix}},{{.EndUnix}},"hour");
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue