-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (106 loc) · 2.77 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
<title>Caseline - A timeline viewer</title>
<style>
body {
overflow: hidden;
}
#wrapper {
margin: 3px;
position: relative;
width: 90%;
}
#viewcontrols {
position: absolute;
}
#controls {
position: relative;
top: 32px;
}
#untilDiv {
float: right;
}
#timeControlsDiv {
position: absolute;
left: 300px;
margin: 0 0 0 13px;
overflow: visible;
}
#fromDiv {
float: left;
}
#timeline {
border-top: 1px solid grey;
position: relative;
top: 64px;
}
#filterhelp {
color: blue;
cursor: pointer;
text-decoration: underline;
}
#timelinebg {
position: absolute;
height: 80px;
z-index: -1;
top: 64px;
width: 100%;
}
</style>
</head>
<body>
<div id=wrapper>
<div id=viewcontrols>
<input type=button id=saveView value="Save current view"> |
Load a saved view: <select id=selectView></select>
(Or <input type=button id=deleteView value=delete> it) |
<input type=button value="Import events and stuff" id=parseLog> |
<span id=eventcount>0/0/0</span> displayed/filtered/total event count
</div>
<div id=controls>
<div id="fromDiv">
<input type=button id=scrollBack value=->
From: <input id=from value="25 Jun 00:00:00">
</div>
<div id="timeControlsDiv">
<input type=button id=showalltime value="Show all time">
Filter: <input id=filter size=30>
<input type=checkbox id=advfilter>adv(<a id=filterhelp>?</a>)
<input type=checkbox id=regexfilter checked=checked>regex
</div>
<div id="untilDiv">
Until: <input id=until value="30 Aug 00:00:00">
<input type=button id=scrollForward value=+>
</div>
</div>
<div id=timelinebg></div>
<div id=timeline></div>
</div>
<script src="lib.js"></script>
<script src="functions.js"></script>
<script src="events.js"></script>
<script>
var maxtime = 1000 * 5; // 5 seconds
// Estimated rendering time per event is 89ns (someone should double-check
// this because I almost don't believe how fast this is).
var displayRenderingTime = false;
var mindatetime = new Date(2015, 4, 1).getTime() / 1000; // Ignore events before...
var maxdatetime = new Date(2015, 11, 1).getTime() / 1000; // Ignore events after...
var events = JSON.parse(GET('api.php?getEvents'));
var views = [];
window.lastTimespan = -1;
var filteredEvents = [];
if (events.length == 0) {
alert("Error: no events found.");
}
$("from").value = unix2datestr(events[0].datetime - 1);
$("until").value = unix2datestr(events[events.length - 1].datetime + 1);
filterEvents();
updateEvents();
updateViewDropdown();
</script>
</body>
</html>