piler/webui/controller/health/worker.php
Janos SUTO b8891360cc Fixed some health issues during the refactoring
Signed-off-by: Janos SUTO <sj@acts.hu>
2020-03-14 13:19:47 +01:00

40 lines
874 B
PHP

<?php
class ControllerHealthWorker extends Controller {
private $error = [];
public function index(){
$this->id = "content";
$this->template = "health/worker.tpl";
$this->layout = "common/layout-empty";
$db_history = Registry::get('db_history');
$this->load->model('health/health');
$this->load->model('stat/counter');
if(ENABLE_SAAS == 1) {
$this->load->model('saas/customer');
}
$request = Registry::get('request');
$lang = Registry::get('language');
$db = Registry::get('db');
$db->select_db($db->database);
if(Registry::get('admin_user') != 1 && Registry::get('readonly_admin') != 1) {
die("go away");
}
$this->model_health_health->collect_data();
$this->data['health'] = $this->model_health_health->data;
$this->render();
}
}