]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Add legacy history version badge
authormoisseev <moiseev@mezonplus.ru>
Sat, 5 Nov 2022 15:31:27 +0000 (18:31 +0300)
committermoisseev <moiseev@mezonplus.ru>
Sat, 5 Nov 2022 15:31:27 +0000 (18:31 +0300)
interface/index.html
interface/js/app/history.js

index 5b1c1f0d0384051822e2c7b949dfc2a55673f114..b8ccfa3f64c06cc27060c1d8ee30f192d7d25c7b 100644 (file)
                                        <div class="card-header text-secondary py-1 d-flex">
                                                <span class="icon mr-3"><i class="fas fa-eye"></i></span>
                                                <span class="h6 font-weight-bolder my-2 ml-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 ml-2 badge badge-info" style="display: none;">Legacy version</a>
                                                <div class="form-inline card-header-form input-group-sm align-self-center ml-auto mr-1">
                                                        <label for="selSymOrder_history">Symbols order:</label>
                                                        <select id="selSymOrder_history" class="form-control ml-1">
index b9b3831ea9216e8752800214c70d3e61f348465c..a9e40c7b4362a8dc6e54c836d317bcefaa090c8f 100644 (file)
@@ -349,9 +349,11 @@ define(["jquery", "footable"],
                                     return e.rows;
                                 }));
                             data.version = version;
+                            $("#legacy-history-badge").hide();
                         } else {
                             // Legacy version
                             data = [].concat.apply([], neighbours_data);
+                            $("#legacy-history-badge").show();
                         }
                         var o = process_history_data(rspamd, data);
                         var items = o.items;