Esempio n. 1
0
            if ($dstatus['err'] == 0) {
                $status[] = '<img src="modules/msc/graph/images/status/success.png" alt=""/>';
            } else {
                $status[] = '<img src="modules/msc/graph/images/status/failed.png" alt=""/> ' . $dstatus['errtext'];
                $name = sprintf('<a href="#">%s</a>', $name);
            }
        }
        $names[] = $name;
    }
    $n = new OptimizedListInfos($names, _T("Destination", "backuppc"));
    $n->addExtraInfo($times, _T("Restore time", "backuppc"));
    $n->addExtraInfo($status, _T("Status", "backuppc"));
    $n->setCssClass("file");
    $filter1 = '';
    $n->setNavBar(new AjaxNavBar(0, $filter1));
    $n->setParamInfo($params);
    $n->addActionItemArray($actions);
    $n->start = 0;
    $n->end = 50;
    $n->setItemCount(count($names));
    $n->display();
}
print '</div>';
?>

<script type="text/javascript">
    function refresh() {
        jQuery('div#downloadTable').load("<?php 
echo 'main.php?module=backuppc&submod=backuppc&action=ajaxDownloadsTable&host=' . $host;
?>
");
Esempio n. 2
0
    $n = new OptimizedListInfos($name, _T('Group name', 'dyngroup'));
} else {
    // Imaging group
    $n = new OptimizedListInfos($name, _T('Group name', 'dyngroup'));
}
$n->setTableHeaderPadding(0);
$n->setItemCount($count);
$n->setNavBar(new AjaxNavBar($count, $filter));
$n->start = 0;
$n->end = $conf["global"]["maxperpage"];
if ($is_gp != 1) {
    // Simple group
    $n->addExtraInfo($type, _T('Type', 'dyngroup'));
}
$n->addExtraInfo($show, _T('Favourite', 'dyngroup'));
$n->setParamInfo($ids);
if ($is_gp != 1) {
    // Simple group
    $n->addActionItem(new ActionItem(_T("Display this group's content", 'dyngroup'), "display", "display", "id", "base", "computers"));
    if (in_array("inventory", $_SESSION["supportModList"])) {
        $n->addActionItem(new ActionItem(_T("Inventory on this group", "dyngroup"), "groupinvtabs", "inventory", "inventory", "base", "computers"));
    } else {
        # TODO implement the glpi inventory on groups
        #    $n->addActionItem(new ActionItem(_T("Inventory on this group", "dyngroup"),"groupglpitabs","inventory","inventory", "base", "computers"));
    }
    $n->addActionItem(new ActionItem(_T("Edit this group", 'dyngroup'), "computersgroupedit", "edit", "id", "base", "computers"));
    $n->addActionItem(new ActionItem(_T("Share this group", 'dyngroup'), "edit_share", "groupshare", "id", "base", "computers"));
    if (in_array("msc", $_SESSION["supportModList"])) {
        $n->addActionItem(new ActionItem(_T("Read log", "dyngroup"), "groupmsctabs", "logfile", "computer", "base", "computers", "grouptablogs"));
        $n->addActionItem(new ActionItem(_T("Software deployment on this group", "dyngroup"), "groupmsctabs", "install", "computer", "base", "computers"));
    }
Esempio n. 3
0
        $a_create[] = $script['fk_boot_service'] ? $bsCreatedAction : $createAction;
    } else {
        $url = '<img src="modules/imaging/graph/images/postinst-action-ro.png" style="vertical-align: middle" /> ';
        $a_edit[] = $emptyAction;
        $a_delete[] = $emptyAction;
        // Don't display "Create Boot Service" icon if a Boot Service already created
        // from this PostInstall entry
        $a_create[] = $script['fk_boot_service'] ? $bsCreatedAction : $createAction;
    }
    $a_label[] = sprintf("%s%s", $url, $script['default_name']);
    $a_desc[] = $script["default_desc"];
    $l_params = array();
    $l_params["itemid"] = $script['imaging_uuid'];
    $l_params["itemlabel"] = $script["default_name"];
    $list_params[] = $l_params;
}
// show scripts list
$l = new OptimizedListInfos($a_label, _T("Name", "imaging"));
$l->addExtraInfo($a_desc, _T("Description", "imaging"));
$l->setParamInfo($list_params);
$l->addActionItemArray($a_edit);
$l->addActionItem($a_create);
$l->addActionItem(new ActionItem(_T("Duplicate", "imaging"), "postinstall_duplicate", "duplicatescript", "image", "imaging", "manage"));
$l->addActionItemArray($a_delete);
$l->setTableHeaderPadding(19);
$l->disableFirstColumnActionLink();
$l->setItemCount($count);
$l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamformLevel2"));
$l->start = 0;
$l->end = $maxperpage;
$l->display();
Esempio n. 4
0
if (isset($_GET["start"])) {
    $start = $_GET["start"];
} else {
    $start = 0;
}
$params = array('min' => $start, 'max' => $start + $maxperpage, 'filters' => '');
if (isset($_GET["filter"]) && $_GET["filter"]) {
    $params['filters'] = $_GET["filter"];
}
extract(getLocationAll($params));
//  Listinfo params
$listinfoParams = array();
foreach ($data as $key => $row) {
    $listinfoParams[] = array('id' => $row['id'], 'Label' => $row['Label'], 'Labelval' => $row['Labelval'], 'parentId' => $row['parentId']);
}
if (!$count || $count <= 0) {
    print _T('No entry found', 'inventory');
    return;
}
$cols = listInfoFriendly($data);
$n = new OptimizedListInfos($cols['Labelval'], _T('Entity name', 'inventory'), '');
$n->first_elt_padding = '0';
$n->setParamInfo($listinfoParams);
$n->setItemCount($count);
$n->setNavBar(new AjaxNavBar($count, $status));
$n->start = 0;
$n->end = $maxperpage;
$n->addActionItem(new ActionItem(_T("Edit Entity", "inventory"), "EditEntity", "edit", "id", "base", "computers"));
$n->addActionItem(new ActionItem(_T("Edit Entity", "inventory"), "deleteEntity", "delete", "id", "base", "computers"));
$n->disableFirstColumnActionLink();
$n->display();