Exemplo n.º 1
0
} else {
    $assoc = False;
    $gid = quickGet('id');
    $imaging_server = quickGet('imaging_server');
    if (isset($gid) && $gid != '') {
        $assoc = xmlrpc_isProfileAssociatedToImagingServer($gid);
        if ($assoc) {
            $imaging_server = xmlrpc_get_profile_imaging_server($gid);
        }
    }
    if ($assoc || isset($imaging_server) && $imaging_server != '') {
        $params = array('type' => $type);
        $params['imaging_server'] = $imaging_server;
        $p = new TabbedPageGenerator();
        $p->setSideMenu($sidemenu);
        $p->addTop(sprintf(_T("Imaging group creation", "dyngroup"), $_GET['name']), "modules/dyngroup/dyngroup/header.php");
        /*
         * Commented tabs will be reactivated when dynamic imaging group
         * will be implemented
         */
        //$p->addTab("tabdyn", _T("Result imaging group", "dyngroup"), "", "modules/dyngroup/dyngroup/creator.php", $params);
        //$p->addTab("tabfromfile", _T("Static imaging group from import", "dyngroup"), "", "modules/dyngroup/dyngroup/import_from_file.php", $params);
        echo '<style type="text/css">';
        echo '.tabselector { display: none;}';
        echo '</style>';
        if (!isset($_GET['tab'])) {
            $params['tab'] = 'tabsta';
            header("Location: " . urlStrRedirect("imaging/manage/computersprofilecreator", $params));
        }
        $p->addTab("tabsta", _T("Static imaging group", "dyngroup"), "", "modules/dyngroup/dyngroup/add_groups.php", $params);
        $p->display();
Exemplo n.º 2
0
    $gid = "";
}
$p = new TabbedPageGenerator();
$p->setSideMenu($sidemenu);
if (isset($_SESSION['pull_targets']) && in_array($_GET['uuid'], $_SESSION['pull_targets'])) {
    if (hasCorrectAcl('base', 'computers', 'remove_from_pull')) {
        $remove_pull_id = uniqid();
        $_SESSION['remove_pull_id'] = $remove_pull_id;
        $p->setDescription(sprintf('%s <a class="btn btn-primary" href="%s">%s</a>', _T('This client has been registered in pull mode', 'inventory'), urlStrRedirect('base/computers/remove_from_pull', array('uuid' => $_GET['uuid'], 'remove_pull_id' => $remove_pull_id)), _T('Leave pull mode', 'inventory')));
    } else {
        $p->setDescription(sprintf('%s', _T('This client has been registered in pull mode', 'inventory')));
    }
}
$prefix = '';
if ($_GET['hostname'] != '') {
    $p->addTop(sprintf(_T("%s's inventory", 'inventory'), $_GET['hostname']), "modules/inventory/inventory/header.php");
} else {
    $p->addTop(sprintf(_T("%s's content inventory", 'inventory'), $groupname), "modules/inventory/inventory/header.php");
    $prefix = 'group';
}
// TODO get the list with trads from agent (conf file...)
$tab = 'Summary';
$i = 7;
$p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
$tab = 'Hardware';
$i = 0;
$p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
$tab = 'Storage';
$i = 8;
$p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
/* $tab = 'Bios';
Exemplo n.º 3
0
            $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;
            $stateid = $ret['id'];

            $params['groupname'] = $group->getName();
            $params['target_name'] = $params['groupname'];
            $p->addTop(sprintf(_T("%s's profile imaging", 'imaging'), $group->getName()),
                "modules/imaging/imaging/header.php");
            $p->addTab("grouptabbootmenu", _T("Boot menu", 'imaging'), _T("Current boot menu", "imaging"),
                "modules/imaging/imaging/bootmenu.php", $params);
            $p->addTab("grouptabimages", _T("Masters", 'imaging'), "",
                "modules/imaging/imaging/images.php", $params);
            $p->addTab("grouptabservices", _T("Boot services", 'imaging'), _T("Available boot menu services", "imaging"),
                "modules/imaging/imaging/services.php", $params);
            $p->addTab("grouptabimlogs", _T("Imaging log", 'imaging'), "",
                "modules/imaging/imaging/logs.php", $params);
            $p->addTab("grouptabconfigure", _T("Menu configuration", 'imaging'), "",
                "modules/imaging/imaging/configure.php", $params);
            $p->display();
        }
    }
} else {
    $p = new PageGenerator();
Exemplo n.º 4
0
        $p->addTab("tablaunch", _T("Launch Actions", 'msc'), "", "modules/msc/msc/launch.php", array('uuid'=>$machine->uuid, 'hostname'=>$machine->hostname));
        $p->addTab("tabbundle", _T("Launch Bundle", 'msc'), "", "modules/msc/msc/launch_bundle.php", array('uuid'=>$machine->uuid, 'hostname'=>$machine->hostname));
        $p->addTab("tablogs", _T("Logs", 'msc'), "", "modules/msc/msc/logs.php", array('uuid'=>$machine->uuid, 'hostname'=>$machine->hostname));
        $p->addTab("tabhistory", _T("History", 'msc'), "", "modules/msc/msc/history.php", array('uuid'=>$machine->uuid, 'hostname'=>$machine->hostname));
        $p->display();
    }
} elseif ($_GET['gid']) {
    $p = new TabbedPageGenerator();
    $p->setSideMenu($sidemenu);
    require("modules/dyngroup/includes/includes.php");
    $group = new Group($_GET['gid'], true, true);
    if ($group->exists == False) {
        $msc_host = new RenderedMSCGroupDontExists($_GET['gid']);
        $msc_host->headerDisplay();
    } else {
        $p->addTop(sprintf(_T("%s's group secure control", 'msc'), $group->getName()), "modules/msc/msc/header.php");
        if (!$group->all_params['ro']) {
            $p->addTab("grouptablaunch", _T("Launch Actions", 'msc'), "", "modules/msc/msc/launch.php", array('gid'=>$_GET['gid']));
            $p->addTab("grouptabbundle", _T("Launch Bundle", 'msc'), "", "modules/msc/msc/launch_bundle.php", array('gid'=>$_GET['gid']));
        }
        $p->addTab("grouptablogs", _T("Logs", 'msc'), "", "modules/msc/msc/logs.php", array('gid'=>$_GET['gid']));
        $p->addTab("grouptabhistory", _T("History", 'msc'), "", "modules/msc/msc/history.php", array('gid'=>$_GET['gid']));
    }
    $p->display();
} else {
    $p = new PageGenerator();
    $p->setSideMenu($sidemenu);
    $p->display();
    print _T("Not enough informations", "msc");
}
Exemplo n.º 5
0
        $cfg['BlackoutPeriods'][] = array('hourBegin' => hhmm2float($starthours[$i]), 'hourEnd' => hhmm2float($endhours[$i]), 'weekDays' => $daystring);
    }
    // Rsync and NmbLookup command lines
    $cfg['NmbLookupCmd'] = '/usr/bin/python /usr/bin/pulse2-uuid-resolver -A $host';
    $cfg['NmbLookupFindHostCmd'] = '/usr/bin/python /usr/bin/pulse2-uuid-resolver $host';
    $cfg['XferMethod'] = 'rsync';
    $cfg['RsyncClientCmd'] = '$sshPath -q -x -o StrictHostKeyChecking=no -l root $hostIP $rsyncPath $argList+';
    $cfg['RsyncClientRestoreCmd'] = '$sshPath -q -x -o StrictHostKeyChecking=no -l root $hostIP $rsyncPath $argList+';
    $cfg['PingCmd'] = '/bin/true';
    // Enable or disable backup
    $cfg['BackupsDisable'] = isset($_POST['active']) ? '0' : '1';
    set_host_config($_POST['host'], $cfg);
    new NotifyWidgetSuccess(_T('Configuration saved', 'backuppc'));
}
/*
 * Display right top shortcuts menu
 */
right_top_shortcuts_display();
// ==========================================================
// Tab generator
// ==========================================================
$p = new TabbedPageGenerator();
$p->addTop(sprintf(_T("%s's backup status", 'backuppc'), $computer_name), "modules/backuppc/backuppc/header.php");
// Adding tabs
$p->addTab("tab1", _T('Summary', 'backuppc'), "", "modules/backuppc/backuppc/hostSummary.php", array('objectUUID' => $uuid, 'cn' => $computer_name));
if (host_exists($uuid)) {
    $p->addTab("tab2", _T('Configuration', 'backuppc'), "", "modules/backuppc/backuppc/edit.php", array('objectUUID' => $uuid, 'cn' => $computer_name));
    $p->addTab("tab3", _T('File search', 'backuppc'), "", "modules/backuppc/backuppc/fileSearch.php", array('objectUUID' => $uuid, 'cn' => $computer_name));
}
$p->setSideMenu($sidemenu);
$p->display();
Exemplo n.º 6
0
    $glpi_link = sprintf('<a href="%s" target="new">GLPI</a>', $uri . str_replace('UUID', '', $uuid));
} else {
    $glpi_link = 'GLPI';
}
$p = new TabbedPageGenerator();
$p->setSideMenu($sidemenu);
if (isset($_SESSION['pull_targets']) && in_array($uuid, $_SESSION['pull_targets'])) {
    if (hasCorrectAcl('base', 'computers', 'remove_from_pull')) {
        $remove_pull_id = uniqid();
        $_SESSION['remove_pull_id'] = $remove_pull_id;
        $p->setDescription(sprintf('%s <a class="btn btn-primary" href="%s">%s</a>', _T('This client has been registered in pull mode', 'glpi'), urlStrRedirect('base/computers/remove_from_pull', array('uuid' => $uuid, 'remove_pull_id' => $remove_pull_id)), _T('Leave pull mode', 'glpi')));
    } else {
        $p->setDescription(sprintf('%s', _T('This client has been registered in pull mode', 'glpi')));
    }
}
$p->addTop(sprintf(_T("%s's inventory %s", "glpi"), $hostname, $glpi_link), "modules/glpi/glpi/header.php");
$i = 0;
// TODO get the list with trads from agent (conf file...)
$tabList = array('Summary' => _T('Summary', "glpi"), 'Hardware' => _T('Hardware', "glpi"), 'Storage' => _T('Storage', "glpi"), 'Network' => _T('Network', "glpi"), 'Softwares' => _T('Software', "glpi"), 'Administrative' => _T('Administrative', "glpi"), 'History' => _T('History', "glpi"), 'Antivirus' => _T('Antivirus', "glpi"));
foreach ($tabList as $tab => $str) {
    $p->addTab("tab{$i}", $str, "", "modules/glpi/glpi/view_part.php", array('hostname' => $hostname, 'uuid' => $uuid, 'part' => $tab));
    $i++;
}
$p->display();
if (isset($uuid)) {
    $f = new ValidatingForm();
    print "<br><br>";
    $result['xls_path'] = getReport($uuid, $_SESSION['lang']);
    $link = new SpanElement(sprintf('<br /><a class="btn btn-primary" href="%s">%s</a>&nbsp;&nbsp;', urlStrRedirect("base/computers/get_file", array('path' => $result['xls_path'])), _T("Get XLS Report", "glpi")));
    $f->add($link);
    $f->pop();
Exemplo n.º 7
0
require_once "modules/pulse2/includes/utilities.php";
$MMCApp =& MMCApp::getInstance();
$os_classes = get_os_classes();
right_top_shortcuts_display();
$params = array();
if (isset($_GET['gid'])) {
    $params['gid'] = $_GET['gid'];
    $p = new TabbedPageGenerator();
    $p->setSideMenu($sidemenu);
    require "modules/dyngroup/includes/includes.php";
    $group = new Group($_GET['gid'], true, true);
    if ($group->exists == False) {
        print _T("This group doesn't exist", "update");
    } else {
        $countTab = 1;
        $p->addTop(sprintf(_T("%s's group update manager", 'update'), $group->getName()), "modules/msc/msc/header.php");
        $p->addTab($countTab, _T('All updates', 'update'), "", "modules/update/update/viewUpdates.php", $params);
        # tabs for each os available for update_module
        foreach ($os_classes['data'] as $os) {
            $countTab++;
            $params['os_class_id'] = $os['id'];
            $p->addTab($countTab, _T($os['name'], 'update'), "", "modules/update/update/viewUpdates.php", $params);
        }
    }
    $p->display();
} else {
    $p = new PageGenerator();
    $p->setSideMenu($sidemenu);
    $p->display();
    print _T("Not enough information", "update");
}