commit 2c99233: [WebUI] Fix sorting errors by date

moisseev moiseev at mezonplus.ru
Sat Apr 3 19:56:06 UTC 2021


Author: moisseev
Date: 2021-04-02 20:45:08 +0300
URL: https://github.com/rspamd/rspamd/commit/2c992334779c3a381056b2e94d0d2d4dc22e3d85 (refs/pull/3696/head)

[WebUI] Fix sorting errors by date
Fixes #2965
Submitted by: @z-jun

---
 interface/js/app/history.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index edf9e19cf..8feb527e1 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -408,7 +408,14 @@ define(["jquery", "footable"],
         function initErrorsTable(rspamd, tables, rows) {
             tables.errors = FooTable.init("#errorsLog", {
                 columns: [
-                    {sorted:true, direction:"DESC", name:"ts", title:"Time", style:{"font-size":"11px", "width":300, "maxWidth":300}},
+                    {
+                        sorted: true,
+                        direction: "DESC",
+                        name: "ts",
+                        title: "Time",
+                        style: {"font-size": "11px", "width": 300, "maxWidth": 300},
+                        sortValue: function (val) { return Number(val.options.sortValue); }
+                    },
                     {name:"type", title:"Worker type", breakpoints:"xs sm", style:{"font-size":"11px", "width":150, "maxWidth":150}},
                     {name:"pid", title:"PID", breakpoints:"xs sm", style:{"font-size":"11px", "width":110, "maxWidth":110}},
                     {name:"module", title:"Module", style:{"font-size":"11px"}},


More information about the Commits mailing list