diff --git a/simpleadmin/www/cgi-bin/get_uptime b/simpleadmin/www/cgi-bin/get_uptime new file mode 100644 index 0000000..e672e59 --- /dev/null +++ b/simpleadmin/www/cgi-bin/get_uptime @@ -0,0 +1,11 @@ +#!/bin/bash + +# Execute the uptime command and store the result +uptime_output=$(uptime) + +# Set header for plain text content +echo "Content-Type: text/plain" +echo "" + +# Output the uptime result +echo "$uptime_output" diff --git a/simpleadmin/www/deviceinfo.html b/simpleadmin/www/deviceinfo.html index 487c49e..35696b4 100644 --- a/simpleadmin/www/deviceinfo.html +++ b/simpleadmin/www/deviceinfo.html @@ -92,6 +92,10 @@ Firmware version + + Phone Number + + IMSI @@ -135,7 +139,7 @@ Simple Admin Version - SimpleAdminRev-Alpha-0.5 + SimpleAdminRev-Alpha-0.7 @@ -225,6 +229,7 @@ lanIp: "-", wwanIpv4: "-", wwanIpv6: "-", + phoneNumber: "Unknown", simpleAdminVersion: "-", atcmd: null, atCommandResponse: "", @@ -262,7 +267,7 @@ fetchATCommand() { this.atcmd = - 'AT+CGMI;+CGMM;+QGMR;+CIMI;+ICCID;+CGSN;+QMAP="LANIP";+QMAP="WWAN"'; + 'AT+CGMI;+CGMM;+QGMR;+CIMI;+ICCID;+CGSN;+QMAP="LANIP";+QMAP="WWAN";+CNUM'; this.isLoading = true; fetch( "/cgi-bin/get_atcommand?" + @@ -297,7 +302,13 @@ this.lanIp = lines[13].trim().split(",")[3]; this.wwanIpv4 = lines[15].trim().split(",")[4].replace(/"/g, ""); this.wwanIpv6 = lines[16].trim().split(",")[4].replace(/"/g, ""); - this.simpleAdminVersion = "SimpleAdminRev-Alpha-0.5"; + this.phoneNumber = lines[18].trim().split(",")[1].replace(/"/g, ""); + + if (this.phoneNumber === "") { + this.phoneNumber = "Unknown"; + } + + this.simpleAdminVersion = "SimpleAdminRev-Alpha-0.6"; this.isLoading = false; }, diff --git a/simpleadmin/www/index.html b/simpleadmin/www/index.html index bdfce77..5ee7d20 100644 --- a/simpleadmin/www/index.html +++ b/simpleadmin/www/index.html @@ -56,7 +56,7 @@ - -