From 69580ef09cfb0f41fa50d3252f4a83cfb7f153b5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 3 Mar 2021 23:09:11 +0300 Subject: add server.py It runs a web server and imports the request handling classes from get.py directly, hence eliminating the performance culprit (which was the `import` processing for each request). --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 8c46b82..35d118e 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,7 @@ function set_top(data) { } function refresh_top() { - $.get('cgi-bin/get.sh?what=top', function(data) { + $.get('top', function(data) { set_top(JSON.parse(data)); }); } @@ -162,7 +162,7 @@ function set_users(data) { } function refresh_status() { - $.get('cgi-bin/get.sh?what=status', function(data) { + $.get('status', function(data) { data = JSON.parse(data); set_top(data['top']); set_hostname(data['hostname']); @@ -172,7 +172,7 @@ function refresh_status() { } function refresh_timers() { - $.get('cgi-bin/get.sh?what=timers', function(data) { + $.get('timers', function(data) { data = JSON.parse(data); set_system(data['system']); set_users(data['user']); -- cgit v1.2.3