Ejemplo n.º 1
0
            $refresh = 1;
            // We want a refresh after X second
        } else {
            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 
Ejemplo n.º 2
0
            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();
Ejemplo n.º 3
0
    }
    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();
Ejemplo n.º 4
0
$pserver_base_url = $papi_details['protocol'] . '://' . $papi_details['server'] . ':' . $papi_details['port'] . '/' . $mirror . "_files/{$pid}/";
foreach ($package['files'] as $file) {
    if ($file['name'] == "MD5SUMS") {
        continue;
    }
    $names[] = sprintf('<a href="%s">%s</a>', $pserver_base_url . $file['name'], $file['name']);
    $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']);
}
Ejemplo n.º 5
0
$p->display();
require_once "modules/backuppc/includes/xmlrpc.php";
$response = get_share_names($_GET['host'], $_GET['backupnum']);
// Check if error occured
if ($response['err']) {
    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('&nbsp;', '%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";
?>
Ejemplo n.º 6
0
}

$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();

?>