The names of notification matchers and targets have to be safe IDs,
but only the name of webhook targets was checked in the UI, and that
without saying what is wrong. For all others, an invalid name, for
example one containing a space, was only rejected by the API with a
'parameter verification errors (400)' message, without saying which
characters are allowed.
Add a 'SafeId' vtype, which uses the existing safe ID regex and says
which characters are allowed, and use it for the names of matchers and
all target types.
Signed-off-by: Michal Fox <me@dualfroz.com>
Domains validated with the DNS challenge can have an alias, so that the
challenge record is created on another domain, which the
'_acme-challenge' record of the domain points to with a CNAME.
But the alias could only be set on the CLI, as the edit window only
kept an existing one in a hidden field. Show it as a text field for
domains with the DNS challenge type, like the plugin.
As a side effect, an existing alias is not kept anymore when switching
a domain to the HTTP challenge type with separate domain entries, like
it is done in Proxmox Mail Gateway, where it has no meaning.
Signed-off-by: Michal Fox <me@dualfroz.com>
The API only sets 'active' for active interfaces, so it is either 1 or
missing. As 1 compares neither greater nor less than undefined, sorting
by the 'Active' column kept the previous order. The same applies to the
'Autostart' and 'VLAN aware' columns.
Declare those fields as booleans, so that missing values get converted
to false and the interfaces can be sorted by them. The shown values do
not change, as missing values were already rendered as 'No'.
Signed-off-by: Michal Fox <me@dualfroz.com>
The interface list was sorted by comparing the names as plain strings,
so 'eno10' and 'eno11' came before 'eno2', and 'vmbr10' before 'vmbr2'.
Sort by name with a comparison that orders numbers in the names by
their value instead. Use the same sorter for the initial order of the
store and for the name column, so that the column header still shows
the initial sort order and the first click on it reverses it, like
before.
The 'Ports/Slaves' column uses the type as data index, so sorting by it
just sorted by type. Sort it by the shown ports or slaves instead, also
in natural order.
Signed-off-by: Michal Fox <me@dualfroz.com>
When an interface has an IPv6 address, the selector adds a separate
entry for it and takes the comment from the 'comments6' property.
The API never returns that property: since pve-common commit f2ac9dd
("fix #3153: INotify: adding comment of interface to inet6 section when
this is the only section") the parser merges the inet6 comments into
'comments'.
As a result, the comment of IPv6-only interfaces was dropped, and the
IPv6 entry of dual-stack interfaces had no comment at all, for example
when selecting corosync links or the Ceph networks.
Just keep the 'comments' value, which is already present on the record
or on its copy.
Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929140710.2823699-1-me@dualfroz.com