Update summarydashboard and file url sql

This commit is contained in:
sas.fajri
2026-04-30 09:13:06 +07:00
parent 55553a06a0
commit 62254ff40c
5 changed files with 1112 additions and 9 deletions

View File

@@ -8,15 +8,35 @@ class Test extends MY_Controller
echo "Transaction API";
}
public function __construct()
{
parent::__construct();
$this->db_onedev = $this->load->database("onedev", true);
$this->db_log = $this->load->database("log", true);
$this->load->helper(array('form', 'url'));
}
/**
* Generic POST request function
public function __construct()
{
parent::__construct();
$this->db_onedev = $this->load->database("onedev", true);
$this->db_log = $this->load->database("log", true);
$this->load->helper(array('form', 'url'));
}
public function test_generate_dashboard_file()
{
$prm = $this->sys_input;
$mgmMcuID = isset($prm['Mgm_McuID']) ? intval($prm['Mgm_McuID']) : 0;
$publishedID = isset($prm['Published_McuDasboardID']) ? intval($prm['Published_McuDasboardID']) : 0;
$this->load->library('Mcudashboard');
$rtn = $this->mcudashboard->generate_dashboard_files($mgmMcuID, $publishedID);
if (!$rtn[0]) {
$this->sys_error($rtn[1]);
exit;
}
$this->sys_ok(array(
"total" => count($rtn[1]),
"records" => $rtn[1]
));
exit;
}
/**
* Generic POST request function
* @param string $url API endpoint URL
* @param array $data Request payload
* @param array $headers Custom headers (optional)