]> git.proxmox.com Git - pmg-api.git/commit
fix #1976: optionally sort postfix queue result
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 28 May 2020 08:04:58 +0000 (10:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jun 2020 06:34:43 +0000 (08:34 +0200)
commita59427ae233d79274705827095b7c418537de6ec
tree247e067182bbe9a7df3ad6c606c8fec4da0cd6c4
parente97f0405f9b6b1dda1c927fb7ed505a6f541f73a
fix #1976: optionally sort postfix queue result

The PostfixMailQueue widget uses an Ext.data.BufferedStore, due to
the potential size of the resultset, which does only support remoteSorting [0]

By adding two optional parameters ('sortfield' and 'sortdir') we can use
them for sorting the mailq output accordingly.

The sorting is kept in PMG::API2::Postfix instead of PMG::Postfix, because
sorting (as opposed to filtering) needs to happen after the complete result
is known, and there is no gain in pushing it further down.

[0] only mentioned in the source-code - not in the referencedoc

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/API2/Postfix.pm