Fixed number_format in group stadistic
Former-commit-id: 7580be83cce0432ab68e3698813fd7eef079665a
This commit is contained in:
parent
61a0528717
commit
37d3737f82
|
@ -136,14 +136,12 @@ final class EventsHistory extends Item
|
|||
*/
|
||||
protected static function buildLink(array $data)
|
||||
{
|
||||
global $config;
|
||||
|
||||
// Get the linked agent and module Ids.
|
||||
$linkedModule = static::extractLinkedModule($data);
|
||||
$agentId = static::parseIntOr($linkedModule['agentId'], null);
|
||||
$moduleId = static::parseIntOr($linkedModule['moduleId'], null);
|
||||
|
||||
$baseUrl = $config['homeurl'].'index.php';
|
||||
$baseUrl = \ui_get_full_url('index.php');
|
||||
|
||||
return $baseUrl.'?'.http_build_query(
|
||||
[
|
||||
|
|
|
@ -379,22 +379,22 @@ final class Group extends Item
|
|||
|
||||
// Critical.
|
||||
$html .= '<div style="'.$valueStyle.'background-color: #FC4444;">';
|
||||
$html .= \number_format($agentStats['critical']).'%';
|
||||
$html .= \number_format($agentStats['critical'], 2).'%';
|
||||
$html .= '</div>';
|
||||
$html .= '<div style="'.$nameStyle.'">'.__('Critical').'</div>';
|
||||
// Warning.
|
||||
$html .= '<div style="'.$valueStyle.'background-color: #f8db3f;">';
|
||||
$html .= \number_format($agentStats['warning']).'%';
|
||||
$html .= \number_format($agentStats['warning'], 2).'%';
|
||||
$html .= '</div>';
|
||||
$html .= '<div style="'.$nameStyle.'">'.__('Warning').'</div>';
|
||||
// Normal.
|
||||
$html .= '<div style="'.$valueStyle.'background-color: #84b83c;">';
|
||||
$html .= \number_format($agentStats['normal']).'%';
|
||||
$html .= \number_format($agentStats['normal'], 2).'%';
|
||||
$html .= '</div>';
|
||||
$html .= '<div style="'.$nameStyle.'">'.__('Normal').'</div>';
|
||||
// Unknown.
|
||||
$html .= '<div style="'.$valueStyle.'background-color: #9d9ea0;">';
|
||||
$html .= \number_format($agentStats['unknown']).'%';
|
||||
$html .= \number_format($agentStats['unknown'], 2).'%';
|
||||
$html .= '</div>';
|
||||
$html .= '<div style="'.$nameStyle.'">'.__('Unknown').'</div>';
|
||||
|
||||
|
|
Loading…
Reference in New Issue