Squashed 'luci-app-smartdns/' changes from 2d56f2a..416354b

416354b Add smartdns-ui optional selection for luci-app-smartdns in LuCI menu
2f35495 luci: fix missing `fs.exec_direct` method on some systems (#82)
1d80303 luci: adapt to smartdns-ui (#80)

git-subtree-dir: luci-app-smartdns
git-subtree-split: 416354bc696faf68730c10532ad24bceadfe4083
This commit is contained in:
bgme 2025-07-03 18:52:35 +00:00
parent e9b8416aed
commit 54d3a69d8f
4 changed files with 381 additions and 292 deletions

View file

@ -90,7 +90,7 @@ return view.extend({
var button = ev.target;
button.disabled = true;
button.textContent = _('Clear Logs...');
fs.exec_direct('/usr/libexec/smartdns-call', ['clear_log'])
fs.exec('/usr/libexec/smartdns-call', ['clear_log'])
.then(function () {
button.textContent = _('Logs cleared successfully!');
setTimeout(function () {
@ -114,9 +114,9 @@ return view.extend({
poll.add(L.bind(function () {
return fs.exec_direct('/usr/libexec/smartdns-call', ['tail'])
return fs.exec('/usr/libexec/smartdns-call', ['tail'])
.then(function (res) {
var log = E('pre', { 'wrap': 'pre' }, [res.trim() || _('Log is clean.')]);
var log = E('pre', { 'wrap': 'pre' }, [res.stdout.trim() || _('Log is clean.')]);
dom.content(log_textarea, log);
log.scrollTop = log.scrollHeight;