From e8e332fe013ee6e1f974fe25b4f81c2d5f075302 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 24 Apr 2020 15:57:55 +0200 Subject: [PATCH] MailTracker: do not search when not both datetime parameters are given in the gui, we always expect an end and starttime, the only case where we do not get this is when the fields are invalid, so bail out in that case instead of searching Signed-off-by: Dominik Csapak --- js/MailTracker.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/MailTracker.js b/js/MailTracker.js index cee7732..61b0b5e 100644 --- a/js/MailTracker.js +++ b/js/MailTracker.js @@ -49,6 +49,10 @@ Ext.define('PMG.MailTrackerFilter', { if (value) { param[name] = value; } }); + // there must always be a start and endtime, otherwise the field was invalid + if (!param.starttime || !param.endtime) { + return undefined; + } return param; }, @@ -260,6 +264,9 @@ Ext.define('PMG.MailTracker', { var filter = this.lookupReference('filter'); var status = this.lookupReference('status'); var params = filter.getFilterParams(); + if (params === undefined) { + return; // something went wrong with the filters bail out + } status.update(''); // clear status before load view.store.proxy.setExtraParams(params); view.store.proxy.setUrl('/api2/json/nodes/' + Proxmox.NodeName + '/tracker'); -- 2.39.2