mirror of https://github.com/statping/statping
js updates
parent
8bc58a842b
commit
31b9fe4b9f
|
@ -2,10 +2,7 @@ os:
|
||||||
- linux
|
- linux
|
||||||
|
|
||||||
language: go
|
language: go
|
||||||
|
go: 1.11.x
|
||||||
go:
|
|
||||||
- "1.11.1"
|
|
||||||
|
|
||||||
go_import_path: github.com/hunterlong/statping
|
go_import_path: github.com/hunterlong/statping
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
|
|
@ -111,32 +111,7 @@ let options = {
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "Response Time",
|
name: "Response Time",
|
||||||
data: [
|
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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
xaxis: {
|
xaxis: {
|
||||||
|
@ -152,10 +127,12 @@ const startOn = UTCTime() - (86400 * 14);
|
||||||
|
|
||||||
async function RenderCharts() {
|
async function RenderCharts() {
|
||||||
{{ range .Services }}
|
{{ 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 }}
|
let chart{{.Id}} = new ApexCharts(document.querySelector("#service_{{js .Id}}"), options);
|
||||||
await RenderChart(chart{{js .Id}}, {{js .Id}}, startOn);{{end}}
|
|
||||||
|
await RenderChart(chart{{js .Id}}, {{js .Id}}, startOn);{{end}}
|
||||||
}
|
}
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
|
|
@ -303,6 +303,8 @@ async function RenderHeatmap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function RenderChartLatency() {
|
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);
|
let chart = new ApexCharts(document.querySelector("#service"), options);
|
||||||
await RenderChart(chart,{{$s.Id}},{{.StartUnix}},{{.EndUnix}},"hour");
|
await RenderChart(chart,{{$s.Id}},{{.StartUnix}},{{.EndUnix}},"hour");
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue