'; $retval .= ''; $retval .= '
'; $retval .= ''; return $retval; } /** * Prints the suggestion links * * @param Object $ServerStatusData An instance of the PMA_ServerStatusData class * * @return string */ function PMA_getHtmlForLinkSuggestions($ServerStatusData) { $retval = '' . __('Related links:'); foreach ($ServerStatusData->links as $section_name => $section_links) { $retval .= ' '; $i=0; foreach ($section_links as $link_name => $link_url) { if ($i > 0) { $retval .= ', '; } if ('doc' == $link_name) { $retval .= PMA_Util::showMySQLDocu($link_url); } else { $retval .= '' . $link_name . ''; } $i++; } $retval .= ''; } unset($link_url, $link_name, $i); $retval .= '
'; $retval .= '' . __('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', 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 > 1000) { $retval .= '' . htmlspecialchars(PMA_Util::formatNumber($value, 3, 1)) . ''; } elseif (is_numeric($value)) { $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 3, 1)); } else { $retval .= htmlspecialchars($value); } if (isset($alerts[$name])) { $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); } else { $retval .= ' ' . $link_name . ''; } } unset($link_url, $link_name); } $retval .= ' | '; $retval .= '