function _hosting_task_log_table in Hostmaster (Aegir) 6
Display table containing the logged information for this task
1 call to _hosting_task_log_table()
- hosting_task_view in modules/
hosting/ task/ hosting_task.module - Implementation of hook_view().
File
- modules/
hosting/ task/ hosting_task.module, line 763 - Web server node type is defined here.
Code
function _hosting_task_log_table($vid) {
$result = db_query("SELECT * FROM {hosting_task_log} WHERE vid = %d ORDER BY lid", $vid);
if ($result) {
$header = array(
'data' => 'Log message',
);
while ($entry = db_fetch_object($result)) {
if (strlen($entry->message) > 300) {
$summary = "<span class='hosting-task-summary'>" . filter_xss(substr($entry->message, 0, 75), array()) . "... <a href='javascript:void(0)' class='hosting-summary-expand modalframe-exclude'>(" . t('Expand') . ')</a></span>';
$message = $summary . "<span class='hosting-task-full'>" . filter_xss($entry->message) . '</span>';
}
else {
$message = filter_xss($entry->message);
}
$row = array(
array(
'data' => $message,
'class' => 'hosting-status',
),
);
$rows[] = array(
'data' => $row,
'class' => _hosting_task_log_class($entry->type),
);
}
return theme("table", $header, (array) $rows, array(
'id' => 'hosting-task-log',
'class' => 'hosting-table',
));
}
return false;
}