forked from kaiiyer/UBA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanomalies.html
More file actions
218 lines (183 loc) · 5.32 KB
/
Copy pathanomalies.html
File metadata and controls
218 lines (183 loc) · 5.32 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenUEBA - Modeling</title>
<meta name="description" content="OpenUEBA">
<meta name="author" content="JLP">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style> /* set the CSS */
body { font: 12px Arial;}
path {
stroke: steelblue;
stroke-width: 2;
fill: none;
}
.axis path,
.axis line {
fill: none;
stroke: grey;
stroke-width: 1;
shape-rendering: crispEdges;
}
</style>
</head>
<body>
<!-- navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">OpenUEBA</a>
<button class="navbar-toggler" type="button"
data-toggle="collapse"
data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="/">
Dashboard <span class="sr-only">(current)</span>
</a>
<a class="nav-item nav-link" href="/data">
Data
</a>
<a class="nav-item nav-link" href="/modeling">
Models
</a>
<a class="nav-item nav-link active" href="/anomalies">
Anomalies
</a>
<a class="nav-item nav-link" href="/cases">
Cases
</a>
<a class="nav-item nav-link" href="/settings">
Settings
</a>
</div>
</div>
<form class="form-inline">
<a class="nav-item nav-link disabled" href="#">
Username
</a>
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">
Search
</button>
</form>
</nav>
<!-- end navigation -->
<div class="container">
<div class="row">
<div class="col-sm">
<hr>
</div>
</div>
<div class="row">
<div class="col-sm">
<div class="card">
<div class="card-body">
<h2><b>Anomalies</b></h2>
<hr>
<div class="row">
<div class="col-sm">
<h5>
New Today:
<span class="badge badge-info">100</span>
</h5>
</div>
<div class="col-sm">
<h5>
Open Anomalies:
<span class="badge badge-info">100</span>
</h5>
</div>
<div class="col-sm">
<h5>
Anomalies Closed:
<span class="badge badge-info">100</span>
</h5>
</div>
<div class="col-sm">
<h5>
Users imported from directory:
<span class="badge badge-info">100</span>
</h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br><br><br>
<div class="container">
<div class="row">
<div class="col-sm">
<hr>
</div>
</div>
</div>
<!-- load the d3.js library -->
<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
// Set the dimensions of the canvas / graph
var margin = {
top: 30,
right: 20,
bottom: 30,
left: 30
},
width = 380 - margin.left - margin.right,
height = 200 - margin.top - margin.bottom;
// Parse the date / time
var parseDate = d3.time.format("%d-%b-%y").parse;
// Set the ranges
var x = d3.time.scale().range([0, width]);
var y = d3.scale.linear().range([height, 0]);
// Define the axes
var xAxis = d3.svg.axis().scale(x).orient("bottom").ticks(5);
var yAxis = d3.svg.axis().scale(y).orient("left").ticks(5);
// Define the line
var valueline = d3.svg.line()
.x(function(d) { return x(d.date); })
.y(function(d) { return y(d.x); });
// Adds the svg canvas
var svg = d3.select("#d3_main")
.append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform",
"translate(" + margin.left + "," + margin.top + ")");
// The new data variable.
var data = [
{date: "1-May-12", x: 58.13},
{date: "30-Apr-12", x: 68.13},
];
data.forEach(function(d) {
d.date = parseDate(d.date);
d.x = +d.x;
});
// The following code was contained in the callback function.
x.domain(data.map(function(d) { return d.date; }));
y.domain([0, d3.max(data, function(d) { return d.x; })]);
// Add the valueline path.
svg.append("path")
.attr("class", "line")
.attr("d", valueline(data));
// Add the X Axis
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
.call(xAxis);
// Add the Y Axis
svg.append("g")
.attr("class", "y axis")
.call(yAxis);
</script>
<script src="js/scripts.js"></script>
</body>
</html>