109 lines
3.3 KiB
Plaintext
109 lines
3.3 KiB
Plaintext
{{ define "headertpl"}}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
<title>{{.Title}}</title>
|
|
<script>
|
|
|
|
var currentType = "statsusername";
|
|
var currentTime = {{.CurrentTime}};
|
|
var strSplit, currentYear, currentMonth, currentDay;
|
|
updateSplits(currentTime);
|
|
|
|
function updateSplits(c){
|
|
strSplit = c.split('-');
|
|
currentYear = strSplit[0];
|
|
currentMonth = strSplit[1];
|
|
currentDay = strSplit[2];
|
|
}
|
|
</script>
|
|
<script src="load.js"></script>
|
|
<style>
|
|
|
|
body {
|
|
display: grid;
|
|
grid-template-columns: 75px 120px 1fr;
|
|
grid-template-rows: 25px 25px auto;
|
|
grid-gap: 5px;
|
|
}
|
|
label {
|
|
grid-column: 1;
|
|
}
|
|
select {
|
|
grid-column: 2;
|
|
}
|
|
input {
|
|
grid-column: 2;
|
|
}
|
|
div {
|
|
grid-column: 3;
|
|
grid-column-start: 3;
|
|
grid-column-end: 4;
|
|
grid-row-start: 1;
|
|
grid-row-end: 3;
|
|
}
|
|
</style>
|
|
</head>
|
|
{{end}}
|
|
|
|
|
|
{{ define "footertpl"}}
|
|
<div id="imageholder"></div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|
|
|
|
{{ define "dailytpl"}}
|
|
<body onload="loadImage(currentYear+currentMonth+currentDay, currentType)">
|
|
<label for="statsday">Day: </label>
|
|
<input id="statsday" type="date" value="{{.CurrentTime}}" min="{{.MinDate}}" max="{{.MaxDate}}" onchange="updateSplits(this.value); loadImage(currentYear+currentMonth+currentDay, currentType)"/>
|
|
<label for="statstype">Type: </label>
|
|
<select selected="statsusername" onchange="currentType = this.value; loadImage(currentYear+currentMonth+currentDay, currentType)">
|
|
<option value="statsusername">Usernames</option>
|
|
<option value="statssrc">Sources</option>
|
|
<option value="statshost">Hosts</option>
|
|
</select>
|
|
{{end}}
|
|
|
|
{{ define "yearlytpl"}}
|
|
<body onload="loadImage(currentYear, currentType)">
|
|
<label>Year: </label>
|
|
<select onchange="currentYear = this.value; loadImage(currentYear, currentType)">
|
|
{{range $val := .YearList}}
|
|
<option value="{{$val}}">{{$val}}</option>
|
|
{{end}}
|
|
</select>
|
|
<label>Type: </label>
|
|
<select selected="statsusername" onchange="currentType = this.value; loadImage(currentYear, currentType)">
|
|
<option value="statsusername">Usernames</option>
|
|
<option value="statssrc">Sources</option>
|
|
<option value="statshost">Hosts</option>
|
|
</select>
|
|
{{end}}
|
|
|
|
{{ define "monthlytpl"}}
|
|
<body onload="loadImage(currentYear+currentMonth, currentType)">
|
|
<label>Month: </label>
|
|
<select onchange="currentMonth = this.value; loadImage(currentYear+currentMonth, currentType)">
|
|
{{range $key, $val := .MonthList}}
|
|
{{range $month := index $val}}
|
|
<option value="{{$month}}">{{$month}}</option>
|
|
{{end}}
|
|
{{end}}
|
|
</select>
|
|
<label>Year: </label>
|
|
<select onchange="currentYear = this.value; loadImage(currentYear+currentMonth, currentType)">
|
|
{{range $key, $val := .MonthList}}
|
|
<option value="{{$key}}">{{$key}}</option>
|
|
{{end}}
|
|
</select>
|
|
<label for="statstype">Type: </label>
|
|
<select selected="statsusername" onchange="currentType = this.value; loadImage(currentYear+currentMonth, currentType)">
|
|
<option value="statsusername">Usernames</option>
|
|
<option value="statssrc">Sources</option>
|
|
<option value="statshost">Hosts</option>
|
|
</select>
|
|
{{end}}
|
|
'' |