prod_check.theme.inc in Production check & Production monitor 6
File
includes/prod_check.theme.inc
View source
<?php
function theme_prod_check_status_report($requirements) {
$i = 0;
$output = '<table class="system-status-report">';
foreach ($requirements as $requirement) {
if (empty($requirement['#type'])) {
$class = ++$i % 2 == 0 ? 'even' : 'odd';
$classes = array(
PROD_CHECK_REQUIREMENT_INFO => 'info',
PROD_CHECK_REQUIREMENT_OK => 'ok',
PROD_CHECK_REQUIREMENT_WARNING => 'warning',
PROD_CHECK_REQUIREMENT_ERROR => 'error',
);
$class = $classes[isset($requirement['severity']) ? (int) $requirement['severity'] : 0] . ' ' . $class;
if (!empty($requirement['description'])) {
$output .= '<tr class="' . $class . ' merge-down"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
$output .= '<tr class="' . $class . ' merge-up"><td colspan="2">' . $requirement['description'] . '</td></tr>';
}
else {
$output .= '<tr class="' . $class . '"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
}
}
}
$output .= '</table>';
return $output;
}
function theme_prod_check_dbstatus($title, $status, $details) {
$output = '';
$output .= '<h2>' . $title . '</h2>';
$output .= '<p>' . $status . '</p><p> </p>';
foreach ($details as $type) {
if ($type) {
$caption = '<h2>' . $type['title'] . '</h2>';
$output .= theme('table', $type['header'], $type['rows'], array(), $caption);
}
}
return $output;
}