luci-app-watchcat: use DynamicList for pinghosts
Some checks failed
LuCI repo CodeQL Analysis / Analyze JavaScript and JSON (javascript-typescript) (push) Has been cancelled

Switch to DynamicList to improve multi-host handling in the UI.

Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
This commit is contained in:
Ivan Diaz
2025-10-15 20:51:01 -05:00
committed by Paul Donald
parent 083176262c
commit 4c4b5c31bd

View File

@@ -56,16 +56,6 @@ return view.extend({
o.depends({ mode: "restart_iface" });
o.depends({ mode: "run_script" });
o.load = function(section_id) {
return (String(this.map.data.get('watchcat', section_id, 'pinghosts') || '')
.trim().split(/\s+/).filter(Boolean))
}
o.write = function(section_id, formvalue) {
this.map.data.set('watchcat', section_id, 'pinghosts',
(formvalue || []).map(v => String(v).trim()).filter(Boolean).join(' '))
}
o = s.taboption('general', form.ListValue, 'addressfamily',
_('Address family for pinging the host'));
o.default = 'any';