]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Fix sorting errors by date 3696/head
authormoisseev <moiseev@mezonplus.ru>
Fri, 2 Apr 2021 17:45:08 +0000 (20:45 +0300)
committermoisseev <moiseev@mezonplus.ru>
Fri, 2 Apr 2021 17:45:08 +0000 (20:45 +0300)
Fixes #2965
Submitted by: @z-jun

interface/js/app/history.js

index edf9e19cf6f3b72c8d5ee866100c4ba0c70c68c2..8feb527e1aa7cadb6a28a8dadeac9ce0d232ff9a 100644 (file)
@@ -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"}},