luci-mod-network: interfaces.js: avoid stray empty device uci sections
authorJo-Philipp Wich <jo@mein.io>
Sun, 5 Feb 2023 18:35:00 +0000 (19:35 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 3 Apr 2023 11:47:18 +0000 (13:47 +0200)
commit9fb65ea103c83e951aba054d587751cf5699f59c
tree0190d86a1cba58df3896a458e5e5363264a569ff
parentb4f8eb8660de0d5f6987fe43b660db9ac7d11b14
luci-mod-network: interfaces.js: avoid stray empty device uci sections

Ensure that just created uci device sections are removed if the edit
option modal is cancelled without saving. This prevents empty, but
harmless `config device` sections from being created on a subsequent
Save & Apply operation.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c13ef9406c9c2e12c28d2065b342444af5e27c0b)
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js