function health_admin_dashboard_form in Health Status 7
Health dashboard with data from previous days.
1 string reference to 'health_admin_dashboard_form'
- health_menu in ./
health.module - Implements hook_menu().
File
- ./
health.admin.inc, line 78 - Contains admin forms.
Code
function health_admin_dashboard_form($form, &$form_state) {
$data = health_get_data();
$form['title'] = array(
'#markup' => '<h1>' . t('!site status', array(
'!site' => variable_get('site_name'),
)) . '</h1>',
);
if (!$data) {
// No monitors created yet, let them know.
$form['no_monitors'] = array(
'#markup' => t('You have not created any monitors yet. !help', array(
'!help' => l(t('View help'), "admin/help/health"),
)),
);
}
$monitors = health_get_monitors();
foreach ($data as $group => $results) {
// Create a fieldset for new groups.
$form['groups'][$group] = array(
'#type' => 'fieldset',
'#title' => $group,
'#collapsible' => TRUE,
);
$form['groups'][$group]['results'] = array(
'#theme' => 'table',
'#rows' => health_admin_dashboard_rows($monitors[$group], $results),
'#header' => health_admin_dashboard_headers(),
);
}
return $form;
}