]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Fix legacy history
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 30 Mar 2017 10:22:22 +0000 (11:22 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 30 Mar 2017 10:23:13 +0000 (11:23 +0100)
Issue: #1564

interface/js/app/history.js

index 24fd7f98a958cde889d586964702f4177742f270..c04c004ea67beca6a1129ce99e829d6e631c4b55 100644 (file)
@@ -427,9 +427,17 @@ function($, _, Humanize) {
                     .map(function (d){ return d.data; });
                 if (neighbours_data.length > 0) {
                     var data = {};
-                    data.rows = [].concat.apply([], neighbours_data
-                        .map(function(e) {return e.rows;}));
-                    data.version = neighbours_data[0].version;
+                    if (neighbours_data[0].version) {
+                        data.rows = [].concat.apply([], neighbours_data
+                            .map(function (e) {
+                                return e.rows;
+                            }));
+                        data.version = neighbours_data[0].version;
+                    }
+                    else {
+                        // Legacy version
+                        data = [].concat.apply([], neighbours_data);
+                    }
 
                     var items = process_history_data(data);
                     ft.history = FooTable.init("#historyTable", {