diff options
Diffstat (limited to 'applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js')
-rw-r--r-- | applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js b/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js index 6ee712a0b7..fac6da51a2 100644 --- a/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js +++ b/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js @@ -8,12 +8,13 @@ return view.extend({ }, render: function() { var port = uci.get_first('ttyd', 'ttyd', 'port') || '7681', - ssl = uci.get_first('ttyd', 'ttyd', 'ssl') || '0'; + ssl = uci.get_first('ttyd', 'ttyd', 'ssl') || '0', + url = uci.get_first('ttyd', 'ttyd', 'url_override'); if (port === '0') return E('div', { class: 'alert-message warning' }, _('Random ttyd port (port=0) is not supported.<br />Change to a fixed port and try again.')); return E('iframe', { - src: (ssl === '1' ? 'https' : 'http') + '://' + window.location.hostname + ':' + port, + src: url || ((ssl === '1' ? 'https' : 'http') + '://' + window.location.hostname + ':' + port), style: 'width: 100%; min-height: 500px; border: none; border-radius: 3px; resize: vertical;' }); }, |