Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/luci-base/htdocs/luci-static/resources/uci.js
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,8 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ {
window.setTimeout(try_confirm, 250);
else
return Promise.reject(rv);
} else {
document.dispatchEvent(new CustomEvent('uci-applied'));
Comment thread
systemcrash marked this conversation as resolved.
}

return rv;
Expand Down
4 changes: 4 additions & 0 deletions modules/luci-base/htdocs/luci-static/resources/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -3474,6 +3474,10 @@ var UITable = baseclass.extend(/** @lends LuCI.ui.table.prototype */ {
}
});

// Because the menu can depend on uci values, we need to flush the cache
// after uci mutations.
document.addEventListener('uci-applied', () => UIMenu.flushCache());

/**
* @class ui
* @memberof LuCI
Expand Down
2 changes: 1 addition & 1 deletion modules/luci-base/ucode/dispatcher.uc
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function build_pagetree() {
firstchild_ineligible: 'bool'
};

let files = glob('/usr/share/luci/menu.d/*.json', '/usr/lib/lua/luci/controller/*.lua', '/usr/lib/lua/luci/controller/*/*.lua');
let files = glob('/usr/share/luci/menu.d/*.json', '/etc/config/*', '/usr/lib/lua/luci/controller/*.lua', '/usr/lib/lua/luci/controller/*/*.lua');
let cachefile;

if (indexcache) {
Expand Down