From 9189a6b5eac41dfb0654de56152ba5ebfd73a845 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Thu, 21 Dec 2023 03:37:52 +0200 Subject: [PATCH] luci-app-sshtunnel: hide Save and Apply buutons for non form pages Signed-off-by: Sergey Ponomarev (cherry picked from commit 61e166aa93b5aefbb362a9c438e7c70f41c57d4a) --- .../luci-static/resources/view/sshtunnel/ssh_hosts.js | 6 +++++- .../htdocs/luci-static/resources/view/sshtunnel/ssh_keys.js | 6 +++++- .../luci-static/resources/view/sshtunnel/ssh_servers.js | 2 +- .../luci-static/resources/view/sshtunnel/ssh_tunnels.js | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_hosts.js b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_hosts.js index b82eae2617..464451cb5d 100644 --- a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_hosts.js +++ b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_hosts.js @@ -6,6 +6,10 @@ return view.extend({ + handleSaveApply: null, + handleSave: null, + handleReset: null, + load: function () { return Promise.all([ fs.lines('/root/.ssh/known_hosts'), @@ -18,7 +22,7 @@ return view.extend({ var m, s, o; m = new form.Map('sshtunnel', _('SSH Tunnels'), - _('This configures SSH Tunnels') + _('This configures SSH Tunnels.') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') ); diff --git a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_keys.js b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_keys.js index adaa103597..02f478ba81 100644 --- a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_keys.js +++ b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_keys.js @@ -8,6 +8,10 @@ var allSshKeys = {}; var hasSshKeygen = false; return view.extend({ + handleSaveApply: null, + handleSave: null, + handleReset: null, + load: function () { return L.resolveDefault(fs.list('/root/.ssh/'), []).then(function (entries) { var tasks = [ @@ -33,7 +37,7 @@ return view.extend({ var m, s, o; m = new form.Map('sshtunnel', _('SSH Tunnels'), - _('This configures SSH Tunnels') + _('This configures SSH Tunnels.') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') ); diff --git a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_servers.js b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_servers.js index 74182c5cca..88c3692728 100644 --- a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_servers.js +++ b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_servers.js @@ -22,7 +22,7 @@ return view.extend({ var m, s, o; m = new form.Map('sshtunnel', _('SSH Tunnels'), - _('This configures SSH Tunnels') + _('This configures SSH Tunnels.') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') ); diff --git a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_tunnels.js b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_tunnels.js index 34fceab2f0..a594b29a95 100644 --- a/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_tunnels.js +++ b/applications/luci-app-sshtunnel/htdocs/luci-static/resources/view/sshtunnel/ssh_tunnels.js @@ -16,7 +16,7 @@ return view.extend({ var m, s, o; m = new form.Map('sshtunnel', _('SSH Tunnels'), - _('This configures SSH Tunnels') + _('This configures SSH Tunnels.') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') ); -- 2.30.2