$nhead .= "' alt='graph'><img src='modules/inventory/img/graph.png'/></a>"; $head = $nhead; } else { $head = _T($head, 'inventory'); } if ($n == null) { $n = new OptimizedListInfos($vals, $head); } else { $n->addExtraInfo($vals, $head); } } } print "<div style=\"overflow: auto\">"; if ($n != null) { $n->addActionItem(new ActionItem(_T("View", "inventory"),"invtabs","display","inventory", "base", "computers")); $n->addActionItem(new ActionPopupItem(_T("Informations", "inventory"),"infos","info","inventory", "inventory", "inventory")); $n->setParamInfo($params); $n->setTableHeaderPadding(1); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter)); $n->start = 0; $n->end = $maxperpage; $n->display(); } print "</div>"; ?><a href='<?php echo urlStr("inventory/inventory/csv", array('table'=>$display, 'gid'=>$_GET["gid"], 'filter' => $_GET['filter'])) ?>'><img src='modules/inventory/graph/csv.png' alt='export csv'/></a><?php } ?>
if ($ret[$image['imaging_uuid']]) { $a_destroy[] = $showImAction; } else { $a_destroy[] = $destroyAction; } } } // show images list $l = new OptimizedListInfos($a_label, _T("Label", "imaging")); $l->setParamInfo($list_params); $l->addExtraInfo($a_desc, _T("Description", "imaging")); $l->addExtraInfo($a_date, _T("Created", "imaging")); $l->addExtraInfo($a_size, _T("Size (compressed)", "imaging")); $l->addExtraInfo($a_is_in_menu, _T("In default boot menu", "imaging")); $l->addActionItemArray($addActions); $l->addActionItem(new ActionPopupItem(_T("Create bootable iso", "imaging"), "master_iso", "backup", "master", "imaging", "manage")); $l->addActionItem(new ActionItem(_T("Edit image", "imaging"), "master_edit", "edit", "master", "imaging", "manage")); $process = xmlrpc_checkProcessCloneMasterToLocation("synch-masters"); if (count($process) > 0) { $l->addActionItem(new ActionItem(_T("copy master In progress", "imaging"), "synchromaster", "start", "master", "imaging", "manage")); } else { $l->addActionItem(new ActionItem(_T("Master Clone", "imaging"), "master_clone", "start", "master", "imaging", "manage")); } $l->addActionItemArray($a_destroy); $l->setTableHeaderPadding(1); $l->disableFirstColumnActionLink(); $l->setItemCount($count); $l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamformLevel2")); $l->start = 0; $l->end = $maxperpage; $l->display();
* * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/pkgs/includes/xmlrpc.php"; $packages = getAvailableAppstreamPackages(); if (!isset($packages['product'])) { return; } $packages = $packages['product']; $count = count($packages); $params = $labels = $durations = array(); foreach ($packages as $p) { $labels[] = $p['options']['package_label']; $durations[] = $p['expire_month']; $params[] = array('package_name' => $p['options']['package_name'], 'package_label' => $p['options']['package_label'], 'duration' => $p['expire_month'], 'id' => $p['id']); } print '<br/><h3>Available packages</h3>'; $n = new OptimizedListInfos($labels, _T("Package name", "pkgs")); $n->setCssClass("package"); $n->disableFirstColumnActionLink(); $n->addExtraInfo($durations, _T("Validity (months)", "pkgs")); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->setParamInfo($params); $n->start = 0; $n->end = $count - 1; $n->addActionItem(new ActionPopupItem(_T("Show mirrors", "pkgs"), "activateAppstreamFlow", "activate", "pkgs", "pkgs", "pkgs")); //print "<br/><br/><br/>"; // start display below the location bar, yes it's quiet ugly, so : FIXME ! $n->display();
* * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/pkgs/includes/xmlrpc.php"; $packages = getAvailableAppstreamPackages(); if (!isset($packages['product'])) { return; } $packages = $packages['product']; $count = count($packages); $params = $labels = $durations = array(); foreach ($packages as $p) { $labels[] = $p['options']['package_label']; $durations[] = $p['expire_month']; $params[] = array('package_name' => $p['options']['package_name'], 'package_label' => $p['options']['package_label'], 'duration' => $p['expire_month'], 'id' => $p['id']); } print '<br/><h3>Available packages</h3>'; $n = new OptimizedListInfos($labels, _T("Package name", "pkgs")); $n->setCssClass("package"); $n->disableFirstColumnActionLink(); $n->addExtraInfo($durations, _T("Validity (months)", "pkgs")); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->setParamInfo($params); $n->start = 0; $n->end = $count - 1; $n->addActionItem(new ActionPopupItem(_T("Activate this Appstream stream", "pkgs"), "activateAppstreamFlow", "activate", "pkgs", "pkgs", "pkgs")); //print "<br/><br/><br/>"; // start display below the location bar, yes it's quiet ugly, so : FIXME ! $n->display();
$n = new OptimizedListInfos($a_packages, _T("Package", "msc")); $n->addExtraInfo($a_description, _T("Description", "msc")); $n->addExtraInfo($a_pversions, _T("Version", "msc")); $n->addExtraInfo($a_sizes, _T("Package size", "msc")); if ($group != null) { $n->addExtraInfo($a_convergence_status, _T("Convergence", "msc")); } $n->setCssClasses($a_css); $n->setParamInfo($params); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter['filter'])); $n->setTableHeaderPadding(1); $n->disableFirstColumnActionLink(); $n->start = 0; $n->end = $count; $n->addActionItem(new ActionItem(_T("Advanced launch", "msc"), "start_adv_command", "advanced", "msc", "base", "computers")); $n->addActionItem(new ActionItem(_T("Direct launch", "msc"), "start_command", "start", "msc", "base", "computers")); if ($group != null) { $n->addActionItem($a_convergence_action); } //$n->addActionItem(new ActionPopupItem(_T("Details", "msc"), "package_detail", "detail", "msc", "base", "computers")); $n->display(); ?> <style> .primary_list { } .secondary_list { background-color: #e1e5e6 !important; } li.detail a { padding: 3px 0px 5px 20px; margin: 0 0px 0 0px;
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();
$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")); } if (in_array("update", $_SESSION["supportModList"])) { $n->addActionItem(new ActionItem(_T("Update on this group", "dyngroup"), "view_updates", "reload", "id", "base", "computers")); }
$params[] = array('p_api' => $_GET['p_api'], 'pid' => $_GET['pid'], 'filename' => $file['name'], 'delete_file' => 1); //$sizes[$i] = formatFileSize($sizes[$i]); $viewVersionsActions[] = $viewVersionsAction; $cssClasses[] = 'file'; } $count = count($names); $n = new OptimizedListInfos($names, _T('File', 'pkgs')); $n->disableFirstColumnActionLink(); //$n->addExtraInfo($sizes, _T("Size", "pkgs")); $n->setCssClass('file'); $n->setItemCount($count); $n->start = isset($_GET['start']) ? $_GET['start'] : 0; $n->end = 1000; $n->setParamInfo($params); // Setting url params $n->addActionItem(new ActionConfirmItem(_T("Delete file", 'pkgs'), "edit", "delete", "filename", "pkgs", "pkgs", _T('Are you sure you want to delete this file?', 'pkgs'))); /* ================= END FILE LIST ===================== */ addQuerySection($f, $package); // ========================================================================= // UPLOAD FORM // ========================================================================= if (isset($_SESSION['random_dir'])) { $upload_tmp_dir = sys_get_temp_dir(); delete_directory($upload_tmp_dir . '/' . $_SESSION['random_dir']); } $m = new MultiFileTpl2('filepackage'); _T("Click here to select files", "pkgs"); _T("Upload Queued Files", "pkgs"); // ========================================================================= $f->add(new TrFormElement("Files", $n, array())); $f->add(new TrFormElement("", $m, array()));
if (preg_match('@uuid([0-9]+)@i', $data['hosts'][$i], $matches) == 1) { $cn = getComputersName(array('uuid' => $matches[1])); if (count($cn)) { $cnames[$i] = sprintf('<a href="main.php?module=backuppc&submod=backuppc&action=hostStatus& cn=%s&objectUUID=UUID%s">%s</a>', $cn[0], $matches[1], $cn[0]); } $params[] = array('cn' => $cn[0], 'objectUUID' => 'UUID' . $matches[1]); } else { $params[] = array('cn' => $data['hosts'][$i]); } } $count = count($data['hosts']); $n = new OptimizedListInfos($cnames, _T("Host name", "backuppc")); $n->addExtraInfo($data['full'], _T("Full number", "backuppc")); $n->addExtraInfo($data['full_size'], _T("Full size (GB)", "backuppc")); $n->addExtraInfo($data['incr'], _T("incr. number", "backuppc")); $n->addExtraInfo($data['last_backup'], _T("Mast backup (days)", "backuppc")); $n->addExtraInfo($data['state'], _T("Current state", "backuppc")); $n->addExtraInfo($data['last_attempt'], _T("Last message", "backuppc")); $n->addActionItem(new ActionConfirmItem(_T("Unset backup", 'backuppc'), "index", "delete", "uuid", "backuppc", "backuppc", _T('Are you sure you want to unset backup for this computer?', 'backuppc'))); $n->setParamInfo($params); $n->setCssClass("machineName"); // CSS for icons $n->setItemCount($count); $filter1 = $_GET['location']; $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = isset($_GET['start']) ? $_GET['start'] : 0; $n->end = (isset($_GET['end']) ? $_GET['end'] : $maxperpage) - 1; print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display();
new NotifyWidgetFailure(nl2br($response['errtext'])); return; } $sharenames = $response['data']; $count = count($sharenames); $params = array(); for ($i = 0; $i < $count; $i++) { $params[] = array('host' => $_GET['host'], 'cn' => $_GET['cn'], 'backupnum' => $_GET['backupnum'], 'sharename' => str_replace(' ', '%20', htmlentities($sharenames[$i]))); } $n = new OptimizedListInfos($sharenames, _T("Folder", "backuppc")); $n->setCssClass("folder"); // CSS for icons $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = 0; $n->end = 50; $n->setParamInfo($params); // Setting url params $n->addActionItem(new ActionItem(_T("Browse", "backuppc"), "BrowseFiles", "display", "host", "backuppc", "backuppc")); print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display(); // Downloaded files table include "modules/backuppc/backuppc/ajaxDownloadsTable.php"; ?> <style> .noborder { border:0px solid blue; } </style>
$start = $_GET["start"]; } else { $start = 0; } $params = array('min' => $start, 'max' => $start + $maxperpage, 'filters' => array()); if (isset($_GET["filter"]) && $_GET["filter"]) { $params['like_filters']['name'] = $_GET["filter"]; } extract(getAllLocationsPowered($params)); if (!$count) { print _T('No entry found', 'glpi'); return; } // Listinfo params $listinfoParams = array(); foreach ($data as $row) { $listinfoParams[] = array('id' => $row['id']); } $cols = listInfoFriendly($data); $n = new OptimizedListInfos($cols['completename'], _T('Location name', 'glpi'), ''); $n->first_elt_padding = '0'; $n->addExtraInfo($cols['comment'], _T("Comment", "glpi")); $n->addActionItem(new ActionItem(_T("Edit location", "glpi"), "addLocation", "edit", "location", "base", "computers")); //$n->addActionItem(new ActionPopupItem(_T("Delete", "glpi"), "deleteLocation", "delete", "id", "base", "computers")); $n->setParamInfo($listinfoParams); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $status)); $n->start = 0; $n->end = $maxperpage; $n->disableFirstColumnActionLink(); $n->display();
if ($_GET['location']) { //$filter['packageapi'] = getPApiDetail(base64_decode($_GET['location'])); print ""; } if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 0; } $response = get_host_list($_GET['filter']); // Check if error occured if ($response['err']) { new NotifyWidgetFailure(nl2br($response['errtext'])); return; } $hosts = $response['data']; $count = count($hosts); //print($_GET["filter"]."="); //print($_GET["location"]); $n = new OptimizedListInfos($hosts, _T("Host name", "backuppc")); $n->setCssClass("machineName"); // CSS for icons $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = isset($_GET['start']) ? $_GET['start'] : 0; $n->end = isset($_GET['end']) ? $_GET['end'] : $maxperpage; $n->addActionItem(new ActionItem(_T("View", "backuppc"), "BrowseBackups", "display", "host", "backuppc", "backuppc")); $n->addActionItem(new ActionItem(_T("Edit config", "backuppc"), "edit", "edit", "host", "backuppc", "backuppc")); print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display();
$params[] = array('id' => $pid, 'type' => 1); // Delete and edit only for user defined profiles [id>=1000] //$editActions[] = ($pid<1000)? $emptyAction:$editAction; $delActions[] = $pid < 1000 ? $emptyAction : $delAction; } $profile_names = array_values($profile_names); if ($profile_names) { $count = count($profile_names); $n = new OptimizedListInfos($profile_names, _T("Schedule", "backuppc")); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = 0; $n->end = 50; $n->setParamInfo($params); // Setting url params $n->addActionItem($editAction); $n->addActionItemArray($delActions); $n->display(); } _T('Linux (User files)', 'backuppc'); _T('Linux (Whole / drive)', 'backuppc'); _T('Mac OS X (User files)', 'backuppc'); _T('Mac OS X (Whole / drive)', 'backuppc'); _T('Windows 7/Vista (User files)', 'backuppc'); _T('Windows 7/Vista (Whole C: Drive)', 'backuppc'); _T('Windows XP (User files)', 'backuppc'); _T('Windows XP (Whole C: Drive)', 'backuppc'); _T('Daytime', 'backuppc'); _T('Nightly', 'backuppc'); ?>
} $n = new OptimizedListInfos($times, _T("Backup time", "backuppc")); $n->addExtraInfo($types, _T("Type", "backuppc")); $n->addExtraInfo($durations, _T("Duration (min.)", "backuppc")); $n->addExtraInfo($xfer_errs, _T("Errors", "backuppc")); $n->addExtraInfo($total_file_count, _T("File count (new)", "backuppc")); $n->addExtraInfo($total_file_size, _T("Backup size (new) [Mb]", "backuppc")); $n->setCssClass("file"); // CSS for icons $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = 0; $n->end = 50; $n->setParamInfo($params); // Setting url params $n->addActionItem(new ActionItem(_T("Browse", "backuppc"), "BrowseShareNames", "display", "host", "backuppc", "backuppc")); $n->addActionItem(new ActionPopupItem(_T("View errors"), "viewXferLog", "file", "dir", "backuppc", "backuppc")); print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display(); } ?> <script type="text/javascript"> function refresh_status() { jQuery.get( "<?php echo 'main.php?module=backuppc&submod=backuppc&action=ajaxGetStatus&q=GET_STATUS&host=' . $_GET['objectUUID']; ?> ",
$start = $_GET["start"]; } else { $start = 0; } $params = array('min' => $start, 'max' => $start + $maxperpage, 'filters' => array()); if (isset($_GET["filter"]) && $_GET["filter"]) { $params['like_filters']['name'] = $_GET["filter"]; } extract(getAllEntitiesPowered($params)); if (!$count) { print _T('No entry found', 'glpi'); return; } // Listinfo params $listinfoParams = array(); foreach ($data as $row) { $listinfoParams[] = array('id' => $row['id']); } $cols = listInfoFriendly($data); $n = new OptimizedListInfos($cols['completename'], _T('Entity name', 'glpi'), ''); $n->first_elt_padding = '0'; $n->addExtraInfo($cols['comment'], _T("Comment", "glpi")); $n->addActionItem(new ActionItem(_T("Edit entity", "glpi"), "addEntity", "edit", "entity", "base", "computers")); //$n->addActionItem(new ActionPopupItem(_T("Delete", "glpi"), "deleteEntity", "delete", "id", "base", "computers")); $n->setParamInfo($listinfoParams); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $status)); $n->start = 0; $n->end = $maxperpage; $n->disableFirstColumnActionLink(); $n->display();
* MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/pkgs/includes/xmlrpc.php"; $packages = getActivatedAppstreamPackages(); $count = count($packages); $expiration_dates = $params = $labels = array(); foreach ($packages as $key => $data) { $labels[] = $data['label']; $expiration_dates[] = date('Y-m-d', $data['expiration_ts']); $params[] = array('package_name' => $key, 'id' => $data['id']); } print '<br/><h3>Activated packages</h3>'; $n = new OptimizedListInfos($labels, _T("Package name", "pkgs")); $n->setCssClass("package"); $n->disableFirstColumnActionLink(); $n->addExtraInfo($expiration_dates, _T("Expiration date", "pkgs")); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->setParamInfo($params); $n->start = 0; $n->end = 100; $n->addActionItem(new EmptyActionItem()); //print "<br/><br/><br/>"; // start display below the location bar, yes it's quiet ugly, so : FIXME ! $n->display();
} } } } // show images list $l = new OptimizedListInfos($a_label, _T("Label", "imaging")); $l->setParamInfo($list_params); $l->addExtraInfo($a_desc, _T("Description", "imaging")); $l->addExtraInfo($a_date, _T("Created", "imaging")); $l->addExtraInfo($a_size, _T("Size (compressed)", "imaging")); $l->addExtraInfo($a_inbootmenu, _T("In boot menu", "imaging")); if ($is_in_profile) { $l->addExtraInfo($a_fromprofile, _T("From profile", "imaging")); } $l->addActionItemArray($addActions); $l->addActionItem(new ActionPopupItem(_T("Create bootable iso", "imaging"), "images_iso", "backup", "image", "base", "computers")); // if not in boot menu if ($actions) { $l->addActionItem(new ActionItem(_T("Edit image", "imaging"), "imgtabs", "edit", "image", "base", "computers", $type . "tabimages", "edit")); $l->addActionItem($logAction); $l->addActionItem($destroyAction); } else { $l->addActionItemArray($editActions); $l->addActionItem($logAction); $l->addActionItemArray($a_destroy); } $l->disableFirstColumnActionLink(); $l->setItemCount($count); $l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamform" . ($actions ? 'image' : 'master'))); $l->start = 0; $l->end = $maxperpage;
new NotifyWidgetFailure(implode('<br/>', array_merge($err, array(_T("Please contact your administrator.", "msc"))))); } $n = new OptimizedListInfos($a_packages, _T("Package", "msc")); $n->addExtraInfo($a_pversions, _T("Version", "msc")); $n->addExtraInfo($a_sizes, _T("Package size", "msc")); $n->setCssClasses($a_css); $n->setParamInfo($params); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter['filter'])); $n->setTableHeaderPadding(1); $n->disableFirstColumnActionLink(); $n->start = 0; $n->end = $count; $n->addActionItem(new ActionItem(_T("Advanced launch", "msc"), "start_adv_command", "advanced", "msc", "base", "computers")); $n->addActionItem(new ActionItem(_T("Direct launch", "msc"), "start_command", "start", "msc", "base", "computers")); $n->addActionItem(new ActionPopupItem(_T("Details", "msc"), "package_detail", "detail", "msc", "base", "computers")); $n->display(); ?> <style> .primary_list { } .secondary_list { background-color: #e1e5e6 !important; } li.detail a { padding: 3px 0px 5px 20px; margin: 0 0px 0 0px;
} if (!empty($_GET['filter']) && stripos($cn, $_GET['filter']) === FALSE) { continue; } $cnames[] = $cnames_; $params[] = $param_; } $_SESSION['backup_hosts'] = array_combine($data['hosts'], $cnames); $count = count($data['hosts']); $n = new OptimizedListInfos($cnames, _T("Host name", "backuppc")); $n->addExtraInfo($data['full'], _T("Full number", "backuppc")); $n->addExtraInfo($data['full_size'], _T("Full size (GB)", "backuppc")); $n->addExtraInfo($data['incr'], _T("incr. number", "backuppc")); $n->addExtraInfo($data['last_backup'], _T("Last backup (days)", "backuppc")); $n->addExtraInfo($data['state'], _T("Current state", "backuppc")); $n->addExtraInfo($data['last_attempt'], _T("Last message", "backuppc")); $n->addActionItem(new ActionPopupItem(_T("Start backup"), "startBackup", "start", "host", "backuppc", "backuppc")); $n->addActionItem(new ActionPopupItem(_T("Stop backup"), "stopBackup", "stop", "host", "backuppc", "backuppc")); $n->addActionItem(new ActionPopupItem(_T("View errors"), "viewHostLog", "file", "host", "backuppc", "backuppc")); $n->addActionItem(new ActionConfirmItem(_T("Unset backup", 'backuppc'), "index", "delete", "uuid", "backuppc", "backuppc", _T('Are you sure you want to unset backup for this computer?', 'backuppc'))); $n->setParamInfo($params); $n->setCssClass("machineName"); // CSS for icons $n->setItemCount($count); $filter1 = $_GET['location']; $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = isset($_GET['start']) ? $_GET['start'] : 0; $n->end = (isset($_GET['end']) ? $_GET['end'] : $maxperpage) - 1; print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display();
if ($ret[$image['imaging_uuid']]) { $a_destroy[] = $showImAction; } else { $a_destroy[] = $destroyAction; } } } // show images list $l = new OptimizedListInfos($a_label, _T("Label", "imaging")); $l->setParamInfo($list_params); $l->addExtraInfo($a_desc, _T("Description", "imaging")); $l->addExtraInfo($a_date, _T("Created", "imaging")); $l->addExtraInfo($a_size, _T("Size (compressed)", "imaging")); $l->addExtraInfo($a_is_in_menu, _T("In default boot menu", "imaging")); $l->addActionItemArray($addActions); $l->addActionItem(new ActionPopupItem(_T("Create bootable iso", "imaging"), "master_iso", "backup", "master", "imaging", "manage")); $l->addActionItem(new ActionItem(_T("Edit image", "imaging"), "master_edit", "edit", "master", "imaging", "manage")); $l->addActionItemArray($a_destroy); $l->setTableHeaderPadding(1); $l->disableFirstColumnActionLink(); $l->setItemCount($count); $l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamformLevel2")); $l->start = 0; $l->end = $maxperpage; $l->display(); ?> <!-- inject styles --> <link rel="stylesheet" href="modules/imaging/graph/css/imaging.css" type="text/css" media="screen" />
$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();
// Update types strings $cols['type_str'] = array_map('getUpdateTypeLabel', $cols['type_id']); // Creating installed/total col $cols['targets'] = array(); for ($i = 0; $i < count($cols['total_targets']); $i++) { $cols['targets'][] = $cols['total_installed'][$i] . ' / ' . $cols['total_targets'][$i]; } // Printing selected updates form print '<form id="sel_updates_form">'; $n = new OptimizedListInfos($checkboxes, $check_all, '', '10px'); $n->first_elt_padding = '0'; $n->addExtraInfo($cols['title'], _T("Update title", "update")); $n->addExtraInfo($cols['uuid'], _T("UUID", "update")); $n->addExtraInfo($cols['type_str'], _T("Type", "update")); $n->addExtraInfo($cols['targets'], _T("Installed count", "update")); $n->addActionItem(new ActionPopupItem(_T("Enable", "update"), "enableUpdate", "enable", "id", "update", "update")); $n->addActionItem(new ActionPopupItem(_T("Disable", "update"), "disableUpdate", "disable", "id", "update", "update")); $n->setParamInfo($listinfoParams); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $status)); $n->start = 0; $n->end = $maxperpage; $n->disableFirstColumnActionLink(); $n->display(); // End selected updates form print '</form>'; ?> <input id="btnEnableUpdates" type="button" value="<?php print _T('Enable selected updates', 'update'); ?> " class="btnPrimary">
if ($licensescount > $p['licenses']) { // highlights the exceeded license count $tmp_licenses = '<font color="FF0000">' . $tmp_licenses . '</font>'; } } $licenses[] = $tmp_licenses; // #### end licenses #### $size[] = prettyOctetDisplay($p['size']); $params[] = array('p_api' => $_GET['location'], 'pid' => base64_encode($p['id'])); } } if ($err) { new NotifyWidgetFailure(implode('<br/>', array_merge($err, array(_T("Please contact your administrator.", "pkgs"))))); } $n = new OptimizedListInfos($names, _T("Package name", "pkgs")); $n->setCssClass("package"); $n->disableFirstColumnActionLink(); $n->addExtraInfo($desc, _T("Description", "pkgs")); $n->addExtraInfo($versions, _T("Version", "pkgs")); $n->addExtraInfo($licenses, _T("Licenses", "pkgs")); $n->addExtraInfo($size, _T("Package size", "pkgs")); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->setParamInfo($params); $n->start = 0; $n->end = $count; $n->addActionItem(new ActionItem(_T("Edit a bundle", "pkgs"), "editBundle", "edit", "pkgs", "pkgs", "pkgs")); $n->addActionItem(new ActionPopupItem(_T("Delete a package", "pkgs"), "deleteBundle", "delete", "pkgs", "pkgs", "pkgs")); print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display();
} extract(parse_file_rule($params)); if (!$count) { print _T('No entry found', 'inventory'); return; } // Listinfo params $listinfoParams = array(); foreach ($data as $row) { $listinfoParams[] = array('numRule' => $row['numRule'], 'entitie' => $row['entitie']); } $cols = listInfoFriendly($data); $n = new OptimizedListInfos($cols['numRule'], _T('Rule', 'inventory'), '', '10px'); $n->addExtraInfo($cols['actif'], _T('actif', 'inventory')); $n->addExtraInfo($cols['entitie'], _T('entitie', 'inventory')); $n->addExtraInfo($cols['aggregator'], _T('aggregator', 'inventory')); $n->addExtraInfo($cols['operand1'], _T('lvalue', 'inventory')); $n->addExtraInfo($cols['operator'], _T('operator', 'inventory')); $n->addExtraInfo($cols['operand2'], _T('rvalue', 'inventory')); $n->first_elt_padding = '0'; $n->addActionItem(new ActionItem(_T("Edit rule", "inventory"), "addEntityRule", "edit", "rule", "base", "computers")); $n->addActionItem(new ActionPopupItem(_T("Move rule up", "inventory"), "moveRuleUp", "up", "rule", "base", "computers")); $n->addActionItem(new ActionPopupItem(_T("Move rule down", "inventory"), "moveRuleDown", "down", "rule", "base", "computers")); $n->addActionItem(new ActionPopupItem(_T("Delete rule", "inventory"), "deleteEntityRule", "delete", "rule", "base", "computers")); $n->setParamInfo($listinfoParams); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $status)); $n->start = 0; $n->end = $maxperpage; $n->disableFirstColumnActionLink(); $n->display();
$times = array(); $count = count($backups); $params = array(); for ($i = 0; $i < $count; $i++) { $params[] = array('host' => $_GET['host'], 'backupnum' => $backups[$i]); preg_match("#.+ (.+)#", $bk_time[$i], $result); $time = time() - floatval($ages[$i]) * 24 * 60 * 60; $times[] = strftime(_T("%A, %B %e %Y", 'backuppc'), $time) . ' - ' . $result[1]; } $n = new OptimizedListInfos($times, _T("Backup#", "backuppc")); //$n->addExtraInfo($types, _T("Type", "backuppc")); $n->setCssClass("file"); // CSS for icons $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = 0; $n->end = 50; $n->setParamInfo($params); // Setting url params $n->addActionItem(new ActionItem(_T("View", "backuppc"), "BrowseShareNames", "display", "host", "backuppc", "backuppc")); print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display(); } // Downloaded files table include "modules/backuppc/backuppc/ajaxDownloadsTable.php"; ?> <style> .noborder { border:0px solid blue; } </style>
$assoc = new ActionItem(_T("Associate package", "pkgs"), "associate_files", "associate_files", "pkgs", "pkgs", "pkgs"); $assoc_list = array(); $desc = $params = $names = $versions = array(); foreach ($packages as $p) { $p = $p[0]; if ($p['why'] || $p['why'] == 'association') { $assoc_list[] = $assoc; } else { $assoc_list[] = $empty; } $names[] = $p['label']; $versions[] = $p['version']; $desc[] = $p['description']; $params[] = array('p_api' => $_GET['location'], 'pid' => base64_encode($p['id']), 'from' => 'pending', 'plabel' => base64_encode($p['label']), 'pversion' => base64_encode($p['version']), 'mode' => 'edit', 'why' => $p['why']); } $n = new OptimizedListInfos($names, _T("Package name", "pkgs")); $n->setCssClass("package"); $n->disableFirstColumnActionLink(); $n->addExtraInfo($desc, _T("Description", "pkgs")); $n->addExtraInfo($versions, _T("Version", "pkgs")); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->setParamInfo($params); $n->start = 0; $n->end = $count - 1; $n->addActionItem($assoc_list); $n->addActionItem(new ActionPopupItem(_T("Show mirrors", "pkgs"), "rsync", "info", "pkgs", "pkgs", "pkgs")); $n->addActionItem(new ActionPopupItem(_T("Delete a package", "pkgs"), "delete", "delete", "pkgs", "pkgs", "pkgs")); print "<br/><br/><br/>"; // start display below the location bar, yes it's quiet ugly, so : FIXME ! $n->display();