-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtimeline.html
executable file
·234 lines (195 loc) · 8.43 KB
/
timeline.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SecurityPulse | Timeline </title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
<!-- Morris -->
<link href="css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
<!-- Gritter -->
<link href="js/plugins/gritter/jquery.gritter.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<nav class="navbar-default navbar-static-side" role="navigation">
<ul class="nav" id="side-menu">
<li>
<a href="dashboard_2.html#"><i class="fa fa-eye"></i> <span class="nav-label">Overview</span> </a>
</li>
<li>
<a href="map.html"><i class="fa fa-globe"></i> <span class="nav-label">Map</span></a>
</li>
<li class="side-active">
<a href="timeline.html"><i class="fa fa-line-chart"></i> <span class="nav-label">Timeline </span></a>
</li>
<li>
<a href="sunburst.html"><i class="fa fa-files-o"></i> <span class="nav-label">Sunburst</span> </a>
</li>
</ul>
</nav>
<div id="page-wrapper" class="gray-bg">
<div class="row border-bottom">
<nav class="navbar white-bg" role="navigation" style="margin-bottom: 0">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="dashboard_2.html">SecurityPulse</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="dashboard_2.html">Dashboard</a></li>
<li><a href="documentation.html">Documentation</a></li>
</ul>
</div>
</nav>
</div>
<div class="wrapper wrapper-content article">
<div class="row">
<div class="col-lg-12 col-lg-offset-1">
<div class="ibox">
<script src="http://d3js.org/d3.v2.js"></script>
<!--
using JQuery for element dimensions
This is a small aspect of this example so it can be removed fairly easily if needed.
-->
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="sample_data.js"></script>
<script src="line-graph.js"></script>
<link rel="stylesheet" href="css/style-timeline.css" type="text/css">
</head>
<body id="timeline">
<div class="row">
<div class="col-lg-11">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Attacks by Priority</h5>
<div class="pull-right">
<div class="btn-group" id='timeP'>
<button type="button" id="dayP" class="priority btn btn-xs btn-white">Past 24 Hours</button>
<button type="button" id="weekP" class="priority btn btn-xs btn-white">Past 7 Days</button>
<button type="button" id="monthP" class="priority btn btn-xs btn-white">Past 30 Days</button>
</div>
</div>
<div class="ibox-content" style="height:350px">
<div id="byPriority">
<div id="graphPriority" class="aGraph" style="float:left;position:relative;width:90%;height:260px"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-11">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Attacks by Defense City</h5>
<div class="pull-right">
<div class="btn-group" id='timeP'>
<button type="button" id="dayC" class="city btn btn-xs btn-white">Past 24 Hours</button>
<button type="button" id="weekC" class="city btn btn-xs btn-white">Past 7 Days</button>
<button type="button" id="monthC" class="city btn btn-xs btn-white">Past 30 Days</button>
</div>
</div>
<div class="ibox-content" style="height:350px">
<div id="byCity">
<div id="graphCity" class="aGraph" style="float:left;position:relative;width:90%;height:260px"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
/*
* If running inside bl.ocks.org we want to resize the iframe to fit both graphs
*/
if(parent.document.getElementsByTagName("iframe")[0]) {
parent.document.getElementsByTagName("iframe")[0].setAttribute('style', 'height: 650px !important');
}
var l1 = new LineGraph({containerId: 'graphPriority', data: dayP});
var l2 = new LineGraph({containerId: 'graphCity', data: dayC});
$(document).ready(function(){
$('#dayP').on('click', function(){
$('.priority').css('color','black');
$(this).css('color','blue');
$('.line-graph').eq(0).remove();
var l1 = new LineGraph({containerId: 'graphPriority', data: dayP});
});
$('#weekP').on('click', function(){
$('.priority').css('color','black');
$(this).css('color','blue');
$('.line-graph').eq(0).remove();
var l1 = new LineGraph({containerId: 'graphPriority', data: weekP});
});
$('#monthP').on('click', function(){
$('.priority').css('color','black');
$(this).css('color','blue');
$('.line-graph').eq(0).remove();
var l1 = new LineGraph({containerId: 'graphPriority', data: monthP});
});
$('#dayC').on('click', function(){
$('.city').css('color','black');
$(this).css('color','blue');
$('.line-graph').eq(1).remove();
var l2 = new LineGraph({containerId: 'graphCity', data: dayC});
});
$('#weekC').on('click', function(){
$('.city').css('color','black');
$(this).css('color','blue');
$('.line-graph').eq(1).remove();
var l2 = new LineGraph({containerId: 'graphCity', data: weekC});
});
$('#monthC').on('click', function(){
$('.city').css('color','black');
$(this).css('color','blue');
$('.line-graph').eq(1).remove();
var l2 = new LineGraph({containerId: 'graphCity', data: monthC});
});
});
</script>
</div>
</div>
</div>
</div>
<div class="footer text-center">
<div>
SecurityPulse © 2016
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Mainly scripts -->
<script src="js/jquery-2.1.1.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- Flot -->
<script src="js/plugins/flot/jquery.flot.js"></script>
<script src="js/plugins/flot/jquery.flot.tooltip.min.js"></script>
<script src="js/plugins/flot/jquery.flot.spline.js"></script>
<script src="js/plugins/flot/jquery.flot.resize.js"></script>
<script src="js/plugins/flot/jquery.flot.pie.js"></script>
<script src="js/plugins/flot/jquery.flot.symbol.js"></script>
<script src="js/plugins/flot/jquery.flot.time.js"></script>
<!-- Custom and plugin javascript -->
<script src="js/inspinia.js"></script>
<script src="js/plugins/pace/pace.min.js"></script>
<!-- jQuery UI -->
<script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- Jvectormap -->
<script src="js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- EayPIE -->
<script src="js/plugins/easypiechart/jquery.easypiechart.js"></script>
<!-- Sparkline -->
<script src="js/plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- Sparkline demo data -->
<script src="js/demo/sparkline-demo.js"></script>
</body>
</html>