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 ""; }
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); } } }
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; }