getHeader(); $scripts = $header->getScripts(); $scripts->addFile('server_status_variables.js'); $scripts->addFile('jquery/jquery.tablesorter.js'); $scripts->addFile('server_status_sorter.js'); $response->addHTML('
' . __('Variable') . ' | '; $retval .= '' . __('Value') . ' | '; $retval .= '' . __('Description') . ' | '; $retval .= '
---|---|---|
'; $retval .= htmlspecialchars(str_replace('_', ' ', $name)); /* Fields containing % are calculated, they can not be described in MySQL documentation */ if (strpos($name, '%') === false) { $retval .= PMA_Util::showMySQLDocu( 'server-status-variables', 'server-status-variables', false, 'statvar_' . $name ); } $retval .= ' | '; $retval .= ''; if (isset($alerts[$name])) { if ($value > $alerts[$name]) { $retval .= ''; } else { $retval .= ''; } } if ('%' === substr($name, -1, 1)) { $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 0, 2)) . ' %'; } elseif (strpos($name, 'Uptime') !== false) { $retval .= htmlspecialchars( PMA_Util::timespanFormat($value) ); } elseif (is_numeric($value) && $value == (int) $value && $value > 1000) { $retval .= '' . htmlspecialchars(PMA_Util::formatNumber($value, 3, 1)); } elseif (is_numeric($value) && $value == (int) $value) { $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 3, 0)); } elseif (is_numeric($value)) { $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 3, 1)); } else { $retval .= htmlspecialchars($value); } if (isset($alerts[$name])) { $retval .= ''; } $retval .= ''; $retval .= ' '; $retval .= ' | '; $retval .= ''; if (isset($strShowStatus[$name])) { $retval .= $strShowStatus[$name]; } if (isset($ServerStatusData->links[$name])) { foreach ($ServerStatusData->links[$name] as $link_name => $link_url) { if ('doc' == $link_name) { $retval .= PMA_Util::showMySQLDocu($link_url, $link_url); } else { $retval .= ' ' . $link_name . ''; } } unset($link_url, $link_name); } $retval .= ' | '; $retval .= '