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:
parent
059850ba0c
commit
61e166aa93
4 changed files with 12 additions and 4 deletions
|
@ -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"')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -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"')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -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"')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -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"')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue