devsofttech_hms_ci4/app/Controllers/SystemOps.php
DevSoftTech Server eb81f1999f refactor: remove git-based update method, keep only direct GitHub deployment
- Remove 'Update HMS (Git)' button and related functionality
- Remove runUpdate() method from SystemOperations
- Remove update() controller method
- Remove /setting/admin/system-ops/update route
- Remove setup_git_config.sh (no longer needed)
- Keep 'Deploy from GitHub' button as the only update method
- Rationale: Direct GitHub deployment is more reliable and requires no git config

Result: Single, simpler deployment method that always works
2026-08-04 03:27:22 +05:30

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 updateDirect()
{
$ops = new SystemOperations();
$result = $ops->runUpdateDirect();
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);
}
}