aboutsummaryrefslogtreecommitdiffstats
path: root/interface/index.html
blob: a10af453fa8f20d213d8c2de9225aec4ebb65a20 (plain)
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Rspamd Web Interface</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="">
	<meta name="author" content="">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="./css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="./css/footable.bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="./css/d3evolution.css">
	<link href="./css/rspamd.css" rel="stylesheet">
</head>

<body>

<nav class="navbar navbar-default" id="navBar">
	<div class="container-fluid">
		<div class="navbar-header">
			<a class="navbar-brand" href="."><img src="./img/rspamd_logo_navbar.png" style="width: 67px; margin-top: -16px;"/></a>
		</div>
		<form class="navbar-form navbar-left">
			<select id="selSrv" class="form-control"></select>
		</form>
		<ul class="nav navbar-nav nav-pills" role="tablist">
			<li role="presentation" class="active"><a id="status_nav" aria-controls="status" role="tab" href="#status" data-toggle="tab">Status</a></li>

			<li role="presentation"><a id="throughput_nav" aria-controls="throughput" role="tab" href="#throughput" data-toggle="tab">Throughput</a></li>

			<li role="presentation"><a id="configuration_nav" aria-controls="configuration" role="tab" href="#configuration" data-toggle="tab">Configuration</a></li>
			<li role="presentation"><a id="symbols_nav" aria-controls="symbols" role="tab" href="#symbols" data-toggle="tab">Symbols</a></li>
			<li role="presentation"><a id="learning_nav" aria-controls="learning" role="tab" href="#learning" data-toggle="tab" style="display: none;">Learning</a></li>
			<li role="presentation"><a id="scan_nav" aria-controls="scan" role="tab" href="#scan" data-toggle="tab">Scan</a></li>
			<li role="presentation"><a id="history_nav" aria-controls="history" role="tab" href="#history" data-toggle="tab">History</a></li>
		</ul>
    <ul class="nav navbar-nav nav-pills pull-right" style="display:none">
      <li><a href="#" data-toggle="tab" id="refresh"><i class="glyphicon glyphicon-refresh glyphicon-spin"></i> Refresh</a></li>
      <li><a href="#" data-toggle="tab" id="disconnect"><i class="glyphicon glyphicon-off"></i> Disconnect</a></li>
    </ul>
	</div>
</nav>

<div class="notification-area"></div>

