Go to file
Thomas Lamprecht ffe41ad5e3 network edit: shorten and improve bridge vlan ID validator
This does a few things, but all affecting the same validator and there
would not be much value with separate commits, so just use one.

Namely:
- reduce code by a lot, mostly by having a explicit ordered if-else
  chain that avoids the need for some extra checks as further branches
  can assume that former did not evaluate to true, thus we cans safe
  the closure that checked invalidity for a range-atom.
  While this allows entering "useless" ranges like "2-2" it's not
  clear why that should be a disallowed range, it's perfectly clear
  about what it represents.
- use Number.isNaN to avoid oddities from global isNaN that MDN warns
  against [0]
- give explicit error messages for different failure cases like
  out-of-range or not-a-number
- place error messages under gettext, our translators frequently ask
  to avoid untranslatable literals.
- support the same lists as the backend does, i.e. allow multiple
  whitespace and comma and semicolon as separators.

[0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-16 16:30:30 +01:00
debian bump version to 4.3.0 2024-11-11 21:58:01 +01:00
src network edit: shorten and improve bridge vlan ID validator 2024-11-16 16:30:30 +01:00
.gitignore gitignore: add more build artefacts to ignore list 2024-04-21 09:56:55 +02:00
Makefile buildsys: improve DSC target & add sbuild convenience target 2023-05-25 10:15:11 +02:00