From f274d8aa1c0439c4247339bb26054f6e22ac160c Mon Sep 17 00:00:00 2001 From: Alvaro Ollero Date: Thu, 15 May 2025 18:42:15 +0200 Subject: [PATCH] luci-app-wol: Show powered off hosts in dropdown menu Signed-off-by: Alvaro Ollero --- .../htdocs/luci-static/resources/view/wol.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js b/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js index 17f7ee453f..29b0d305aa 100644 --- a/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js +++ b/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js @@ -57,6 +57,15 @@ return view.extend({ o.noaliases = true; o.noinactive = true; + uci.sections('etherwake', 'target', function(section) { + if (section.mac && section.name) { + // Create a host entry if it doesn't exist + if (!hosts[section.mac]) { + hosts[section.mac] = { name: section.name }; + } + } + }); + if (has_wol) o.depends('executable', '/usr/bin/etherwake'); } -- 2.30.2