diff options
Diffstat (limited to 'interface/js/app')
-rw-r--r-- | interface/js/app/config.js | 10 | ||||
-rw-r--r-- | interface/js/app/history.js | 8 | ||||
-rw-r--r-- | interface/js/app/rspamd.js | 18 | ||||
-rw-r--r-- | interface/js/app/stats.js | 20 | ||||
-rw-r--r-- | interface/js/app/symbols.js | 2 | ||||
-rw-r--r-- | interface/js/app/upload.js | 8 |
6 files changed, 33 insertions, 33 deletions
diff --git a/interface/js/app/config.js b/interface/js/app/config.js index decaa4a26..1866d9a70 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -40,7 +40,7 @@ define(["jquery", "codejar", "linenumbers", "prism"], idx: idx, html: '<div class="form-group">' + - '<label class="col-form-label col-md-2 float-left">' + item.action + "</label>" + + '<label class="col-form-label col-md-2 float-start">' + item.action + "</label>" + '<div class="controls slider-controls col-md-10">' + '<input class="action-scores form-control" data-id="action" type="number" value="' + item.value + '">' + @@ -124,13 +124,13 @@ define(["jquery", "codejar", "linenumbers", "prism"], var $tbody = $("<tbody>"); $.each(data, function (i, item) { - var $td = '<td><span class="badge badge-secondary">Read</span></td>'; + var $td = '<td><span class="badge bg-secondary">Read</span></td>'; if (!(item.editable === false || rspamd.read_only)) { - $td = $($td).append(' <span class="badge badge-success">Write</span>'); + $td = $($td).append(' <span class="badge bg-success">Write</span>'); } var $tr = $("<tr>").append($td); - var $span = $('<span class="map-link" data-toggle="modal" data-target="#modalDialog">' + item.uri + "</span>").data("item", item); + var $span = $('<span class="map-link" data-bs-toggle="modal" data-bs-target="#modalDialog">' + item.uri + "</span>").data("item", item); $span.wrap("<td>").parent().appendTo($tr); $("<td>" + item.description + "</td>").appendTo($tr); $tr.appendTo($tbody); @@ -169,7 +169,7 @@ define(["jquery", "codejar", "linenumbers", "prism"], } // Modal form for maps - $(document).on("click", "[data-toggle=\"modal\"]", function () { + $(document).on("click", "[data-bs-toggle=\"modal\"]", function () { var checked_server = rspamd.getSelector("selSrv"); var item = $(this).data("item"); rspamd.query("getmap", { diff --git a/interface/js/app/history.js b/interface/js/app/history.js index a9e40c7b4..a00d45eee 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -144,13 +144,13 @@ define(["jquery", "footable"], title: "Symbols" + '<div class="sym-order-toggle">' + '<br><span style="font-weight:normal;">Sort by:</span><br>' + - '<div class="btn-group btn-group-toggle btn-group-xs btn-sym-order-history" data-toggle="buttons">' + + '<div class="btn-group btn-group-xs btn-sym-order-history">' + '<label type="button" class="btn btn-outline-secondary btn-sym-history-magnitude">' + - '<input type="radio" value="magnitude">Magnitude</label>' + + '<input type="radio" class="btn-check" value="magnitude">Magnitude</label>' + '<label type="button" class="btn btn-outline-secondary btn-sym-history-score">' + - '<input type="radio" value="score">Value</label>' + + '<input type="radio" class="btn-check" value="score">Value</label>' + '<label type="button" class="btn btn-outline-secondary btn-sym-history-name">' + - '<input type="radio" value="name">Name</label>' + + '<input type="radio" class="btn-check" value="name">Name</label>' + "</div>" + "</div>", breakpoints: "all", diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index c5b28968c..cb9640712 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -330,7 +330,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, function alertMessage(alertClass, alertText) { var a = $("<div class=\"alert " + alertClass + " alert-dismissible fade in show\">" + - "<button type=\"button\" class=\"close\" data-dismiss=\"alert\" title=\"Dismiss\">×</button>" + + "<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" title=\"Dismiss\"></button>" + "<strong>" + alertText + "</strong>"); $(".notification-area").append(a); @@ -510,7 +510,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, // Button (or icon within a button) that triggers the popover. $(e.target).closest("button").attr("aria-describedby") === this.id ) return; - $(this).popover("hide"); + $("#settings").popover("hide"); }); }); }()); @@ -529,7 +529,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, }, 1000); }); - $('a[data-toggle="tab"]').on("shown.bs.tab", function () { + $('a[data-bs-toggle="tab"]').on("shown.bs.tab", function () { tabClick("#" + $(this).attr("id")); }); $("#refresh, #disconnect").on("click", function (e) { @@ -553,7 +553,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, } else { $("#learnServers").hide(); } - tabClick("#" + $("#navBar > ul > .nav-item > .nav-link.active").attr("id")); + tabClick("#" + $("#tablist > .nav-item > .nav-link.active").attr("id")); }); // Radio buttons @@ -779,7 +779,7 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, })).prependTo(self.$form); self.$action = $("<select/>", { - class: "form-control" + class: "form-select" }).on("change", { self: self }, self._onStatusDropdownChanged).append( @@ -906,13 +906,13 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config, } if (item.action === "clean" || item.action === "no action") { - item.action = "<div style='font-size:11px' class='badge badge-success'>" + item.action + "</div>"; + item.action = "<div style='font-size:11px' class='badge bg-success'>" + item.action + "</div>"; } else if (item.action === "rewrite subject" || item.action === "add header" || item.action === "probable spam") { - item.action = "<div style='font-size:11px' class='badge badge-warning'>" + item.action + "</div>"; + item.action = "<div style='font-size:11px' class='badge bg-warning'>" + item.action + "</div>"; } else if (item.action === "spam" || item.action === "reject") { - item.action = "<div style='font-size:11px' class='badge badge-danger'>" + item.action + "</div>"; + item.action = "<div style='font-size:11px' class='badge bg-danger'>" + item.action + "</div>"; } else { - item.action = "<div style='font-size:11px' class='badge badge-info'>" + item.action + "</div>"; + item.action = "<div style='font-size:11px' class='badge bg-info'>" + item.action + "</div>"; } var score_content = (item.score < item.required_score) diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js index 7ce239ef9..a00b99b62 100644 --- a/interface/js/app/stats.js +++ b/interface/js/app/stats.js @@ -71,21 +71,21 @@ define(["jquery", "d3pie"], function widget(k, v, cls) { var c = (typeof cls === "undefined") ? "" : cls; var titleAtt = d3.format(",")(v) + " " + k; - return '<div class="card stat-box d-inline-block text-center shadow-sm mr-3 px-3">' + + return '<div class="card stat-box d-inline-block text-center shadow-sm me-3 px-3">' + '<div class="widget overflow-hidden p-2' + c + '" title="' + titleAtt + - '"><strong class="d-block mt-2 mb-1 font-weight-bold">' + + '"><strong class="d-block mt-2 mb-1 fw-bold">' + d3.format(".3~s")(v) + "</strong>" + k + "</div></div>"; } if (i === "auth" || i === "error") return; // Skip to the next iteration if (i === "uptime" || i === "version") { - var cls = "border-right "; + var cls = "border-end "; var val = item; if (i === "uptime") { cls = ""; val = msToTime(item); } - $('<div class="' + cls + 'float-left px-3"><strong class="d-block mt-2 mb-1 font-weight-bold">' + + $('<div class="' + cls + 'float-start px-3"><strong class="d-block mt-2 mb-1 fw-bold">' + val + "</strong>" + i + "</div>") .appendTo("#statWidgets"); } else if (i === "actions") { @@ -100,9 +100,9 @@ define(["jquery", "d3pie"], $(item).appendTo("#statWidgets"); }); $("#statWidgets > div:not(.stat-box)") - .wrapAll('<div class="card stat-box text-center shadow-sm float-right">' + + .wrapAll('<div class="card stat-box text-center shadow-sm float-end">' + '<div class="widget overflow-hidden p-2 text-capitalize"></div></div>'); - $("#statWidgets").find("div.float-right").appendTo("#statWidgets"); + $("#statWidgets").find("div.float-end").appendTo("#statWidgets"); $("#statWidgets").show(); $("#clusterTable tbody").empty(); @@ -157,7 +157,7 @@ define(["jquery", "d3pie"], "<td>" + val.host + "</td>" + '<td class="text-center"><span class="icon"><i class="' + glyph_status + '"></i></span></td>' + '<td class="text-center"' + scan_times.title + ">" + scan_times.data + "</td>" + - '<td class="text-right' + + '<td class="text-end' + ((Number.isFinite(val.data.uptime) && val.data.uptime < 3600) ? ' warning" title="Has been restarted within the last hour"' : "") + @@ -192,8 +192,8 @@ define(["jquery", "d3pie"], (i === 0 ? '<td rowspan="' + statfiles.length + '">' + server + "</td>" : "") + '<td class="' + cls + '">' + statfile.symbol + "</td>" + '<td class="' + cls + '">' + statfile.type + "</td>" + - '<td class="text-right ' + cls + '">' + statfile.revision + "</td>" + - '<td class="text-right ' + cls + '">' + statfile.users + "</td></tr>"); + '<td class="text-end ' + cls + '">' + statfile.revision + "</td>" + + '<td class="text-end ' + cls + '">' + statfile.users + "</td></tr>"); }); } @@ -203,7 +203,7 @@ define(["jquery", "d3pie"], $("#fuzzyTable tbody").append("<tr>" + (i === 0 ? '<td rowspan="' + Object.keys(storages).length + '">' + server + "</td>" : "") + "<td>" + storage + "</td>" + - '<td class="text-right">' + hashes + "</td></tr>"); + '<td class="text-end">' + hashes + "</td></tr>"); i++; }); } diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index a64c7c931..5f6d7903b 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -162,7 +162,7 @@ define(["jquery", "footable"], })).prependTo(self.$form); self.$group = $("<select/>", { - class: "form-control" + class: "form-select" }).on("change", { self: self }, self._onStatusDropdownChanged).append( diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js index 4290f9b06..59cd7514e 100644 --- a/interface/js/app/upload.js +++ b/interface/js/app/upload.js @@ -103,13 +103,13 @@ define(["jquery"], title: "Symbols" + '<div class="sym-order-toggle">' + '<br><span style="font-weight:normal;">Sort by:</span><br>' + - '<div class="btn-group btn-group-toggle btn-group-xs btn-sym-order-scan" data-toggle="buttons">' + + '<div class="btn-group btn-group-xs btn-sym-order-scan">' + '<label type="button" class="btn btn-outline-secondary btn-sym-scan-magnitude">' + - '<input type="radio" value="magnitude">Magnitude</label>' + + '<input type="radio" class="btn-check" value="magnitude">Magnitude</label>' + '<label type="button" class="btn btn-outline-secondary btn-sym-scan-score">' + - '<input type="radio" value="score">Value</label>' + + '<input type="radio" class="btn-check" value="score">Value</label>' + '<label type="button" class="btn btn-outline-secondary btn-sym-scan-name">' + - '<input type="radio" value="name">Name</label>' + + '<input type="radio" class="btn-check" value="name">Name</label>' + "</div>" + "</div>", breakpoints: "all", |