From 5c79a227959769afa021c262c1204092daaf5db2 Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:07:31 -0500 Subject: [PATCH 1/9] Update index.html to add logout --- simpleadmin/www/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simpleadmin/www/index.html b/simpleadmin/www/index.html index 5da9ec7..05cd017 100644 --- a/simpleadmin/www/index.html +++ b/simpleadmin/www/index.html @@ -41,7 +41,8 @@ SMS TTL Changer OpenSpeedtest - Console + Console + Logout From 5ba4c6b71343a3faac7809d6a3cecd08e171e9bb Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:08:18 -0500 Subject: [PATCH 2/9] Update atcommander.html to add logout --- simpleadmin/www/atcommander.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simpleadmin/www/atcommander.html b/simpleadmin/www/atcommander.html index 5d75843..110f650 100644 --- a/simpleadmin/www/atcommander.html +++ b/simpleadmin/www/atcommander.html @@ -40,7 +40,8 @@ SMS TTL Changer OpenSpeedtest - Console + Console + Logout From b1e5a40085d20028a8ada052715919d65b7a60ca Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:08:51 -0500 Subject: [PATCH 3/9] Update bandlock.html to add logout --- simpleadmin/www/bandlock.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simpleadmin/www/bandlock.html b/simpleadmin/www/bandlock.html index b2501e3..a2416f9 100644 --- a/simpleadmin/www/bandlock.html +++ b/simpleadmin/www/bandlock.html @@ -49,7 +49,8 @@ SMS TTL Changer OpenSpeedtest - Console + Console + Logout From 0fe6326e2cb558bf0abeb41897f8e22f2a4ac851 Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:09:24 -0500 Subject: [PATCH 4/9] Update sms.html to add logout --- simpleadmin/www/sms.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simpleadmin/www/sms.html b/simpleadmin/www/sms.html index 2d56e5d..f534deb 100644 --- a/simpleadmin/www/sms.html +++ b/simpleadmin/www/sms.html @@ -41,7 +41,8 @@ SMS TTL Changer OpenSpeedtest - Console + Console + Logout From 1c0d097d8254bd5b2df230e9ce7dd71587ecd9c8 Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:10:35 -0500 Subject: [PATCH 5/9] Update ttl.html to add logout --- simpleadmin/www/ttl.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/simpleadmin/www/ttl.html b/simpleadmin/www/ttl.html index c4994af..6679c08 100644 --- a/simpleadmin/www/ttl.html +++ b/simpleadmin/www/ttl.html @@ -36,7 +36,8 @@ SMS TTL Changer OpenSpeedtest - Console + Console + Logout @@ -131,4 +132,4 @@ - \ No newline at end of file + From 1be4607d5d5af93d4efbdfb922a2da38efb4c5d4 Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:11:20 -0500 Subject: [PATCH 6/9] Update speedtest.html to add logout --- simpleadmin/www/speedtest.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simpleadmin/www/speedtest.html b/simpleadmin/www/speedtest.html index 798f364..10e3518 100644 --- a/simpleadmin/www/speedtest.html +++ b/simpleadmin/www/speedtest.html @@ -42,7 +42,8 @@ SMS TTL Changer OpenSpeedtest - Console + Console + Logout From a85a0b17f2979e85d020b0120a31edd1a8745fc4 Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:12:31 -0500 Subject: [PATCH 7/9] Create logout.html --- simpleadmin/www/logout.html | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 simpleadmin/www/logout.html diff --git a/simpleadmin/www/logout.html b/simpleadmin/www/logout.html new file mode 100644 index 0000000..3694591 --- /dev/null +++ b/simpleadmin/www/logout.html @@ -0,0 +1,55 @@ + + + + + + + + Simple Admin + + + + + + + + + + + + + + From 10d291151f8872fe5fe95da8f6f6619a7baf5804 Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 00:23:06 -0500 Subject: [PATCH 8/9] Update ttl.html to add logout --- simpleadmin/www/ttl.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simpleadmin/www/ttl.html b/simpleadmin/www/ttl.html index 6679c08..f0cbaa2 100644 --- a/simpleadmin/www/ttl.html +++ b/simpleadmin/www/ttl.html @@ -130,6 +130,5 @@ } } - - + From c646ce894572f55e1ecbb06a53b854a6c63e7fcf Mon Sep 17 00:00:00 2001 From: RouteTable Date: Fri, 19 Apr 2024 02:15:37 -0500 Subject: [PATCH 9/9] Fix for TTL status refresh after setting TTL Added a function to sleep for 1 second, and then a fetch to get_ttl to refresh the status --- simpleadmin/www/ttl.html | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/simpleadmin/www/ttl.html b/simpleadmin/www/ttl.html index f0cbaa2..31694ed 100644 --- a/simpleadmin/www/ttl.html +++ b/simpleadmin/www/ttl.html @@ -118,17 +118,28 @@ this.ttldata = data }); }, - setTTL() { + setTTL() { fetch('/cgi-bin/set_ttl?' + new URLSearchParams({ - ttlvalue: this.newTTL, - })) - .then((res) => res.json()) - .then((data) => { - this.ttldata = data - }) - } - } - } - + ttlvalue: this.newTTL, + })) + .then((res) => res.json()) + .then((data) => { + this.ttldata = data + }) + sleep(1000) + fetch('/cgi-bin/get_ttl_status') + .then((res) => res.json()) + .then((data) => { + this.ttldata = data + }); + } + } + function sleep(miliseconds) { + var currentTime = new Date().getTime(); + while (currentTime + miliseconds >= new Date().getTime()) { + } + } + } +