From e6562e31855c36146e263e631e2674201718e8db Mon Sep 17 00:00:00 2001 From: wbudic Date: Mon, 13 Sep 2021 21:03:57 +1000 Subject: [PATCH] upd. --- Current Development Check List.md | 3 +++ htdocs/cgi-bin/stats.cgi | 20 ++++++-------------- scripted_sample_log_data_file.cnf | 23 +++++++++++++++++++++++ 3 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 scripted_sample_log_data_file.cnf diff --git a/Current Development Check List.md b/Current Development Check List.md index fb623d7..585b853 100644 --- a/Current Development Check List.md +++ b/Current Development Check List.md @@ -6,6 +6,9 @@ ### New Development v.2.3+ +* Search panel revisited. + * [ ] Search and previous view setup made fully session persisted. + * [ ] Provide button reset search. * ✔ Sums and dynamic calculations, interactions further to be refined. * Canceling submit, leaves the translated '**\n**' for transfer not reverted. * ✔ Setting should provide page color defaults in form of an hash. diff --git a/htdocs/cgi-bin/stats.cgi b/htdocs/cgi-bin/stats.cgi index 220df87..d800d65 100755 --- a/htdocs/cgi-bin/stats.cgi +++ b/htdocs/cgi-bin/stats.cgi @@ -28,7 +28,6 @@ my $sid = Settings::sid(); my $dbname = Settings::dbFile(); my $alias = Settings::alias(); - if(!$alias||!$dbname){ print $cgi->redirect("login_ctr.cgi?CGISESSID=$sid"); exit; @@ -133,10 +132,10 @@ $income = big_money(sprintf("%.2f",$income)); #So I use the inter processing module here for inxi. -- @wbudic my $buff = ""; my @cmd = ("/usr/bin/inxi", "-b", "-c0"); -my $uptime = `uptime -p`; -my @ht = split(m/\s/,`hostname -I`); +my $uptime = qx(uptime -p); +my @ht = split(m/\s/, qx(hostname -I)); my $hst = ""; - $hst = `hostname` . "($ht[0])" if (@ht); + $hst = qx(hostname) . "($ht[0])" if (@ht); #Gather into $buff @@ -156,7 +155,7 @@ my $log = "".$hardware_status.""."
\n".`df -h -l -x tmpfs`."

1000)) if !Settings::isProgressDB(); @@ -166,8 +165,8 @@ $processes =~ s/\s*0.00.*//gd; $processes =~ s/^\s+/ /gm; my $year =$today->year(); -my $IPPublic = `curl -s https://www.ifconfig.me`; -my $IPPrivate = `hostname -I`; $IPPrivate =~ s/\s/
/g; +my $IPPublic = qx(curl -s https://www.ifconfig.me); +my $IPPrivate = qx(hostname -I); $IPPrivate =~ s/\s/
/g; my $tbl = qq(
@@ -275,11 +274,4 @@ sub big_money { return $number; } -sub camm { - my $amm = sprintf("%.2f", shift @_); - # Add one comma each time through the do-nothing loop - 1 while $amm =~ s/^(-?\d+)(\d\d\d)/$1,$2/; -return $amm; -} - 1. \ No newline at end of file diff --git a/scripted_sample_log_data_file.cnf b/scripted_sample_log_data_file.cnf new file mode 100644 index 0000000..0b40f5f --- /dev/null +++ b/scripted_sample_log_data_file.cnf @@ -0,0 +1,23 @@ +!CNF2.2 +/** + A simple sample log file data entries file. In CNF format. +**/ + +< +01|Unspecified `For quick uncategorized entries. +09|Event `Event that occurred, meeting, historically important. +28|Personal `Personal log of historical importance, diary type. +32|Expense `Significant yearly expense. +35|Income `Significant yearly income. +>> + +################################################ +# CNF list type items are postfixed with '$$' +# List is obtained like: $cnf->list('LOG') +# +< +TED - What your doctor won’t disclose http://youtu.be/oxYU5GNngnk +>> + +<Gas Bottle Purchase>> +<> -- 2.34.1