Add Current App Version by checking the current commit hash, also moved Database version on top with App Version in Debug

This commit is contained in:
johnnyq 2024-12-16 14:24:38 -05:00
parent 803704c1ed
commit 829ee37a53
1 changed files with 14 additions and 4 deletions

View File

@ -8,6 +8,9 @@ require_once "config.php";
$checks = [];
// Execute the git command to get the latest commit hash
$commitHash = exec('git log -1 --format=%H');
// Section: System Information
$systemInfo = [];
@ -316,10 +319,6 @@ if ($tablesResult) {
}
$tablesResult->free();
$databaseStats[] = [
'name' => 'Current Database Version',
'value' => CURRENT_DATABASE_VERSION,
];
$databaseStats[] = [
'name' => 'Total number of tables',
'value' => $totalTables,
@ -518,6 +517,17 @@ $mysqli->close();
</ul>
<hr>
<table class="table table-bordered mb-3">
<tr>
<td>Current App Version</td>
<th><?php echo $commitHash; ?></th>
</tr>
<tr>
<td>Current DB Version</td>
<th><?php echo CURRENT_DATABASE_VERSION; ?></th>
</tr>
</table>
<!-- System Information Table -->
<h3>System Information</h3>
<table class="table table-sm table-bordered">