mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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)
|
protected static function buildLink(array $data)
|
||||||
{
|
{
|
||||||
global $config;
|
|
||||||
|
|
||||||
// Get the linked agent and module Ids.
|
// Get the linked agent and module Ids.
|
||||||
$linkedModule = static::extractLinkedModule($data);
|
$linkedModule = static::extractLinkedModule($data);
|
||||||
$agentId = static::parseIntOr($linkedModule['agentId'], null);
|
$agentId = static::parseIntOr($linkedModule['agentId'], null);
|
||||||
$moduleId = static::parseIntOr($linkedModule['moduleId'], null);
|
$moduleId = static::parseIntOr($linkedModule['moduleId'], null);
|
||||||
|
|
||||||
$baseUrl = $config['homeurl'].'index.php';
|
$baseUrl = \ui_get_full_url('index.php');
|
||||||
|
|
||||||
return $baseUrl.'?'.http_build_query(
|
return $baseUrl.'?'.http_build_query(
|
||||||
[
|
[
|
||||||
|
@ -379,22 +379,22 @@ final class Group extends Item
|
|||||||
|
|
||||||
// Critical.
|
// Critical.
|
||||||
$html .= '<div style="'.$valueStyle.'background-color: #FC4444;">';
|
$html .= '<div style="'.$valueStyle.'background-color: #FC4444;">';
|
||||||
$html .= \number_format($agentStats['critical']).'%';
|
$html .= \number_format($agentStats['critical'], 2).'%';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= '<div style="'.$nameStyle.'">'.__('Critical').'</div>';
|
$html .= '<div style="'.$nameStyle.'">'.__('Critical').'</div>';
|
||||||
// Warning.
|
// Warning.
|
||||||
$html .= '<div style="'.$valueStyle.'background-color: #f8db3f;">';
|
$html .= '<div style="'.$valueStyle.'background-color: #f8db3f;">';
|
||||||
$html .= \number_format($agentStats['warning']).'%';
|
$html .= \number_format($agentStats['warning'], 2).'%';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= '<div style="'.$nameStyle.'">'.__('Warning').'</div>';
|
$html .= '<div style="'.$nameStyle.'">'.__('Warning').'</div>';
|
||||||
// Normal.
|
// Normal.
|
||||||
$html .= '<div style="'.$valueStyle.'background-color: #84b83c;">';
|
$html .= '<div style="'.$valueStyle.'background-color: #84b83c;">';
|
||||||
$html .= \number_format($agentStats['normal']).'%';
|
$html .= \number_format($agentStats['normal'], 2).'%';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= '<div style="'.$nameStyle.'">'.__('Normal').'</div>';
|
$html .= '<div style="'.$nameStyle.'">'.__('Normal').'</div>';
|
||||||
// Unknown.
|
// Unknown.
|
||||||
$html .= '<div style="'.$valueStyle.'background-color: #9d9ea0;">';
|
$html .= '<div style="'.$valueStyle.'background-color: #9d9ea0;">';
|
||||||
$html .= \number_format($agentStats['unknown']).'%';
|
$html .= \number_format($agentStats['unknown'], 2).'%';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= '<div style="'.$nameStyle.'">'.__('Unknown').'</div>';
|
$html .= '<div style="'.$nameStyle.'">'.__('Unknown').'</div>';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user