Visual Console Refactor: minor fixes

Former-commit-id: ddd06e0f0aa3bf473d370414378cbcc1034d3f93
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-25 10:57:25 +02:00
parent 260a149668
commit 7d95151a5b
8 changed files with 14 additions and 9 deletions

View File

@ -137,12 +137,12 @@ final class BarsGraph extends Item
global $config; global $config;
// Load side libraries. // Load side libraries.
include_once $config['homedir'].'/include/functions_ui.php';
include_once $config['homedir'].'/include/functions_visual_map.php'; include_once $config['homedir'].'/include/functions_visual_map.php';
include_once $config['homedir'].'/include/graphs/fgraph.php'; include_once $config['homedir'].'/include/graphs/fgraph.php';
if (is_metaconsole()) { if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php'); \enterprise_include_once('include/functions_metaconsole.php');
\enterprise_include_once('meta/include/functions_ui_meta.php');
} }
// Extract needed properties. // Extract needed properties.
@ -262,7 +262,12 @@ final class BarsGraph extends Item
$waterMark = [ $waterMark = [
'file' => $config['homedir'].'/images/logo_vertical_water.png', 'file' => $config['homedir'].'/images/logo_vertical_water.png',
'url' => \ui_get_full_url(false, false, false, false).'images/logo_vertical_water.png', 'url' => \ui_get_full_url(
'images/logo_vertical_water.png',
false,
false,
false
),
]; ];
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) { if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {

View File

@ -205,7 +205,6 @@ final class ColorCloud extends Item
include_once $config['homedir'].'/include/functions_modules.php'; include_once $config['homedir'].'/include/functions_modules.php';
if (is_metaconsole()) { if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php'); \enterprise_include_once('include/functions_metaconsole.php');
\enterprise_include_once('meta/include/functions_ui_meta.php');
} }
// Get the linked module Id. // Get the linked module Id.

View File

@ -101,6 +101,9 @@ final class DonutGraph extends Item
global $config; global $config;
include_once $config['homedir'].'/include/functions_visual_map.php'; include_once $config['homedir'].'/include/functions_visual_map.php';
include_once $config['homedir'].'/include/graphs/functions_d3.php'; include_once $config['homedir'].'/include/graphs/functions_d3.php';
if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php');
}
// Extract needed properties. // Extract needed properties.
$legendBackGroundColor = static::extractLegendBackgroundColor($data); $legendBackGroundColor = static::extractLegendBackgroundColor($data);

View File

@ -152,7 +152,6 @@ final class Group extends Item
include_once $config['homedir'].'/include/functions_users.php'; include_once $config['homedir'].'/include/functions_users.php';
if (is_metaconsole()) { if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php'); \enterprise_include_once('include/functions_metaconsole.php');
\enterprise_include_once('meta/include/functions_ui_meta.php');
} }
$groupId = static::extractGroupId($data); $groupId = static::extractGroupId($data);

View File

@ -166,7 +166,6 @@ final class ModuleGraph extends Item
include_once $config['homedir'].'/include/functions_modules.php'; include_once $config['homedir'].'/include/functions_modules.php';
if (is_metaconsole()) { if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php'); \enterprise_include_once('include/functions_metaconsole.php');
\enterprise_include_once('meta/include/functions_ui_meta.php');
} }
$imageOnly = false; $imageOnly = false;

View File

@ -187,7 +187,6 @@ final class Percentile extends Item
include_once $config['homedir'].'/include/functions_io.php'; include_once $config['homedir'].'/include/functions_io.php';
if (is_metaconsole()) { if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php'); \enterprise_include_once('include/functions_metaconsole.php');
\enterprise_include_once('meta/include/functions_ui_meta.php');
} }
// Get the linked module Id. // Get the linked module Id.

View File

@ -179,6 +179,9 @@ final class SimpleValue extends Item
// Load side libraries. // Load side libraries.
global $config; global $config;
include_once $config['homedir'].'/include/functions_visual_map.php'; include_once $config['homedir'].'/include/functions_visual_map.php';
if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php');
}
// Get the linked module Id. // Get the linked module Id.
$linkedModule = static::extractLinkedModule($data); $linkedModule = static::extractLinkedModule($data);

View File

@ -155,10 +155,8 @@ final class StaticGraph extends Item
include_once $config['homedir'].'/include/functions_io.php'; include_once $config['homedir'].'/include/functions_io.php';
include_once $config['homedir'].'/include/functions_visual_map.php'; include_once $config['homedir'].'/include/functions_visual_map.php';
include_once $config['homedir'].'/include/functions_modules.php'; include_once $config['homedir'].'/include/functions_modules.php';
\enterprise_include_once('godmode/agentes/module_manager.php');
if (is_metaconsole()) { if (is_metaconsole()) {
\enterprise_include_once('include/functions_metaconsole.php'); \enterprise_include_once('include/functions_metaconsole.php');
\enterprise_include_once('meta/include/functions_ui_meta.php');
} }
// Get the linked module Id. // Get the linked module Id.
@ -232,7 +230,7 @@ final class StaticGraph extends Item
if (!$isBooleanModule if (!$isBooleanModule
|| ($isBooleanModule && $showLastValueTooltip !== 'default') || ($isBooleanModule && $showLastValueTooltip !== 'default')
) { ) {
if (\is_numeric($value)) { if (is_numeric($value)) {
$imgTitle .= __('Last value: ').\remove_right_zeros($value); $imgTitle .= __('Last value: ').\remove_right_zeros($value);
} else { } else {
$imgTitle .= __('Last value: ').$value; $imgTitle .= __('Last value: ').$value;