luci-app-sshtunnel: hide Save and Apply buutons for non form pages

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
This commit is contained in:
Sergey Ponomarev 2023-12-21 03:37:52 +02:00 committed by Paul Donald
parent 059850ba0c
commit 61e166aa93
4 changed files with 12 additions and 4 deletions

View file

@ -6,6 +6,10 @@
return view.extend({ return view.extend({
handleSaveApply: null,
handleSave: null,
handleReset: null,
load: function () { load: function () {
return Promise.all([ return Promise.all([
fs.lines('/root/.ssh/known_hosts'), fs.lines('/root/.ssh/known_hosts'),
@ -18,7 +22,7 @@ return view.extend({
var m, s, o; var m, s, o;
m = new form.Map('sshtunnel', _('SSH Tunnels'), m = new form.Map('sshtunnel', _('SSH Tunnels'),
_('This configures <a %s>SSH Tunnels</a>') _('This configures <a %s>SSH Tunnels</a>.')
.format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"')
); );

View file

@ -8,6 +8,10 @@ var allSshKeys = {};
var hasSshKeygen = false; var hasSshKeygen = false;
return view.extend({ return view.extend({
handleSaveApply: null,
handleSave: null,
handleReset: null,
load: function () { load: function () {
return L.resolveDefault(fs.list('/root/.ssh/'), []).then(function (entries) { return L.resolveDefault(fs.list('/root/.ssh/'), []).then(function (entries) {
var tasks = [ var tasks = [
@ -33,7 +37,7 @@ return view.extend({
var m, s, o; var m, s, o;
m = new form.Map('sshtunnel', _('SSH Tunnels'), m = new form.Map('sshtunnel', _('SSH Tunnels'),
_('This configures <a %s>SSH Tunnels</a>') _('This configures <a %s>SSH Tunnels</a>.')
.format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"')
); );

View file

@ -22,7 +22,7 @@ return view.extend({
var m, s, o; var m, s, o;
m = new form.Map('sshtunnel', _('SSH Tunnels'), m = new form.Map('sshtunnel', _('SSH Tunnels'),
_('This configures <a %s>SSH Tunnels</a>') _('This configures <a %s>SSH Tunnels</a>.')
.format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"')
); );

View file

@ -16,7 +16,7 @@ return view.extend({
var m, s, o; var m, s, o;
m = new form.Map('sshtunnel', _('SSH Tunnels'), m = new form.Map('sshtunnel', _('SSH Tunnels'),
_('This configures <a %s>SSH Tunnels</a>') _('This configures <a %s>SSH Tunnels</a>.')
.format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"') .format('href="https://openwrt.org/docs/guide-user/services/ssh/sshtunnel"')
); );