aboutsummaryrefslogtreecommitdiffstats
path: root/interface/index.html
blob: 5b3187309181535115d341370ca9af44152229d7 (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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
<!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="icon" type="image/png" sizes="32x32" href="favicon-32x32.png?v=3">
	<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png?v=3">
	<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png?v=3">
	<link rel="mask-icon" href="safari-pinned-tab.svg?v=3" color="#5bbad5">
	<link rel="shortcut icon" href="favicon.ico?v=3">
	<meta name="msapplication-TileColor" content="#2b5797">

	<link href="./css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="./css/font-glyphicons.css">
	<link rel="stylesheet" type="text/css" href="./css/footable.standalone.min.css"/>
	<link rel="stylesheet" type="text/css" href="./css/FooTable.Glyphicons.css"/>
	<link rel="stylesheet" type="text/css" href="./css/svg-with-js.min.css">
	<link rel="stylesheet" type="text/css" href="./css/d3evolution.css">
	<link rel="stylesheet" type="text/css" href="./css/d3pie.css">
	<link rel="stylesheet" type="text/css" href="./css/nprogress.css"/>
	<link rel="stylesheet" type="text/css" href="./css/codejar-linenumbers.css"/>
	<link rel="stylesheet" type="text/css" href="./css/prism.css"/>
	<link href="./css/rspamd.css" rel="stylesheet">
</head>

<body>

<nav class="navbar navbar-light bg-light navbar-expand-xl d-none" id="navBar">
	<div class="container-fluid">
		<div class="navbar-header navbar-brand p-0">
			<img src="./img/rspamd_logo_navbar.png" alt="Rspamd">
		</div>
		<div class="collapse navbar-collapse order-3 order-xl-2">
			<form class="my-2 me-auto">
				<select id="selSrv" class="form-select"></select>
			</form>
		</div>

		<div class="collapse navbar-collapse order-4 order-xl-3 justify-content-center">
			<ul class="nav navbar-nav nav-pills nav-tabs-sticky" id="tablist" role="tablist">
				<li role="presentation" class="nav-item"><a id="status_nav" aria-controls="status" role="tab" href="#status" data-bs-toggle="tab" class="nav-link">Status</a></li>

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

				<li role="presentation" class="nav-item"><a id="configuration_nav" aria-controls="configuration" role="tab" href="#configuration" data-bs-toggle="tab" class="nav-link">Configuration</a></li>
				<li role="presentation" class="nav-item"><a id="symbols_nav" aria-controls="symbols" role="tab" href="#symbols" data-bs-toggle="tab" class="nav-link">Symbols</a></li>
				<li role="presentation" class="nav-item"><a id="scan_nav" aria-controls="scan" role="tab" href="#scan" data-bs-toggle="tab" class="nav-link">Scan<span class="ro-hide" style="display: none;">/Learn</span></a></li>
				<li role="presentation" class="nav-item"><a id="selectors_nav" aria-controls="selectors" role="tab" href="#selectors" data-bs-toggle="tab" class="nav-link ro-hide" style="display: none;">Test selectors</a></li>
				<li role="presentation" class="nav-item"><a id="history_nav" aria-controls="history" role="tab" href="#history" data-bs-toggle="tab" class="nav-link">History</a></li>
			</ul>
		</div>

		<div class="d-flex flex-row order-2 order-xl-4">
			<form class="ms-auto">
				<div class="btn-group">
					<button class="btn btn-outline-secondary" id="refresh" style="display: none;"><i class="fas fa-sync-alt"></i> Refresh</button>
					<button class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" id="autoRefresh" title="Auto-refresh time interval">
						<span id="countdown">--:--</span>
					</button>
					<div class="dropdown-menu">
						<a class="dropdown-item preset" href="#" data-value=null>Disable</a>
						<div class="dropdown-divider preset" role="separator"></div>
						<a class="dropdown-item preset active" href="#" data-value="10000">10 seconds</a>
						<a class="dropdown-item preset" href="#" data-value="30000">30 seconds</a>
						<div class="dropdown-divider preset" role="separator"></div>
						<a class="dropdown-item preset" href="#" data-value="60000">1 minute</a>
						<a class="dropdown-item preset" href="#" data-value="600000">10 minutes</a>
						<a class="dropdown-item preset" href="#" data-value="1800000">30 minutes</a>
						<div class="dropdown-divider preset" role="separator"></div>
						<a class="dropdown-item preset" href="#" data-value="3600000">1 hour</a>

						<a class="dropdown-item history active" href="#" data-value=null>Disable</a>
						<div class="dropdown-divider history" role="separator"></div>
						<a class="dropdown-item history" href="#" data-value="10000">10 seconds</a>
						<a class="dropdown-item history" href="#" data-value="30000">30 seconds</a>
						<div class="dropdown-divider history" role="separator"></div>
						<a class="dropdown-item history" href="#" data-value="60000">1 minute</a>
						<a class="dropdown-item history" href="#" data-value="600000">10 minutes</a>
						<a class="dropdown-item history" href="#" data-value="1800000">30 minutes</a>
						<div class="dropdown-divider history" role="separator"></div>
						<a class="dropdown-item history" href="#" data-value="3600000">1 hour</a>

						<a class="dropdown-item dynamic" href="#" data-value=null>Disable</a>
						<div class="dropdown-divider dynamic" role="separator"></div>
						<a class="dropdown-item dynamic active" href="#" id="dynamic-item" data-value="3600000">1 hour</a>
					</div>
				</div>
				<button class="btn btn-outline-secondary ms-2" id="disconnect" title="Disconnect"><i class="fas fa-power-off"></i></button>
				<button class="btn btn-outline-secondary ms-2" id="settings" title="WebUI settings"><i class="fas fa-cog"></i></button>
				<div class="d-none">
					<div id="settings-popover">
						<div class="card">
							<div class="card-body">
								<h6 class="card-title fw-bolder">Date and time locale</h6>
								<label class="ms-2">
									<input type="radio"  class="me-2" name="locale" value="browser" checked>
									Use browser settings
								</label>
								<div class="input-group input-group-sm">
									<div class="input-group-text">
										<label class="my-auto">
											<input type="radio" class="me-2" name="locale" value="custom">
											Custom
										</label>
									</div>
									<input type="text" id="locale" placeholder="Enter locale" class="form-control" />
								</div>
								<p class="mt-2 mb-0">Date: <span id="date-example"></span></p>
							</div>
						</div>

						<div class="card mt-1">
							<div class="card-body">
								<h6 class="card-title fw-bolder">HTTP requests timeout, ms</h6>
								<div class="input-group input-group-sm was-validated">
									<input type="number" id="ajax-timeout" class="form-control" min="0" step="any" />
									<div class="input-group-sm">
										<button id="ajax-timeout-restore" class="btn btn-secondary">Restore default</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
			<button class="navbar-toggler ms-2" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse">
				<span class="navbar-toggler-icon"></span>
			</button>
		</div>
	</div>
</nav>

<div class="notification-area">
	<noscript>
    	<div class="alert alert-error"><strong>Please enable JavaScript</strong></div>
    </noscript>
</div>

<div id="preloader" class="container-fluid">
	<div id="loading" class="position-absolute align-items-center my-3 text-primary blinking d-none">
		<div class="spinner-border align-middle" role="status" aria-hidden="true"></div>
		<strong class="ms-3">Loading...</strong>
	</div>
	<script>document.getElementById("loading").classList.remove("d-none");</script>
	<div class="row position-absolute w-100 h-100 align-items-center text-center">
		<img class="img-fluid w-auto mh-100 mx-auto" src="./img/rspamd_logo_navbar.png" alt="Rspamd" />
	</div>
</div>

<div id="mainUI" class="d-none">

	<div class="container-fluid">

		<div class="tab-content">
			<div class="tab-pane" id="status">
				<div class="row">
					<div id="statWidgets" class="col-lg-12 stat-boxes fw-bold text-secondary" style="display: none;">
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6">
						<div class="card bg-light shadow my-3">
							<div class="card-header text-secondary py-2 d-flex align-items-center">
								<span class="icon me-3"><i class="fas fa-server"></i></span>
								<span class="h6 fw-bolder my-auto">Servers</span>
							</div>
								<div class="card-body p-0 table-responsive">
									<table class="table status-table table-sm table-hover table-bordered text-nowrap mb-0" id="clusterTable">
										<thead class="text-secondary">
											<tr>
												<th></th>
												<th>Server name</th>
												<th>Host</th>
												<th class="w-1">Status</th>
												<th class="w-1">Scan time</th>
												<th class="w-1">Uptime</th>
												<th class="w-1">Version</th>
												<th>Configuration ID</th>
											</tr>
										</thead>
										<tbody>
										</tbody>
									</table>
								</div>
						</div>
						<div class="card bg-light shadow my-3">
							<div class="card-header text-secondary py-2 d-flex align-items-center">
								<span class="icon me-3"><i class="fas fa-dice"></i></span>
								<span class="h6 fw-bolder my-auto">Bayesian statistics</span>
							</div>
								<div class="card-body p-0 table-responsive">
									<table class="table status-table table-sm table-bordered text-nowrap mb-0" id="bayesTable">
										<thead class="text-secondary">
											<tr>
												<th>Server name</th>
												<th>Symbol</th>
												<th>Type</th>
												<th>Learns</th>
												<th>Users</th>
											</tr>
										</thead>
										<tbody>
										</tbody>
									</table>
								</div>
						</div>
						<div class="card bg-light shadow my-3">
							<div class="card-header text-secondary py-2 d-flex align-items-center">
								<span class="icon me-3"><i class="fas fa-hashtag"></i></span>
								<span class="h6 fw-bolder my-auto">Fuzzy hashes</span>
							</div>
								<div class="card-body p-0 table-responsive">
									<table class="table status-table table-sm table-bordered text-nowrap mb-0" id="fuzzyTable">
										<thead class="text-secondary">
											<tr>
												<th>Server name</th>
												<th>Storage</th>
												<th>Hashes</th>
											</tr>
										</thead>
										<tbody>
										</tbody>
									</table>
								</div>
						</div>
					</div>
					<div class="col-lg-6">
						<div class="card bg-light shadow my-3">
							<div class="card-header text-secondary py-2 d-flex align-items-center">
								<span class="icon me-3"><i class="fas fa-chart-pie"></i></span>
								<span class="h6 fw-bolder my-auto">Statistics</span>
							</div>
							<div class="card-body">
								<div class="row">
									<div class="bg-white w-auto mx-auto" id="chart"></div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="throughput">
				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-2 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-chart-area"></i></span>
						<span class="h6 fw-bolder my-auto">Throughput</span>
					</div>
					<div class="card-body text-center">
						<div class="d-inline-block bg-white">
							<div class="row">
								<div id="graph" class="mx-auto"></div>
							</div>
							<div id="summary-row" class="row">
								<div class="col-fixed" id="rrd-pie"></div>
								<div class="col-fluid">
									<table id="rrd-table" class="table table-light 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>
						</div>
					</div>
					<div class="card-footer pt-0 text-center">
						<form id="graph_controls" action="#">
							Dataset:
							<select id="selData" class="form-select">
								<option value="day" selected>By day</option>
								<option value="week">By week</option>
								<option value="month">By month</option>
								<option value="year">By year</option>
							</select>
							Y-scale:
							<select id="selYScale" class="form-select">
								<option value="lin" selected>Lin</option>
								<option value="log">Log</option>
							</select>
							Convert to:
							<select id="selConvert" class="form-select">
								<option value="" selected>--</option>
								<option value="percentage">percentage</option>
							</select>
							Chart type:
							<select id="selType" class="form-select">
								<option value="line" selected>Line</option>
								<option value="area">Stacked area</option>
							</select>
							<a title="&ldquo;Curves&rdquo; section of &ldquo;d3-shape&rdquo; module documentation" href="https://d3js.org/d3-shape/curve" target="_blank">Interpolation mode</a>:
							<select id="selInterpolate" class="form-select">
								<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 class="tab-pane" id="configuration">
				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-2 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-tasks"></i></span>
						<span class="h6 fw-bolder my-auto">Actions</span>
					</div>
					<div class="card-body pb-2">
						<form id="actionsForm">
							<fieldset id="actionsFormField" class="ro-disable"></fieldset>
						</form>
					</div>
					<div class="card-footer ro-hide">
						<div class="btn-group">
							<button class="btn btn-primary" type="button" id="saveActionsBtn">Save actions</button>
							<button class="btn btn-warning" type="button" id="saveActionsClusterBtn">Save cluster</button>
						</div>
					</div>
				</div>
				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-2 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-list"></i></span>
						<span class="h6 fw-bolder my-auto">Lists</span>
						<div class="input-group-sm ms-auto me-1">
							Editor:
							<div id="btnGroupEditor" class="btn-group btn-group-xs ms-1">
								<input type="radio" class="btn-check" name="editorMode" id="editorModeBascic" autocomplete="off" value="basic">
								<label class="btn btn-outline-secondary" for="editorModeBascic">Basic</label>

								<input type="radio" class="btn-check" name="editorMode" id="editorModeAdvanced"autocomplete="off" value="advanced" checked>
								<label class="btn btn-outline-secondary" for="editorModeAdvanced">Advanced</label>
							</div>
						</div>
					</div>
					<div class="card-body p-0">
						<table class="table table-sm table-hover mb-0" id="listMaps">
						</table>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="symbols">
				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-1 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-tasks"></i></span>
						<span class="h6 fw-bolder my-auto ms-0">Symbols and rules</span>
						<div class="ms-auto me-1">
							<button class="btn btn-info btn-sm d-flex align-items-center" id="updateSymbols">
								<i class="fas fa-redo-alt me-1"></i>Update
							</button>
						</div>
					</div>
					<div class="alert alert-info sticky-top py-2 mb-0 rounded-0 d-none" id="save-alert">
						<span class="icon me-3 align-middle"><i class="fas fa-save"></i></span>
						<span class="align-middle">The values have been updated. The changes must be saved to take effect.</span>
						<div class="float-end">
							<button title="Save changes to the selected server" type="button" class="btn btn-primary btn-sm">
								Save
							</button>
							<button data-save="All SERVERS" title="Save changes to all servers" type="button" class="btn btn-warning btn-sm">
								Save in cluster
							</button>
						</div>
					</div>
					<div class="card-body p-0">
						<table class="table table-hover" id="symbolsTable"></table>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="scan">
				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-1 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-envelope"></i></span>
						<span class="h6 fw-bolder my-auto">Scan suspected message</span>
						<div class="d-flex input-group-sm align-items-center ms-auto">
							<label for="formFile" class="col-auto col-form-label-sm me-1">Choose a file:</label>
							<input class="form-control form-control-sm btn btn-secondary" id="formFile" type="file">
						</div>
					</div>
					<div class="card-body">
						<div class="row">
							<form class="col-lg-12" id="scanForm">
								<div class="mb-0">
									<label class="form-label" for="scanMsgSource">Message source:</label>
									<textarea class="form-control" id="scanMsgSource" rows="10" placeholder='Paste raw message source, drag and drop files here or use "Browse..." button.'></textarea>
								</div>
								<div class="collapse row mt-3" id="scanOptions">
									<div class="col-lg-6">
										<div class="row mb-3 text-nowrap" title="Emulate IP address from which this message was received">
											<label for="scan-opt-ip" class="col-form-label col-sm-2">IP:</label>
											<div class="col-sm-10">
												<input name="scan-opt-ip" id="scan-opt-ip" class="form-control" type="text"/>
											</div>
										</div>
										<div class="row mb-3 text-nowrap" title="Emulate username of the authenticated SMTP client">
											<label for="scan-opt-user" class="col-form-label col-sm-2">User:</label>
											<div class="col-sm-10">
												<input name="scan-opt-user" id="scan-opt-user" class="form-control" type="text"/>
											</div>
										</div>
										<div class="row mb-3 text-nowrap" title="Emulate SMTP 'MAIL FROM' command data">
											<label for="scan-opt-from" class="col-form-label col-sm-2">From:</label>
											<div class="col-sm-10">
												<input name="scan-opt-from" id="scan-opt-from" class="form-control" type="text"/>
											</div>
										</div>
									</div>
									<div class="col-lg-6">
										<div class="row mb-3 text-nowrap" title="Emulate SMTP 'RCPT TO' command data">
											<label for="scan-opt-rcpt" class="col-form-label col-sm-2">Rcpt:</label>
											<div class="col-sm-10">
												<input name="scan-opt-rcpt" id="scan-opt-rcpt" class="form-control" type="text"/>
											</div>
										</div>
										<div class="row mb-3 text-nowrap" title="Imitate SMTP 'HELO' passing from the MTA">
											<label for="scan-opt-helo" class="col-form-label col-sm-2">Helo:</label>
											<div class="col-sm-10">
												<input name="scan-opt-helo" id="scan-opt-helo" class="form-control" type="text"/>
											</div>
										</div>
										<div class="row mb-3 text-nowrap" title="Imitate resolved hostname passing from the MTA">
											<label for="scan-opt-hostname" class="col-form-label col-sm-2">Hostname:</label>
											<div class="col-sm-10">
												<input name="scan-opt-hostname" id="scan-opt-hostname" class="form-control" type="text"/>
											</div>
										</div>
										<div class="row text-nowrap ps-0" title="Pass all filters">
											<label for="scan-opt-pass-all" class="form-check-label col-sm-2">Pass: all</label>
											<div class="col-sm-10">
												<input name="scan-opt-pass-all" id="scan-opt-pass-all" class="form-check-input-reverse" type="checkbox"/>
											</div>
										</div>
									</div>
								</div>
							</form>
						</div>
					</div>
					<div class="card-footer d-md-flex justify-content-between py-1">
						<div class="input-group d-inline-flex w-auto my-1">
							<button type="submit" class="btn btn-primary d-flex align-items-center" data-upload="scan"><i class="fas fa-search me-2"></i>Scan message</button>
							<button class="btn btn-secondary d-flex align-items-center" id="scanOptionsToggle" data-bs-toggle="collapse" data-bs-target="#scanOptions"><i class="fas fa-bars me-2"></i>Options</button>
						</div>
						<div class="input-group d-inline-flex w-auto my-1">
							<label for="fuzzy-flag" class="input-group-text">Flag</label>
							<input id="fuzzy-flag" class="form-control" value="1" min="1" type="number">
							<button class="btn btn-warning d-flex align-items-center" data-upload="compute-fuzzy"><i class="fas fa-hashtag me-2"></i>Compute fuzzy hashes</button>
						</div>
						<div class="float-end my-1">
							<button class="btn btn-secondary d-flex align-items-center" id="scanClean"><i class="fas fa-trash-alt me-2"></i>Clean form</button>
						</div>
					</div>
				</div>
				<div class="card ro-hide" style="display: none;">
					<div class="card-header text-secondary py-1 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-graduation-cap"></i></span>
						<span class="h6 fw-bolder my-auto">Learn Rspamd</span>
						<div id="learnServers" class="input-group-sm align-items-center text-nowrap ms-auto me-1">
							<label for="selLearnServers">Learn servers:</label>
							<select id="selLearnServers" class="form-select ms-1">
								<option value="random" selected>random</option>
								<option value="all">all</option>
							</select>
						</div>
					</div>
					<div class="card-body">
						<div class="row">
							<div class="col-lg-6">
								<div class="card bg-light shadow card-body card p-2">
									<p>Learn Bayesian classifier:</p>
									<form>
										<div class="btn-group">
											<button class="btn btn-success d-flex align-items-center" type="button" data-upload="ham" disabled><i class="fas fa-thumbs-up me-2"></i>Upload HAM</button>
											<button class="btn btn-danger d-flex align-items-center" type="button" data-upload="spam" disabled><i class="fas fa-thumbs-down me-2"></i>Upload SPAM</button>
										</div>
									</form>
								</div>
							</div>
							<div class="col-lg-6">
								<div class="card bg-light shadow card-body card p-2">
									<p>Learn Fuzzy storage:</p>
									<form class="d-flex">
										<div class="d-flex align-items-center">
											<label for="fuzzyFlagText">Flag:</label>
											<input name="fuzzyFlagText" id="fuzzyFlagText" class="form-control ms-1" type="number" value="1"/>
										</div>
										<div class="d-flex align-items-center ms-2">
											<label for="fuzzyWeightText">Weight:</label>
											<input name="fuzzyWeightText" id="fuzzyWeightText" class="form-control ms-1" type="number" value="1"/>
										</div>
										<button class="btn btn-warning ms-2 d-flex align-items-center" data-upload="fuzzy" disabled><i class="fas fa-upload me-2"></i>Upload FUZZY</button>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div id="hash-card" class="card bg-light shadow my-3" style="display: none;">
					<div class="card-header text-secondary py-2 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-hashtag"></i></span>
						<span class="h6 fw-bolder my-auto">Fuzzy hashes</span>
						<button type="button" class="card-close-btn btn-close float-end" aria-label="Close"></button>
					</div>
						<div class="card-body p-0 table-responsive">
							<table class="table status-table table-sm table-bordered text-nowrap mb-0" id="hashTable">
								<thead class="text-secondary">
									<tr>
										<th>Rule name</th>
										<th>Hashes</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
				</div>

				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-1 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-eye"></i></span>
						<span class="h6 fw-bolder my-auto ms-0">Scan results history</span>
						<div id="scanResult" class="d-flex input-group-sm align-items-center text-nowrap ms-auto me-1">
								<label for="selSymOrder_scan">Symbols order:</label>
								<select id="selSymOrder_scan" class="form-select ms-1">
									<option value="magnitude" selected>Score magnitude</option>
									<option value="score">Score value</option>
									<option value="name">Name</option>
								</select>
							<label for="scan_page_size" class="ms-2">Rows per page:</label>
							<input id="scan_page_size" class="form-control ms-1" value="25" min="1" type="number">
							<button class="btn btn-outline-secondary btn-sm ms-2 d-flex align-items-center dropdown-toggle ft-columns-btn" type="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false" disabled>
								<i class="fas fa-columns me-1"></i>Columns
							</button>
							<div class="dropdown-menu ft-columns-dropdown p-2"></div>
							<button class="btn btn-secondary btn-sm ms-2 d-flex align-items-center" id="cleanScanHistory" disabled>
								<i class="fas fa-trash-alt me-1"></i>Clean history
							</button>
						</div>
					</div>
					<div class="card-body p-0">
						<div id="scanLog">
							<table class="table mb-0" id="historyTable_scan"></table>
						</div>
					</div>
				</div>
			</div>

			<div class="tab-pane" id="selectors">
				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-2 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-envelope"></i></span>
						<span class="h6 fw-bolder my-auto">Test Rspamd selectors</span>
					</div>
					<div class="card-body p-0">
						<div class="row h-100 m-0" id="row-main">
							<div class="col-lg-3 sidebar h-100" id="sidebar-left">
								<div class="p-0 table-responsive mh-100 bg-white">
									<table class="table table-sm small table-striped table-hover table-bordered mb-0" id="selectorsTable-extractors">
										<thead><tr><th>Name</th><th>Description</th></tr></thead>
										<tbody/>
									</table>
								</div>
							</div>

							<div class="col-lg-6 col-12 h-100" id="content">

								<div class="row navbar-light h-100">
									<ul class="nav navbar-nav nav-tabs sidebar-nav border-bottom-0">
										<li class="active text-nowrap nav-item" id="sidebar-tab-left">
											<a class="nav-link border-bottom-0 px-2 py-0" href=""><div id="sidebar-tab-text-left">&#x2195;&ensp;List of extractors</div></a>
										</li>
									</ul>

									<div class="col-lg col-12 mh-100 overflow-auto">
										<div class="row h-100">
											<form class="col-12 d-flex flex-column">
												<div class="row pt-3">
													<div class="col">
														<div class="form-group">
															<label class="form-label" for="selectorsMsgArea">Message source:</label>
															<textarea class="form-control" id="selectorsMsgArea" rows="9" placeholder="Paste raw message source"></textarea>
														</div>
														<button class="btn btn-secondary d-flex align-items-center float-end" id="selectorsMsgClean"><i class="fas fa-trash-alt me-2"></i>Clean form</button>
													</div>
												</div>
												<div class="row pt-3">
													<div class="col">
														<div class="form-group">
															<label class="form-label" for="selectorsSelArea">Selector(s):</label>
															<textarea class="form-control" id="selectorsSelArea" rows="1" placeholder="extractor.transform(arg);extractor.transform(arg);..."></textarea>
														</div>
														<button type="submit" class="btn btn-primary d-inline-flex align-items-center" id="selectorsChkMsgBtn"><i class="fas fa-search me-2"></i>Check message</button>
														<button class="btn btn-secondary d-inline-flex align-items-center float-end" id="selectorsClean"><i class="fas fa-trash-alt me-2"></i>Clean form</button>
													</div>
												</div>
												<div class="row pt-3 flex-grow-1">
													<div class="col d-flex flex-column">
														<div class="form-group h-100 d-flex flex-column">
															<label class="form-label" for="selectorsResArea">Result:</label>
															<textarea class="form-control flex-grow-1" id="selectorsResArea" disabled readonly></textarea>
														</div>
													</div>
												</div>
											</form>
										</div>
									</div>

									<ul class="nav navbar-nav nav-tabs sidebar-nav border-bottom-0">
										<li class="active text-nowrap nav-item" id="sidebar-tab-right">
											<a class="nav-link border-bottom-0 px-2 py-0" href="">&#x2195;&ensp;List of transforms</a>
										</li>
									</ul>
								</div>
							</div>

							<div class="col-lg-3 sidebar h-100" id="sidebar-right">
								<div class="p-0 table-responsive mh-100 bg-white">
									<table class="table table-sm small table-striped table-hover table-bordered mb-0" id="selectorsTable-transforms">
										<thead><tr><th>Name</th><th>Description</th></tr></thead>
										<tbody/>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

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

				<div class="card bg-light shadow my-3">
					<div class="card-header text-secondary py-1 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-eye"></i></span>
						<span class="h6 fw-bolder my-auto ms-0">History</span>
						<a href="https://rspamd.com/doc/modules/history_redis.html" target="_blank" rel="noopener noreferrer"
							title="If you'd like to use the modern version of History, please enable History redis module."
							 id="legacy-history-badge" class="my-2 ms-2 badge text-bg-info" style="display: none;">Legacy version</a>
						<div class="d-flex input-group-sm align-items-center text-nowrap ms-auto me-1">
							<label for="selSymOrder_history">Symbols order:</label>
							<select id="selSymOrder_history" class="form-select ms-1">
								<option value="magnitude" selected>Score magnitude</option>
								<option value="score">Score value</option>
								<option value="name">Name</option>
							</select>
							<label for="history_page_size" class="ms-2">Rows per page:</label>
							<input id="history_page_size" class="form-control ms-1" value="25" min="1" type="number">
							<button class="btn btn-outline-secondary btn-sm ms-2 d-flex align-items-center dropdown-toggle ft-columns-btn" type="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false" disabled>
								<i class="fas fa-columns me-1"></i>Columns
							</button>
							<div class="dropdown-menu ft-columns-dropdown p-2"></div>

							<button class="btn btn-danger btn-sm ms-2 d-flex align-items-center ro-hide" id="resetHistory">
								<i class="fas fa-times-circle me-1"></i>Reset
							</button>
							<button class="btn btn-info btn-sm ms-2 d-flex align-items-center" id="updateHistory">
								<i class="fas fa-redo-alt me-1"></i>Update
							</button>
						</div>
					</div>
					<div class="card-body p-0">
						<div id="historyLog">
							<table class="table" id="historyTable_history"></table>
						</div>
					</div>
				</div>
				<div class="card bg-light shadow my-3 ro-hide" id="errors-history">
					<div class="card-header text-secondary py-1 d-flex align-items-center">
						<span class="icon me-3"><i class="fas fa-exclamation-triangle"></i></span>
						<span class="h6 fw-bolder my-auto ms-0">Errors</span>
						<div class="align-self-center ms-auto me-1">
							<button class="btn btn-info btn-sm d-flex align-items-center" id="updateErrors">
								<i class="fas fa-redo-alt me-1"></i>Update
							</button>
						</div>
					</div>
					<div class="card-body p-0">
						<table class="table table-hover mb-0" id="errorsLog"></table>
					</div>
				</div>

			</div>

		</div>
	</div>

</div>

<!-- Common modal -->
<div id="modalDialog" class="modal fade text-center" data-backdrop="static" tabindex="-1" role="dialog">
	<div class="modal-dialog modal-xl d-inline-block mw-100 my-auto text-start">
		<div class="modal-content shadow">
			<div class="modal-header text-secondary py-2">
				<i class="fas my-auto"></i><h6 class="modal-title fw-bolder mx-3" id="modalTitle"></h6>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true"></button>
			</div>
			<div class="modal-body" id="modalBody"></div>
			<div class="modal-footer">
				<div class="btn-group" id="modalSaveGroup">
					<button class="btn btn-primary" id="modalSave">Save changes</button>
					<button class="btn btn-warning" id="modalSaveAll">Save on cluster</button>
				</div>
				<button class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true" id="modalClose">Close</button>
			</div>
		</div>
	</div>
</div>

<!-- login modal -->
<div id="connectDialog" class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" role="dialog">
	<div class="modal-dialog modal-sm modal-dialog-centered">
		<div class="modal-content shadow">
			<div class="modal-header text-secondary py-2">
				<i class="fas fa-key my-auto"></i>
				<div id="authInvalidCharFeedback" class="invalid-tooltip">Invalid characters</div>
				<div id="authUnauthorizedFeedback" class="invalid-tooltip">Wrong password</div>
				<h6 class="modal-title fw-bolder">Login to Rspamd</h6>
			</div>
			<div class="modal-body" id="connectBody">
				<form id="connectForm">
					<!-- In recent browser versions username is required to save credentials in a password manager.
					    Browser detects passwords by form.elements[n].type == "password" and then detects
						the username field by searching backwards through form elements for the text field
						immediately before the password fields. -->
					<input value="Rspamd controller password" style="display: none;"/>
					<div class="input-group">
						<input class="form-control"
							   type="password"
							   id="connectPassword"
							   placeholder="Password"
							   data-cip-id="connectPassword">
						<button type="submit" id="connectButton" class="btn btn-primary">Connect</button>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<script data-main="./js/main.js" src="./js/lib/require.min.js"></script>
</body>
</html>