function perfmon_page in Performance monitor 7
Page callback for run & review.
1 string reference to 'perfmon_page'
- perfmon_menu in ./
perfmon.module - Implements hook_menu().
File
- ./
perfmon.pages.inc, line 12 - @todo: Enter file description here. @todo: Add hook_help for all tests.
Code
function perfmon_page() {
$tests = array();
$output = array();
// Retrieve the testlist.
module_load_include('inc', 'perfmon');
$testlist = perfmon_get_testlist();
// Retrieve results from last run of the testlist.
$tests = perfmon_get_stored_results();
// Only users with the proper permission can run the testlist.
if (user_access('run performance monitor checks')) {
$output += drupal_get_form('perfmon_run_form', $tests);
}
if (!empty($tests)) {
// We have prior results, so display them.
$output['results'] = perfmon_reviewed($testlist, $tests);
}
else {
// If they haven't configured the site, prompt them to do so.
drupal_set_message(t('It appears this is your first time using the performance testlist.'));
}
return $output;
}