function background_process_overview_page in Background Process 6
Same name and namespace in other branches
- 7.2 background_process.admin.inc \background_process_overview_page()
- 7 background_process.admin.inc \background_process_overview_page()
Overview of background processes.
1 string reference to 'background_process_overview_page'
- background_process_menu in ./
background_process.module - Implements hook_menu().
File
- ./
background_process.admin.inc, line 123
Code
function background_process_overview_page() {
$processes = background_process_get_processes();
$data = array();
foreach ($processes as $process) {
$progress = progress_get_progress($process->handle);
$data[] = array(
$process->handle,
$process->callback,
$process->uid,
$process->service_host,
format_date((int) $process->start, 'custom', 'Y-m-d H:i:s'),
$progress ? sprintf("%.02f%%", $progress->progress * 100) : t('N/A'),
l(t('Unlock'), 'background-process/unlock/' . $process->handle, array(
'attributes' => array(
'class' => 'button-unlock',
),
'query' => drupal_get_destination(),
)),
);
}
$header = array(
'Handle',
'Callback',
'User',
'Host',
'Start time',
'Progress',
'',
);
$output = '';
$output .= theme('table', $header, $data, array(
'class' => 'background-process-overview',
));
return $output;
}