예제 #1
0
function sort_criteria($fn)
{
    #  if ( $fn=='cpuhours_vs_groupname' ) return "ORDER BY cpuhours DESC";
    if (isset($_POST['order'])) {
        return "ORDER BY " . $_POST['order'] . " DESC";
    }
    if (xaxis($fn) == "institution") {
        return "ORDER BY institution";
    }
    return "";
}
예제 #2
0
파일: metrics.php 프로젝트: Norky/PBS-tools
function jobstats_output_bucketed_metric($name, $fn, $db, $system, $start_date, $end_date)
{
    if (isset($_POST[$fn . '_graph']) || isset($_POST[$fn . '_table']) || isset($_POST[$fn . '_xls']) || isset($_POST[$fn . '_ods'])) {
        echo "<H2>" . $name . "</H2>\n";
        if (isset($_POST[$fn . '_graph'])) {
            $result = get_bucketed_metric($db, $system, xaxis($fn), metric($fn), $start_date, $end_date);
            metric_as_graph($result, xaxis($fn), metric($fn), $system, $start_date, $end_date);
        }
        if (isset($_POST[$fn . '_table'])) {
            $result = get_bucketed_metric($db, $system, xaxis($fn), metric($fn), $start_date, $end_date);
            metric_as_table($result, xaxis($fn), metric($fn));
        }
        if (isset($_POST[$fn . '_xls'])) {
            $result = get_bucketed_metric($db, $system, xaxis($fn), metric($fn), $start_date, $end_date);
            metric_as_xls($result, xaxis($fn), metric($fn), $system, $start_date, $end_date);
        }
        if (isset($_POST[$fn . '_ods'])) {
            $result = get_bucketed_metric($db, $system, xaxis($fn), metric($fn), $start_date, $end_date);
            metric_as_ods($result, xaxis($fn), metric($fn), $system, $start_date, $end_date);
        }
    }
}
예제 #3
0
		xaxis_form_actions();

		break;
	case 'item_remove':
		item_remove();

		header("Location: xaxis_presets.php?action=edit&id=" . $_GET["xaxis_id"]);
		break;
	case 'item_edit':
		include_once(CACTI_BASE_PATH . "/include/top_header.php");

		item_edit();

		include_once(CACTI_BASE_PATH . "/include/bottom_footer.php");
		break;
	case 'edit':
		include_once(CACTI_BASE_PATH . "/include/top_header.php");

		xaxis_edit();

		include_once(CACTI_BASE_PATH . "/include/bottom_footer.php");
		break;
	default:
		include_once(CACTI_BASE_PATH . "/include/top_header.php");

		xaxis();

		include_once(CACTI_BASE_PATH . "/include/bottom_footer.php");
		break;
}