<div id="mainUI" style="display:none">

	<div class="container-fluid">

		<div class="tab-content">
			<div class="tab-pane active" id="status">
				<div class="row">
					<div class="col-md-12">
						<div class="widget-box widget-plain">
							<ul id="statWidgets" class="stat-boxes" style="display:none">
							</ul>
						</div>
					</div>
				</div>

				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="glyphicon glyphicon-signal"></i></span>
						<h5>Statistics</h5>
					</div>
					<div class="widget-content chart-content">
						<div class="row">
							<div class="chart" id="chart">
								<span class="notice">Loading..</span>
								<noscript>Please enable Javascript</noscript>
							</div>
						</div>
					</div>
				</div>
				<div class="widget-box">
						<!--iv class="widget-title">
							<span class="icon"><i class="glyphicon glyphicon-tasks"></i></span>
							<h5>Servers</h5>
						</div-->
						<div class="widget-content nopadding">
								<table class="table table-log table-hover" id="clusterTable">
										<thead>
											<tr>
												<th class="col1" title="Radio"></th>
												<th class="col2" title="SName">Server name</th>
												<th class="col3" title="SHost">Host</th>
												<th class="col4" title="SStatus">Status</th>
												<th class="col5" title="SId">Configuration ID</th>
											</tr>
										</thead>
										<tbody>
										</tbody>
								</table>
						</div>
				</div>
			</div>

			<div class="tab-pane" id="throughput">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="glyphicon glyphicon-stats"></i></span>
						<h5>Throughput</h5>
					</div>
					<div class="widget-content">
						<div>
							<div class="row">
								<div id="graph">
									<span class="notice">Loading..</span>
									<noscript>Please enable Javascript</noscript>
								</div>
							</div>

							<div id="summary-row" class="row">
								<div class="col-fixed" id="rrd-pie" >
									<span class="notice">Loading..</span>
									<noscript>Please enable Javascript</noscript>
								</div>

								<div class="col-fluid">
									<table id="rrd-table" class="table table-striped table-hover"></table>
									<div id="rrd-table_toggle"></div>
									<div id="rrd-total">Total messages: <span id="rrd-total-value"></span></div>
								</div>
							</div>

							<form id="graph_controls" action="#">
								Dataset:
								<select id="selData" class="form-control">
									<option value="hourly" selected>Hourly</option>
									<option value="daily">Daily</option>
									<option value="weekly">Weekly</option>
									<option value="monthly">Monthly</option>
								</select>
								Y-scale:
								<select id="selYScale" class="form-control">
									<option value="lin" selected>Lin</option>
									<option value="log">Log</option>
								</select>
								Convert to:
								<select id="selConvert" class="form-control">
									<option value="" selected>--</option>
									<option value="percentage">percentage</option>
								</select>
								Chart type:
								<select id="selType" class="form-control">
									<option value="line" selected>Line</option>
									<option value="area">Stacked area</option>
								</select>
								<a title="&ldquo;Curves&rdquo; section of &ldquo;d3-shape&rdquo; library documentation" href="https://github.com/d3/d3-shape#curves" target="_blank">Interpolation mode</a>:
								<select id="selInterpolate" class="form-control">
									<option value="curveLinear" selected>linear</option>
									<option value="curveStep">step</option>
									<option value="curveStepBefore">stepBefore</option>
									<option value="curveStepAfter">stepAfter</option>
									<option value="curveBasis">basis</option>
									<option value="curveBasisOpen">basisOpen</option>
									<option value="curveBundle">bundle</option>
									<option value="curveCardinal">cardinal</option>
									<option value="curveCardinalOpen">cardinalOpen</option>
									<option value="curveMonotoneX">monotoneX</option>
								</select>
							</form>
						</div>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="configuration">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="glyphicon glyphicon-tasks"></i></span><h5>Actions</h5>
					</div>
					<div class="widget-content actions-content" id="actionsBody"></div>
				</div>
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="glyphicon glyphicon-list"></i></span><h5>Lists</h5>
					</div>
					<div class="widget-content nopadding">
						<table class="table table-condensed table-hover" id="listMaps">
						</table>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="symbols">
				<div class="widget-box">
					<div class="widget-title">
						<div class="buttons pull-right">
							<button class="btn btn-info btn-sm" id="updateSymbols">
								<i class="glyphicon glyphicon-refresh"></i> Update
							</button>
						</div>
						<span class="icon"><i class="glyphicon glyphicon-tasks"></i></span>
						<h5>Symbols and rules</h5>
					</div>
					<div class="widget-content nopadding">
						<table class="table table-hover" id="symbolsTable"></table>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="learning">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="glyphicon glyphicon-file"></i></span>
						<h5>Learn RSPAMD</h5>
					</div>
					<div class="widget-content">
						<div class="row">
							<form class="col-md-6">
								<h5>Insert raw SPAM source:</h5>
								<textarea class="col-md-5 upload-textarea" id="spamTextSource" value=""></textarea>
								<p><button class="btn btn-default pull-right" data-upload="spam"><i class="glyphicon glyphicon-upload"></i> Upload text</button></p>
							</form>
							<form class="col-md-6">
								<h5>Insert raw HAM source:</h5>
								<textarea class="col-md-5 upload-textarea" id="hamTextSource" value=""></textarea>
								<p><button class="btn btn-default pull-right" data-upload="ham"><i class="glyphicon glyphicon-upload"></i> Upload text</button></p>
							</form>
						</div>
						<div class="row">
							<form class="col-md-6">
								<h5>Insert raw Fuzzy storage:</h5>
								<textarea class="col-md-5 upload-textarea" id="fuzzyTextSource" value=""></textarea>
							<div class="row">
								<label class="pull-left">
										Flag
								</label>
									<div class="pull-right col-md-10">
										<input id="fuzzyFlagText" class="slider" type="slider" value="1"/>
									</div>
							</div>
							<div class="row">
								<label class="pull-left">
										Weight
								</label>
									<div class="pull-right col-md-10">
										<input id="fuzzyWeightText" class="slider" type="slider" value="1"/>
									</div>
							</div>
								<p><button class="btn btn-default pull-right" data-upload="fuzzy"><i class="glyphicon glyphicon-upload"></i> Upload text</button></p>
							</form>
						</div>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="scan">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="glyphicon glyphicon-info-sign"></i></span>
						<h5>Online scan suspected message</h5>
					</div>
					<div class="widget-content">
						<h5>Paste and scan suspicious message</h5>
						<div class="row">
							<form class="col-md-12 nomargin" id="scanForm">
								<textarea class="col-md-12 scan-textarea" id="scanTextSource"></textarea>
                <button type="submit" class="btn btn-default btn-primary" data-upload="scan">Scan message</button>
                   <!--span class="btn btn-default btn-file" style="margin-top:10px; margin-left:5px;">
                       <i class="glyphicon glyphicon-upload"></i> Upload file <input type="file" class="btn btn-default" id="inputFile">
                   </span-->
									 <button class="btn btn-default pull-right" id="scanClean">Clean form</button>
							</form>
						</div>
						<div id="scanResult" style="display:none">
							<h4>Scan results:</h4>
							<div class="well nomargin nopadding">
								<table class="table table-log table-hover" id="scanOutput">
									<thead>
										<tr>
											<th class="col4" title="Action">Action</th>
											<th class="col5" title="Score / Req.&nbsp;score">Score / Req.&nbsp;score</th>
											<th class="col6" title="Symbols">Symbols</th>
										</tr>
									</thead>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="history">

				<div class="widget-box">
					<div class="widget-title">
						<form role="form" class="form-inline pull-right buttons">
							<div class="form-group widget-title-form">
								<label for="selSymOrder">Symbols order:</label>
								<select id="selSymOrder" class="form-control">
									<option value="score" selected>Score</option>
									<option value="name">Name</option>
								</select>
							</div>
							<button class="btn btn-danger btn-sm" id="resetHistory">
								<i class="glyphicon glyphicon-remove-circle"></i> Reset
							</button>
							<button class="btn btn-info btn-sm" id="updateHistory">
								<i class="glyphicon glyphicon-refresh"></i> Update
							</button>
						</form>
						<span class="icon"><i class="glyphicon glyphicon-eye-open"></i></span>
						<h5>History</h5>
					</div>
					<div class="widget-content nopadding">
						<div id="historyLog">
							<table class="table" id="historyTable"></table>
						</div>
					</div>
				</div>
				<div class="widget-box" id="errors-history">
					<div class="widget-title">
						<div class="buttons pull-right">
							<button class="btn btn-info btn-sm" id="updateErrors">
								<i class="glyphicon glyphicon-refresh"></i> Update
							</button>
						</div>
						<span class="icon"><i class="glyphicon glyphicon-eye-open"></i></span>
						<h5>Errors</h5>
					</div>
					<div class="widget-content nopadding">
						<table class="table table-hover" id="errorsLog"></table>
					</div>
				</div>

			</div>

		</div>
	</div>

