- Remove Restart Web, Restart PHP-FPM, Shutdown, Reboot buttons - Remove runServerAction() library method and action() controller - Remove /system-ops/action route (no longer needed) - Parse /proc/mdstat into structured array (name, level, health, drives) - Show each RAID array as a card with colored drive icons per-slot - Green drive = healthy, red = failed, blue = spare - Show rebuild progress bar when array is rebuilding - Internet status shown as colored badge with wifi icon - Services shown as colored badges (green=running, grey=other)
48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
use App\Controllers\BaseController;
|
|
use App\Libraries\SystemOperations;
|
|
|
|
class SystemOps extends BaseController
|
|
{
|
|
public function index(): string
|
|
{
|
|
$ops = new SystemOperations();
|
|
$data = [
|
|
'status' => $ops->collectStatus(),
|
|
'history' => $ops->getHistory(),
|
|
];
|
|
|
|
return view('Setting/Admin/system_ops', $data);
|
|
}
|
|
|
|
public function panel(): string
|
|
{
|
|
$ops = new SystemOperations();
|
|
$data = [
|
|
'status' => $ops->collectStatus(),
|
|
'history' => $ops->getHistory(),
|
|
];
|
|
|
|
return view('Setting/Admin/system_ops_panel', $data);
|
|
}
|
|
|
|
public function updateDirect()
|
|
{
|
|
$ops = new SystemOperations();
|
|
$result = $ops->runUpdateDirect();
|
|
|
|
return $this->response->setJSON($result);
|
|
}
|
|
|
|
public function diagnose()
|
|
{
|
|
$ops = new SystemOperations();
|
|
$diag = $ops->getGitDiagnosticsForWeb();
|
|
|
|
return $this->response->setJSON($diag);
|
|
}
|
|
}
|