summaryrefslogtreecommitdiffstats
path: root/interface/index.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--interface/index.html737
1 files changed, 737 insertions, 0 deletions
diff --git a/interface/index.html b/interface/index.html
new file mode 100644
index 0000000..2607348
--- /dev/null
+++ b/interface/index.html
@@ -0,0 +1,737 @@
+<!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">
+ <span class="icon me-3"><i class="fas fa-server"></i></span>
+ <span class="h6 fw-bolder my-2">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">
+ <span class="icon me-3"><i class="fas fa-dice"></i></span>
+ <span class="h6 fw-bolder my-2">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">
+ <span class="icon me-3"><i class="fas fa-hashtag"></i></span>
+ <span class="h6 fw-bolder my-2">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">
+ <span class="icon me-3"><i class="fas fa-chart-pie"></i></span>
+ <span class="h6 fw-bolder my-2">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">
+ <span class="icon me-3"><i class="fas fa-chart-area"></i></span>
+ <span class="h6 fw-bolder my-2">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; library documentation" href="https://github.com/d3/d3-shape#curves" 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">
+ <span class="icon me-3"><i class="fas fa-tasks"></i></span>
+ <span class="h6 fw-bolder my-2">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">
+ <span class="icon me-3"><i class="fas fa-list"></i></span>
+ <span class="h6 fw-bolder my-2">Lists</span>
+ <div class="input-group-sm align-self-center 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">
+ <span class="icon me-3"><i class="fas fa-tasks"></i></span>
+ <span class="h6 fw-bolder my-2 ms-0">Symbols and rules</span>
+ <div class="align-self-center ms-auto me-1">
+ <button class="btn btn-info btn-sm" id="updateSymbols">
+ <i class="fas fa-redo-alt"></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-2">
+ <span class="icon me-3"><i class="fas fa-envelope"></i></span>
+ <span class="h6 fw-bolder my-2">Scan suspected message</span>
+ </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"></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" data-upload="scan"><i class="fas fa-search"></i> Scan message</button>
+ <button class="btn btn-secondary d-inline-block" id="scanOptionsToggle" data-bs-toggle="collapse" data-bs-target="#scanOptions"><i class="fas fa-bars"></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" data-upload="compute-fuzzy"><i class="fas fa-hashtag"></i> Compute fuzzy hashes</button>
+ </div>
+ <div class="float-end my-1">
+ <button class="btn btn-secondary" id="scanClean"><i class="fas fa-trash-alt"></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">
+ <span class="icon me-3"><i class="fas fa-graduation-cap"></i></span>
+ <span class="h6 fw-bolder my-2">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" type="button" data-upload="ham" disabled><i class="fas fa-thumbs-up"></i> Upload HAM</button>
+ <button class="btn btn-danger" type="button" data-upload="spam" disabled><i class="fas fa-thumbs-down"></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" data-upload="fuzzy" disabled><i class="fas fa-upload"></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">
+ <span class="icon me-3"><i class="fas fa-hashtag"></i></span>
+ <span class="h6 fw-bolder my-2">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">
+ <span class="icon me-3"><i class="fas fa-eye"></i></span>
+ <span class="h6 fw-bolder my-2 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-secondary btn-sm ms-2" id="cleanScanHistory" disabled>
+ <i class="fas fa-trash-alt"></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">
+ <span class="icon me-3"><i class="fas fa-envelope"></i></span>
+ <span class="h6 fw-bolder my-2">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 float-end" id="selectorsMsgClean"><i class="fas fa-trash-alt"></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" id="selectorsChkMsgBtn"><i class="fas fa-search"></i> Check message</button>
+ <button class="btn btn-secondary float-end" id="selectorsClean"><i class="fas fa-trash-alt"></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">
+ <span class="icon me-3"><i class="fas fa-eye"></i></span>
+ <span class="h6 fw-bolder my-2 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-danger btn-sm ms-2 ro-hide" id="resetHistory">
+ <i class="fas fa-times-circle"></i> Reset
+ </button>
+ <button class="btn btn-info btn-sm ms-2" id="updateHistory">
+ <i class="fas fa-redo-alt"></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">
+ <span class="icon me-3"><i class="fas fa-exclamation-triangle"></i></span>
+ <span class="h6 fw-bolder my-2 ms-0">Errors</span>
+ <div class="align-self-center ms-auto me-1">
+ <button class="btn btn-info btn-sm" id="updateErrors">
+ <i class="fas fa-redo-alt"></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>