Skip to content

Commit

Permalink
[sys-config] Show stats for log2ram
Browse files Browse the repository at this point in the history
  • Loading branch information
moodeaudio committed Oct 9, 2024
1 parent b38ff8b commit 434faa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions www/sys-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,11 @@
$autoClick = " onchange=\"autoClick('#btn-set-log2ram');\"";
$_select['log2ram_on'] .= "<input type=\"radio\" name=\"log2ram\" id=\"toggle-log2ram-1\" value=\"on\" " . (($_SESSION['log2ram'] == 'on') ? "checked=\"checked\"" : "") . $autoClick . ">\n";
$_select['log2ram_off'] .= "<input type=\"radio\" name=\"log2ram\" id=\"toggle-log2ram-2\" value=\"off\" " . (($_SESSION['log2ram'] == 'off') ? "checked=\"checked\"" : "") . $autoClick . ">\n";
if ($_SESSION['log2ram'] == 'on') {
$_log2ram_stats = sysCmd('df -hT | grep log2ram | awk \'{print "Usage: " $6 " | Size: " $3 " | Used: " $4 " | Free: " $5}\'')[0];
} else {
$_log2ram_stats = '';
}

$autoClick = " onchange=\"autoClick('#btn-set-debuglog');\"";
$_select['debuglog_on'] .= "<input type=\"radio\" name=\"debuglog\" id=\"toggle-debuglog-1\" value=\"1\" " . (($_SESSION['debuglog'] == 1) ? "checked=\"checked\"" : "") . $autoClick . ">\n";
Expand Down
1 change: 1 addition & 0 deletions www/templates/sys-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ <h1 class="sys-config">System</h1>
</div>
<button id="btn-set-log2ram" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_log2ram" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
<span class="config-help-static">
$_log2ram_stats<br>
Write logs to memory. Logs are flushed to disk once per day at 23:55:00 or whenever the system is restarted or shutdown.
</span>
</div>
Expand Down

0 comments on commit 434faa5

Please sign in to comment.