- New /setting/admin/system-ops/diagnose endpoint - Shows git binary location, version, config values - Includes file permissions and directory checks - Displays actual git command outputs with exit codes - Provides troubleshooting commands for setup This helps debug git configuration issues without guessing
57 lines
1.3 KiB
PHP
57 lines
1.3 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 update()
|
|
{
|
|
$ops = new SystemOperations();
|
|
$result = $ops->runUpdate();
|
|
|
|
return $this->response->setJSON($result);
|
|
}
|
|
|
|
public function action()
|
|
{
|
|
$action = (string) $this->request->getPost('action');
|
|
$ops = new SystemOperations();
|
|
$result = $ops->runServerAction($action);
|
|
|
|
return $this->response->setJSON($result);
|
|
}
|
|
|
|
public function diagnose()
|
|
{
|
|
$ops = new SystemOperations();
|
|
$diag = $ops->getGitDiagnosticsForWeb();
|
|
|
|
return $this->response->setJSON($diag);
|
|
}
|
|
}
|