예제 #1
0
        $f->add(new TrFormElement($label, $decisionTpl));
    }
}
$f->pop();
$f->addButton("bpolicy", _T("Save"));
$f->display();
print '<br />';
// Rules list display
$ajax = new AjaxFilter(urlStrRedirect("shorewall/shorewall/ajax_" . $page));
$ajax->display();
$t = new TitleElement(_T("Port forwarding rules"), 2);
$t->display();
$ajax->displayDivToUpdate();
// Add rule form
print '<script type="text/javascript" src="modules/shorewall/includes/functions.js"></script><br />';
$t = new TitleElement(_T("Add port forwarding rule"), 2);
$t->display();
$f = new ValidatingForm(array("id" => "rule"));
$f->push(new Table());
$macros = getServices();
$services = array("", _T("Custom...")) + $macros;
$servicesVals = array("", "custom") + $macros;
$serviceTpl = new SelectItem("service", "toggleCustom");
$serviceTpl->setElements($services);
$serviceTpl->setElementsVal($servicesVals);
$f->add(new TrFormElement(_T("Service"), $serviceTpl));
$f->pop();
$customDiv = new Div(array("id" => "custom"));
$customDiv->setVisibility(false);
$f->push($customDiv);
$f->push(new Table());
예제 #2
0
파일: tabs.php 프로젝트: neoclust/mmc
                new NotifyWidgetFailure(sprintf(_T("Failed to reset synchronise state.", "imaging")));
            }
        }

        if ($ret['id'] == $SYNCHROSTATE_RUNNING) {
            $p = new PageGenerator(sprintf(_T("%s's profile imaging", 'imaging'), $group->getName()));
            $sidemenu->forceActiveItem("index");
            $p->setSideMenu($sidemenu);
            $p->display();
            $a_href_open = "<a href=''>";

            $msg = sprintf(_T("The synchro is currently running, please wait or reload the page %shere%s.<br/>", "imaging"), $a_href_open, '</a>');
            $t1 = new TitleElement($msg, 3);
            $t1->display();
            $msg = sprintf(_T("If the synchro runs since more than 5 minutes, please reset the synchro state of this computer's menu.", "imaging"));
            $t2 = new TitleElement($msg, 3);
            $t2->display();

            $f = new ValidatingForm();
            $f->add(new HiddenTpl("gid"),                    array("value" => $params['target_uuid'],            "hide" => True));
            $f->add(new HiddenTpl("groupname"),                    array("value" => $params['target_name'],            "hide" => True));
            $f->add(new HiddenTpl("type"),                           array("value" => $params['type'],                   "hide" => True));
            $f->addButton("bresetsynchrostate", _T("Reset Synchro state", "imaging"));
            $f->display();

        } else {
            # do nothing special if $SYNCHROSTATE_DONE
            $p = new TabbedPageGenerator();
            $sidemenu->forceActiveItem("list_profiles");
            $p->setSideMenu($sidemenu);
            global $stateid;
예제 #3
0
require "../../../includes/config.inc.php";
require "../../../includes/i18n.inc.php";
require "../../../includes/acl.inc.php";
require "../../../includes/session.inc.php";
require "../../../includes/PageGenerator.php";
require "../includes/includes.php";
require "../includes/xmlrpc.inc.php";
require "../includes/logs.inc.php";
$location = $_SESSION['imaging_location']['used'];
$maxperpage = $conf["global"]["maxperpage"];
$filter = empty($_GET["filter"]) ? '' : $_GET['filter'];
$start = empty($_GET["start"]) ? 0 : $_GET["start"];
$end = $start + $maxperpage;
list($count, $db_logs) = xmlrpc_getLogs4Location($location, $start, $end, $filter);
if ($count == 0) {
    $l = new TitleElement(_T("No log available.", "imaging"), 3);
    $l->display();
    return;
}
$logStates = array("unknown" => array(_T("Status unknow", "imaging"), 'black'), "boot" => array(_T("Boot", "imaging"), 'green'), "menu" => array(_T("Menu", "imaging"), 'green'), "restoration" => array(_T("Restoration", "imaging"), 'green'), "backup" => array(_T("Backup", "imaging"), 'green'), "postinstall" => array(_T("Post-imaging", "imaging"), 'green'), "error" => array(_T("Error", "imaging"), 'red'), "delete" => array(_T("Delete", "imaging"), 'orange'), "inventory" => array(_T("Inventory", "imaging"), 'orange'), "restore_in_progress" => array(_T("Restore in progress", "imaging"), 'orange'), "restore_done" => array(_T("Restore done", "imaging"), 'green'), "restore_failed" => array(_T("Restore failed", "imaging"), 'red'), "backup_in_progress" => array(_T("Backup in progress", "imaging"), 'orange'), "backup_done" => array(_T("Backup done", "imaging"), "green"), "backup_failed" => array(_T("Backup failed", "imaging"), "red"), "unknow" => array(_T("Status unknow", "imaging"), "black"));
$a_desc = array();
$a_states = array();
$a_level = array();
$a_date = array();
$a_target = array();
foreach ($db_logs as $log) {
    $params = array();
    $params["itemid"] = $log['imaging_uuid'];
    $params["uuid"] = $log['target']['uuid'];
    $params["hostname"] = $log['target']['name'];
    $list_params[] = $params;
예제 #4
0
파일: images.php 프로젝트: neoclust/mmc
/**
 * Display backup log of a Pulse 2 image
 */
function image_logs($itemid) {
    $t = new TitleElement(_T("Image backup logs", "imaging"));
    $t->display();
    $logs = xmlrpc_imageGetLogs($itemid);
    $logwidget = new ImageLogs($logs);
    $logwidget->display();
}