Beispiel #1
0
        $alert->deleteAlert($alertID);
        echo json_encode(array('success' => __('Successful alert deletion.')));
    } catch (\Exception $e) {
        http_response_code(500);
        echo json_encode(array('error' => $e->getMessage()));
    }
});
//Change
$f3->route(array('GET /remover-job/@jobID', 'POST /remover-job/@jobID'), function ($f3, $params) {
    global $Smarty;
    try {
        $jobs = new \Ramos\Zeus\Job();
        if (empty($params['jobID']) or !is_numeric($params['jobID'])) {
            throw new \Exception(__("Not found any job matching this parameters."));
        }
        $returnInfo = $jobs->removeJobController($params);
        $Smarty->assign('info', $returnInfo);
        $Smarty->assign('actualPage', "Remover Job | Zeus Monitor");
        $Smarty->assign('pageTitle', $title);
        $Smarty->display("remover-job.tpl");
    } catch (\Exception $e) {
        $Smarty->assign('alert', array('message' => $e->getMessage(), 'type' => 'error'));
        $Smarty->assign('pageTitle', 'Alerta | Zeus Monitor');
        $Smarty->display("alert.tpl");
    }
});
//Change
$f3->route(array('GET /listar-jobs/@jobID', 'GET /listar-jobs/@jobID', 'GET /listar-jobs/@jobID/run', 'GET /listar-jobs/@jobID/run/@runID'), function ($f3, $params) {
    global $Smarty;
    try {
        $jobs = new \Ramos\Zeus\Job();