</div>

<!-- Common modal -->
<div id="modalDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h3 id="modalTitle"></h3>
			</div>
			<div class="modal-body" id="modalBody">
				<div class="progress progress-striped active">
					<div class="bar" style="width:100%;"></div>
				</div>
			</div>
			<div class="modal-footer">
				<button class="btn btn-default" data-dismiss="modal" aria-hidden="true" id="modalClose">Close</button>
				<button class="btn btn-primary" id="modalSave">Save changes</button>
				<button class="btn btn-primary" id="modalSaveAll">Save on cluster</button>
			</div>
		</div>
	</div>
</div>

<!-- login modal -->
<div id="connectDialog" class="modal" tabindex="-1" role="dialog" aria-labelledby="RSPAMD Connect">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h3>RSPAMD Connect</h3>
			</div>
			<div class="modal-body" id="connectBody">
				<form id="connectForm">
					<!--
                    <div class="form-group">
                        <label class="control-label" for="connectHost">Hostname</label>
                        <div class="controls">
                            <input class=col-md-2" type="text" id="connectHost" placeholder="Hostname" tabindex="1">
                        </div>
                    </div>
                    -->
					<div class="form-group">
						<div class="input-group">
							<input class="form-control"
								   type="password"
								   id="connectPassword"
								   placeholder="Password"
								   tabindex="1" data-cip-id="connectPassword">
							<span class="input-group-btn">
								<button type="submit" id="connectButton" class="btn btn-primary" tabindex="1">Connect</button>
							</span>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<div id="backDrop" class="modal-backdrop fade in" style="display:none"></div>
<script data-main="./js/main.js" src="./js/lib/require.min.js"></script>
</body>
</html>