From 143eb24c24534ece72d15c4c92cd08c47c9a7f92 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 27 Oct 2016 15:24:55 -0500 Subject: [PATCH] Update ui.js Updates for changing/selecting telnet ports --- html/ui.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/html/ui.js b/html/ui.js index 67361c9..810d96a 100644 --- a/html/ui.js +++ b/html/ui.js @@ -302,6 +302,22 @@ function getWifiInfo() { function(s, st) { window.setTimeout(getWifiInfo, 1000); }); } +//===== Telnet info + +function showTelnetInfo(data) { + Object.keys(data).forEach(function(v) { + setEditToClick("telnet-"+v, data[v]); + }); + $("#telnet-spinner").setAttribute("hidden", ""); + $("#telnet-table").removeAttribute("hidden"); + currAp = data.ssid; +} + +function getTelnetInfo() { + ajaxJson('GET', "/telnet/info", showTelnetInfo, + function(s, st) { window.setTimeout(getTelnetInfo, 1000); }); +} + //===== System info function showSystemInfo(data) {