2012-07-06 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js, godmode/reporting/visual_console_builder.elements.php, include/functions_visual_map.php, include/ajax/visual_console_builder.ajax.php, include/functions_visual_map_editor.php: uploaded some fixes and changes for the visualmap, for example refactored some part of print the visualmap in operation. * include/functions_html.php: fixed when included from standarlone file from enterprise structure directory. * include/constants.php: added constants for avoid magic numbers into the code of Visualmaps. * include/graphs/functions_gd.php, include/functions.php, include/functions_io.php, include/functions_modules.php, include/functions_ui.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6747 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8bf7d40fc2
commit
a489b4800e
|
@ -1,3 +1,23 @@
|
||||||
|
2012-07-06 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/reporting/visual_console_builder.editor.js,
|
||||||
|
godmode/reporting/visual_console_builder.elements.php,
|
||||||
|
include/functions_visual_map.php,
|
||||||
|
include/ajax/visual_console_builder.ajax.php,
|
||||||
|
include/functions_visual_map_editor.php: uploaded some fixes and
|
||||||
|
changes for the visualmap, for example refactored some part of
|
||||||
|
print the visualmap in operation.
|
||||||
|
|
||||||
|
* include/functions_html.php: fixed when included from standarlone
|
||||||
|
file from enterprise structure directory.
|
||||||
|
|
||||||
|
* include/constants.php: added constants for avoid magic numbers
|
||||||
|
into the code of Visualmaps.
|
||||||
|
|
||||||
|
* include/graphs/functions_gd.php, include/functions.php,
|
||||||
|
include/functions_io.php, include/functions_modules.php,
|
||||||
|
include/functions_ui.php: cleaned source code style.
|
||||||
|
|
||||||
2012-07-06 Sergio Martin <sergio.martin@artica.es>
|
2012-07-06 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* pandoradb.sql
|
* pandoradb.sql
|
||||||
|
|
|
@ -49,7 +49,6 @@ function visual_map_main() {
|
||||||
draw_lines(lines, 'background', true);
|
draw_lines(lines, 'background', true);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function eventsTextAgent() {
|
function eventsTextAgent() {
|
||||||
|
@ -681,6 +680,10 @@ function hiddenFields(item) {
|
||||||
|
|
||||||
$("#module_graph_size_row").css('display', 'none');
|
$("#module_graph_size_row").css('display', 'none');
|
||||||
$("#module_graph_size_row." + item).css('display', '');
|
$("#module_graph_size_row." + item).css('display', '');
|
||||||
|
|
||||||
|
if (typeof(enterprise_hiddenFields) == 'function') {
|
||||||
|
enterprise_hiddenFields(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanFields() {
|
function cleanFields() {
|
||||||
|
|
|
@ -45,9 +45,6 @@ foreach ($all_images as $image_file) {
|
||||||
$images_list[$image_file] = $image_file;
|
$images_list[$image_file] = $image_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
$layoutDataTypes = visual_map_get_layout_data_types();
|
|
||||||
|
|
||||||
|
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
$table->head['icon'] = '';
|
$table->head['icon'] = '';
|
||||||
|
|
|
@ -499,6 +499,9 @@ switch ($action) {
|
||||||
|
|
||||||
echo json_encode($size);
|
echo json_encode($size);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
enterprise_hook("enterprise_visualmap_ajax");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* visual map element status check */
|
/* visual map element status check */
|
||||||
|
|
|
@ -131,4 +131,19 @@ define('PROCESS_VALUE_NONE', 0);
|
||||||
define('PROCESS_VALUE_MIN', 1);
|
define('PROCESS_VALUE_MIN', 1);
|
||||||
define('PROCESS_VALUE_MAX', 2);
|
define('PROCESS_VALUE_MAX', 2);
|
||||||
define('PROCESS_VALUE_AVG', 3);
|
define('PROCESS_VALUE_AVG', 3);
|
||||||
|
//Status
|
||||||
|
define('VISUAL_MAP_STATUS_CRITICAL_BAD', 1);
|
||||||
|
define('VISUAL_MAP_STATUS_CRITICAL_ALERT', 4);
|
||||||
|
define('VISUAL_MAP_STATUS_NORMAL', 0);
|
||||||
|
define('VISUAL_MAP_STATUS_WARNING', 2);
|
||||||
|
define('VISUAL_MAP_STATUS_UNKNOW', 3);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Service constants */
|
||||||
|
//Status
|
||||||
|
define('SERVICE_STATUS_UNKNOW', -1);
|
||||||
|
define('SERVICE_STATUS_NORMAL', 0);
|
||||||
|
define('SERVICE_STATUS_CRITICAL', 1);
|
||||||
|
define('SERVICE_STATUS_WARNING', 2);
|
||||||
?>
|
?>
|
|
@ -136,6 +136,7 @@ function safe_url_extraclean ($string, $default_string = '') {
|
||||||
*/
|
*/
|
||||||
function no_permission () {
|
function no_permission () {
|
||||||
require ("config.php");
|
require ("config.php");
|
||||||
|
|
||||||
echo "<h3 class='error'>".__('You don\'t have access')."</h3>";
|
echo "<h3 class='error'>".__('You don\'t have access')."</h3>";
|
||||||
echo html_print_image('images/noaccess.png', true, array("alt" => 'No access', "width" => '120')) . "<br /><br />";
|
echo html_print_image('images/noaccess.png', true, array("alt" => 'No access', "width" => '120')) . "<br /><br />";
|
||||||
echo "<table width=550>";
|
echo "<table width=550>";
|
||||||
|
@ -144,6 +145,7 @@ function no_permission () {
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<tr><td><td><td><td>";
|
echo "<tr><td><td><td><td>";
|
||||||
include "general/footer.php";
|
include "general/footer.php";
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,6 +157,7 @@ function no_permission () {
|
||||||
*/
|
*/
|
||||||
function unmanaged_error ($error = "") {
|
function unmanaged_error ($error = "") {
|
||||||
require_once ("config.php");
|
require_once ("config.php");
|
||||||
|
|
||||||
echo "<h3 class='error'>".__('Unmanaged error')."</h3>";
|
echo "<h3 class='error'>".__('Unmanaged error')."</h3>";
|
||||||
echo html_print_image('images/error.png', true, array("alt" => 'error')) . "<br /><br />";
|
echo html_print_image('images/error.png', true, array("alt" => 'error')) . "<br /><br />";
|
||||||
echo "<table width=550>";
|
echo "<table width=550>";
|
||||||
|
@ -165,6 +168,7 @@ function unmanaged_error ($error = "") {
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<tr><td><td><td><td>";
|
echo "<tr><td><td><td><td>";
|
||||||
include "general/footer.php";
|
include "general/footer.php";
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -656,6 +660,7 @@ function get_parameter_post ($name, $default = "") {
|
||||||
*/
|
*/
|
||||||
function get_alert_priority ($priority = 0) {
|
function get_alert_priority ($priority = 0) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
switch ($priority) {
|
switch ($priority) {
|
||||||
case 0:
|
case 0:
|
||||||
return __('Maintenance');
|
return __('Maintenance');
|
||||||
|
@ -679,6 +684,7 @@ function get_alert_priority ($priority = 0) {
|
||||||
return __('Major');
|
return __('Major');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,7 +703,8 @@ function get_alert_days ($row) {
|
||||||
|
|
||||||
if ($check == 7) {
|
if ($check == 7) {
|
||||||
return __('All');
|
return __('All');
|
||||||
} elseif ($check == 0) {
|
}
|
||||||
|
elseif ($check == 0) {
|
||||||
return __('None');
|
return __('None');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,12 +740,14 @@ function get_alert_days ($row) {
|
||||||
function get_alert_times ($row2) {
|
function get_alert_times ($row2) {
|
||||||
if ($row2["time_from"]) {
|
if ($row2["time_from"]) {
|
||||||
$time_from_table = $row2["time_from"];
|
$time_from_table = $row2["time_from"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$time_from_table = __('N/A');
|
$time_from_table = __('N/A');
|
||||||
}
|
}
|
||||||
if ($row2["time_to"]) {
|
if ($row2["time_to"]) {
|
||||||
$time_to_table = $row2["time_to"];
|
$time_to_table = $row2["time_to"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$time_to_table = __('N/A');
|
$time_to_table = __('N/A');
|
||||||
}
|
}
|
||||||
if ($time_to_table == $time_from_table)
|
if ($time_to_table == $time_from_table)
|
||||||
|
|
|
@ -28,6 +28,11 @@ if (!isset($config)) {
|
||||||
require_once(str_repeat("../", $i) . "config.php");
|
require_once(str_repeat("../", $i) . "config.php");
|
||||||
break; // Skip config.php loading after load the first one
|
break; // Skip config.php loading after load the first one
|
||||||
}
|
}
|
||||||
|
else if(file_exists(str_repeat("../", $i) . 'include/config.php')) {
|
||||||
|
//For path from the enterprise structure dirs.
|
||||||
|
require_once(str_repeat("../", $i) . "include/config.php");
|
||||||
|
break; // Skip config.php loading after load the first one
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,8 @@ function io_ascii_to_html($num) {
|
||||||
|
|
||||||
if ($num <= 15) {
|
if ($num <= 15) {
|
||||||
return "�".dechex($num).";";
|
return "�".dechex($num).";";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return "&#x".dechex($num).";";
|
return "&#x".dechex($num).";";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,23 +71,23 @@ function visual_map_print_item($layoutData) {
|
||||||
|
|
||||||
$status = visual_map_get_status_element($layoutData);
|
$status = visual_map_get_status_element($layoutData);
|
||||||
switch ($status) {
|
switch ($status) {
|
||||||
case 1:
|
case VISUAL_MAP_STATUS_CRITICAL_BAD:
|
||||||
//Critical (BAD)
|
//Critical (BAD)
|
||||||
$colorStatus = "#ff0000";
|
$colorStatus = "#ff0000";
|
||||||
break;
|
break;
|
||||||
case 4:
|
case VISUAL_MAP_STATUS_CRITICAL_ALERT:
|
||||||
//Critical (ALERT)
|
//Critical (ALERT)
|
||||||
$colorStatus = "#ff8800";
|
$colorStatus = "#ff8800";
|
||||||
break;
|
break;
|
||||||
case 0:
|
case VISUAL_MAP_STATUS_NORMAL:
|
||||||
//Normal (OK)
|
//Normal (OK)
|
||||||
$colorStatus = "#00ff00";
|
$colorStatus = "#00ff00";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case VISUAL_MAP_STATUS_WARNING:
|
||||||
//Warning
|
//Warning
|
||||||
$colorStatus = "#ffff00";
|
$colorStatus = "#ffff00";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case VISUAL_MAP_STATUS_UNKNOW:
|
||||||
default:
|
default:
|
||||||
//Unknown
|
//Unknown
|
||||||
// Default is Blue (Other)
|
// Default is Blue (Other)
|
||||||
|
@ -716,17 +716,17 @@ function visual_map_get_status_element($layoutData) {
|
||||||
else if ($layoutData['id_agent'] != 0) {
|
else if ($layoutData['id_agent'] != 0) {
|
||||||
$status = agents_get_status ($layoutData["id_agent"]);
|
$status = agents_get_status ($layoutData["id_agent"]);
|
||||||
if ($status == -1) // agents_get_status return -1 for unknown!
|
if ($status == -1) // agents_get_status return -1 for unknown!
|
||||||
$status = 3;
|
$status = VISUAL_MAP_STATUS_UNKNOW;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$status = 3;
|
$status = VISUAL_MAP_STATUS_UNKNOW;
|
||||||
$id_agent = 0;
|
$id_agent = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//If it's a graph, a progress bar or a data tag, ALWAYS report status OK
|
//If it's a graph, a progress bar or a data tag, ALWAYS report status OK
|
||||||
//(=0) to avoid confussions here.
|
//(=0) to avoid confussions here.
|
||||||
$status = 0;
|
$status = VISUAL_MAP_STATUS_NORMAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -742,6 +742,8 @@ function visual_map_get_status_element($layoutData) {
|
||||||
* @param bool $draw_lines
|
* @param bool $draw_lines
|
||||||
*/
|
*/
|
||||||
function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_lines = true, $width = null, $height = null, $home_url = '') {
|
function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_lines = true, $width = null, $height = null, $home_url = '') {
|
||||||
|
enterprise_include_once('include/functions_visual_map.php');
|
||||||
|
|
||||||
//TODO: USE THE SAME CODE THAT THE VISUAL MAP EDITOR
|
//TODO: USE THE SAME CODE THAT THE VISUAL MAP EDITOR
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -773,45 +775,51 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
style="z-index: 0; position:relative; width:'.$mapWidth.'px; height:'.$mapHeight.'px;">';
|
style="z-index: 0; position:relative; width:'.$mapWidth.'px; height:'.$mapHeight.'px;">';
|
||||||
echo "<img src='" . $backgroundImage . "' width='100%' height='100%' />";
|
echo "<img src='" . $backgroundImage . "' width='100%' height='100%' />";
|
||||||
$layout_datas = db_get_all_rows_field_filter ('tlayout_data', 'id_layout', $id_layout);
|
$layout_datas = db_get_all_rows_field_filter ('tlayout_data', 'id_layout', $id_layout);
|
||||||
|
if (empty($layout_datas))
|
||||||
|
$layout_datas = array();
|
||||||
$lines = array ();
|
$lines = array ();
|
||||||
|
|
||||||
if ($layout_datas !== false) {
|
|
||||||
foreach ($layout_datas as $layout_data) {
|
foreach ($layout_datas as $layout_data) {
|
||||||
$id_agent = 0;
|
switch ($layout_data['type']) {
|
||||||
$layout_data['label'] = io_safe_output($layout_data['label']);
|
case STATIC_GRAPH:
|
||||||
// ****************************************************************
|
case PERCENTILE_BAR:
|
||||||
// Get parent status (Could be an agent, module, map, others doesnt have parent info)
|
case MODULE_GRAPH:
|
||||||
// ****************************************************************
|
case SIMPLE_VALUE:
|
||||||
|
case SIMPLE_VALUE_MAX:
|
||||||
|
case SIMPLE_VALUE_MIN:
|
||||||
|
case SIMPLE_VALUE_AVG:
|
||||||
|
case PERCENTILE_BUBBLE:
|
||||||
// Pending delete and disable modules must be ignored
|
// Pending delete and disable modules must be ignored
|
||||||
$delete_pending_module = db_get_value ("delete_pending", "tagente_modulo", "id_agente_modulo", $layout_data["id_agente_modulo"]);
|
$delete_pending_module = db_get_value ("delete_pending",
|
||||||
$disabled_module = db_get_value ("disabled", "tagente_modulo", "id_agente_modulo", $layout_data["id_agente_modulo"]);
|
"tagente_modulo", "id_agente_modulo",
|
||||||
|
$layout_data["id_agente_modulo"]);
|
||||||
|
$disabled_module = db_get_value ("disabled", "tagente_modulo",
|
||||||
|
"id_agente_modulo", $layout_data["id_agente_modulo"]);
|
||||||
|
|
||||||
if ($delete_pending_module == 1 || $disabled_module == 1)
|
if ($delete_pending_module == 1 || $disabled_module == 1)
|
||||||
continue;
|
continue;
|
||||||
|
break;
|
||||||
|
case SERVICE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$id_agent = 0;
|
||||||
|
$layout_data['label'] = io_safe_output($layout_data['label']);
|
||||||
|
|
||||||
|
// *************************************************************
|
||||||
|
// Get parent status (Could be an agent, module, map,
|
||||||
|
// others doesnt have parent info)
|
||||||
|
// **************************************************************
|
||||||
|
|
||||||
if ($layout_data["parent_item"] != 0) {
|
if ($layout_data["parent_item"] != 0) {
|
||||||
$id_agent_module_parent = db_get_value ("id_agente_modulo", "tlayout_data", "id", $layout_data["parent_item"]);
|
$id_agent_module_parent = db_get_value ("id_agente_modulo", "tlayout_data", "id", $layout_data["parent_item"]);
|
||||||
$id_agent_parent = db_get_value ("id_agent", "tlayout_data", "id", $layout_data["parent_item"]);
|
|
||||||
$id_layout_linked = db_get_value ("id_layout_linked", "tlayout_data", "id", $layout_data["parent_item"]);
|
|
||||||
|
|
||||||
// Module
|
$layout_data_parent = db_get_row_filter('tlayout_data',
|
||||||
if ($id_agent_module_parent != 0) {
|
array('id' => $layout_data["parent_item"]));
|
||||||
$status_parent = modules_get_agentmodule_status ($id_agent_module_parent);
|
|
||||||
// Agent
|
|
||||||
}
|
|
||||||
elseif ($id_agent_parent != 0) {
|
|
||||||
$status_parent = agents_get_status ($id_agent_parent);
|
|
||||||
}
|
|
||||||
// Another layout/map
|
|
||||||
elseif ($id_layout_linked != 0) {
|
|
||||||
$status_parent = visual_map_get_layout_status ($id_layout_linked);
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
$status_parent = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$status_parent = visual_map_get_status_element($layout_data_parent);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$id_agent_module_parent = 0;
|
$id_agent_module_parent = 0;
|
||||||
|
@ -822,55 +830,44 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
// ****************************************************************
|
// ****************************************************************
|
||||||
// Get STATUS of current object
|
// Get STATUS of current object
|
||||||
// ****************************************************************
|
// ****************************************************************
|
||||||
|
$status = visual_map_get_status_element($layout_data);
|
||||||
|
|
||||||
// Linked to other layout ?? - Only if not module defined
|
|
||||||
if ($layout_data['id_layout_linked'] != 0) {
|
|
||||||
$status = visual_map_get_layout_status ($layout_data['id_layout_linked']);
|
|
||||||
|
|
||||||
// Single object
|
switch ($status) {
|
||||||
}
|
case VISUAL_MAP_STATUS_CRITICAL_BAD:
|
||||||
elseif (($layout_data["type"] == 0)
|
//Critical (BAD)
|
||||||
|| ($layout_data["type"] == 3)
|
$colorStatus = "#ff0000";
|
||||||
|| ($layout_data["type"] == 9)
|
break;
|
||||||
|| ($layout_data["type"] == 4)) {
|
case VISUAL_MAP_STATUS_CRITICAL_ALERT:
|
||||||
// Status for a simple module
|
//Critical (ALERT)
|
||||||
if ($layout_data['id_agente_modulo'] != 0) {
|
$colorStatus = "#ff8800";
|
||||||
$status = modules_get_agentmodule_status ($layout_data['id_agente_modulo']);
|
break;
|
||||||
$id_agent = db_get_value ("id_agente", "tagente_estado", "id_agente_modulo", $layout_data['id_agente_modulo']);
|
case VISUAL_MAP_STATUS_NORMAL:
|
||||||
|
//Normal (OK)
|
||||||
// Status for a whole agent, if agente_modulo was == 0
|
$colorStatus = "#00ff00";
|
||||||
}
|
break;
|
||||||
elseif ($layout_data['id_agent'] != 0) {
|
case VISUAL_MAP_STATUS_WARNING:
|
||||||
$status = agents_get_status ($layout_data["id_agent"]);
|
//Warning
|
||||||
if ($status == -1) // agents_get_status return -1 for unknown!
|
$colorStatus = "#ffff00";
|
||||||
$status = 3;
|
break;
|
||||||
$id_agent = $layout_data["id_agent"];
|
case VISUAL_MAP_STATUS_UNKNOW:
|
||||||
}
|
default:
|
||||||
else {
|
//Unknown
|
||||||
$status = 3;
|
$colorStatus = "#5A5AFF";
|
||||||
$id_agent = 0;
|
// Default is Grey (Other)
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
else {
|
|
||||||
// If it's a graph, a progress bar or a data tag, ALWAYS report
|
|
||||||
// status OK (=0) to avoid confussions here.
|
|
||||||
$status = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************
|
switch ($layout_data['type']) {
|
||||||
// STATIC IMAGE (type = 0)
|
case STATIC_GRAPH:
|
||||||
// ****************************************************************
|
if ($status == VISUAL_MAP_STATUS_CRITICAL_BAD)
|
||||||
if ($layout_data['type'] == 0) {
|
|
||||||
// Link image
|
|
||||||
//index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1
|
|
||||||
if ($status == 0) // Bad monitor
|
|
||||||
$z_index = 3;
|
$z_index = 3;
|
||||||
elseif ($status == 2) // Warning
|
elseif ($status == VISUAL_MAP_STATUS_WARNING)
|
||||||
$z_index = 2;
|
$z_index = 2;
|
||||||
elseif ($status == 4) // Alert
|
elseif ($status == VISUAL_MAP_STATUS_CRITICAL_ALERT)
|
||||||
$z_index = 4;
|
$z_index = 4;
|
||||||
else
|
else
|
||||||
$z_index = 1; // Print BAD over good
|
$z_index = 1;
|
||||||
|
|
||||||
// Draw image
|
// Draw image
|
||||||
if ($resizedMap)
|
if ($resizedMap)
|
||||||
|
@ -878,10 +875,8 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
else
|
else
|
||||||
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.$layout_data['pos_x'].'px; margin-top:'.$layout_data['pos_y'].'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
||||||
|
|
||||||
if (!isset ($id_agent))
|
|
||||||
$id_agent = 0;
|
|
||||||
|
|
||||||
if ($show_links) {
|
if ($show_links) {
|
||||||
|
if (!isset($id_agent)) $id_agent = 0;
|
||||||
if (($id_agent > 0) && ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0)) {
|
if (($id_agent > 0) && ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0)) {
|
||||||
|
|
||||||
//Extract id service if it is a prediction module.
|
//Extract id service if it is a prediction module.
|
||||||
|
@ -915,7 +910,6 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
echo '<a href="#">';
|
echo '<a href="#">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$img_style = array ();
|
$img_style = array ();
|
||||||
$img_style["title"] = $layout_data["label"];
|
$img_style["title"] = $layout_data["label"];
|
||||||
|
|
||||||
|
@ -927,30 +921,27 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
}
|
}
|
||||||
|
|
||||||
$img = "images/console/icons/".$layout_data["image"];
|
$img = "images/console/icons/".$layout_data["image"];
|
||||||
|
|
||||||
switch ($status) {
|
switch ($status) {
|
||||||
case 1:
|
case VISUAL_MAP_STATUS_CRITICAL_BAD:
|
||||||
//Critical (BAD)
|
|
||||||
$img .= "_bad.png";
|
$img .= "_bad.png";
|
||||||
break;
|
break;
|
||||||
case 4:
|
case VISUAL_MAP_STATUS_CRITICAL_ALERT:
|
||||||
//Critical (ALERT)
|
|
||||||
$img = "4".$img."_bad.png";
|
$img = "4".$img."_bad.png";
|
||||||
break;
|
break;
|
||||||
case 0:
|
case VISUAL_MAP_STATUS_NORMAL:
|
||||||
//Normal (OK)
|
|
||||||
$img .= "_ok.png";
|
$img .= "_ok.png";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case VISUAL_MAP_STATUS_WARNING:
|
||||||
//Warning
|
|
||||||
$img .= "_warning.png";
|
$img .= "_warning.png";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case VISUAL_MAP_STATUS_UNKNOW:
|
||||||
//Unknown
|
|
||||||
default:
|
default:
|
||||||
$img .= ".png";
|
|
||||||
// Default is Grey (Other)
|
// Default is Grey (Other)
|
||||||
|
$img .= ".png";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$borderStyle = '';
|
$borderStyle = '';
|
||||||
if(substr($img,0,1) == '4') {
|
if(substr($img,0,1) == '4') {
|
||||||
$img_style['border'] ='2px solid #ffa300;';
|
$img_style['border'] ='2px solid #ffa300;';
|
||||||
|
@ -980,21 +971,22 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
|
|
||||||
html_print_image ($img, false, $img_style);
|
html_print_image ($img, false, $img_style);
|
||||||
|
|
||||||
echo "</a>";
|
|
||||||
|
|
||||||
// Print label if valid label_color (only testing for starting with #) otherwise print nothing
|
// Print label if valid label_color (only testing for starting with #) otherwise print nothing
|
||||||
if ($layout_data['label_color'][0] == '#') {
|
if ($layout_data['label_color'][0] == '#') {
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo $layout_data['label'];
|
echo $layout_data['label'];
|
||||||
}
|
}
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
|
||||||
|
|
||||||
switch ($layout_data['type']) {
|
echo "</a>";
|
||||||
case 4:
|
break;
|
||||||
// ****************************************************************
|
case PERCENTILE_BAR:
|
||||||
// LABEL (type = 4)
|
break;
|
||||||
// ****************************************************************
|
case MODULE_GRAPH:
|
||||||
|
break;
|
||||||
|
case SIMPLE_VALUE:
|
||||||
|
break;
|
||||||
|
case LABEL:
|
||||||
$z_index = 4;
|
$z_index = 4;
|
||||||
if ($resizedMap)
|
if ($resizedMap)
|
||||||
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
||||||
|
@ -1022,10 +1014,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
if ($endTagA) echo "</a>";
|
if ($endTagA) echo "</a>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
break;
|
break;
|
||||||
case 5:
|
case ICON:
|
||||||
// ****************************************************************
|
|
||||||
// ICON (type = 5)
|
|
||||||
// ****************************************************************
|
|
||||||
$z_index = 4;
|
$z_index = 4;
|
||||||
if ($resizedMap)
|
if ($resizedMap)
|
||||||
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: '.$z_index.'; '.($layout_data['label_color'][0] == '#' ? 'color: '.$layout_data['label_color'].';' : '').' position: absolute; margin-left: '.((integer)($proportion * $layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion * $layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
||||||
|
@ -1091,13 +1080,10 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case SIMPLE_VALUE:
|
||||||
case 6:
|
case SIMPLE_VALUE_MAX:
|
||||||
case 7:
|
case SIMPLE_VALUE_MIN:
|
||||||
case 8:
|
case SIMPLE_VALUE_AVG:
|
||||||
// ****************************************************************
|
|
||||||
// SIMPLE DATA VALUE (type = 2)
|
|
||||||
// ****************************************************************
|
|
||||||
$unit_text = db_get_sql ('SELECT unit FROM tagente_modulo WHERE id_agente_modulo = ' . $layout_data['id_agente_modulo']);
|
$unit_text = db_get_sql ('SELECT unit FROM tagente_modulo WHERE id_agente_modulo = ' . $layout_data['id_agente_modulo']);
|
||||||
$unit_text = trim(io_safe_output($unit_text));
|
$unit_text = trim(io_safe_output($unit_text));
|
||||||
|
|
||||||
|
@ -1136,14 +1122,14 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
echo '<strong>'.$layout_data['label']. ' ';
|
echo '<strong>'.$layout_data['label']. ' ';
|
||||||
//TODO: change interface to add a period parameter, now is set to 1 day
|
//TODO: change interface to add a period parameter, now is set to 1 day
|
||||||
switch ($layout_data['type']) {
|
switch ($layout_data['type']) {
|
||||||
case 2:
|
case SIMPLE_VALUE:
|
||||||
$value = db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $layout_data['id_agente_modulo']);
|
$value = db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $layout_data['id_agente_modulo']);
|
||||||
$value = format_for_graph($value, 2);
|
$value = format_for_graph($value, 2);
|
||||||
if (!empty($unit_text))
|
if (!empty($unit_text))
|
||||||
$value .= " " . $unit_text;
|
$value .= " " . $unit_text;
|
||||||
echo $value;
|
echo $value;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case SIMPLE_VALUE_MAX:
|
||||||
$value = reporting_get_agentmodule_data_max ($layout_data['id_agente_modulo'], $layout_data['period'], 0);
|
$value = reporting_get_agentmodule_data_max ($layout_data['id_agente_modulo'], $layout_data['period'], 0);
|
||||||
if ($value === false) {
|
if ($value === false) {
|
||||||
$value = __('Unknown');
|
$value = __('Unknown');
|
||||||
|
@ -1155,7 +1141,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
}
|
}
|
||||||
echo $value;
|
echo $value;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case SIMPLE_VALUE_MIN:
|
||||||
$value = reporting_get_agentmodule_data_min ($layout_data['id_agente_modulo'], $layout_data['period'], 0);
|
$value = reporting_get_agentmodule_data_min ($layout_data['id_agente_modulo'], $layout_data['period'], 0);
|
||||||
if ($value === false) {
|
if ($value === false) {
|
||||||
$value = __('Unknown');
|
$value = __('Unknown');
|
||||||
|
@ -1167,7 +1153,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
}
|
}
|
||||||
echo $value;
|
echo $value;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case SIMPLE_VALUE_AVG:
|
||||||
$value = reporting_get_agentmodule_data_average($layout_data['id_agente_modulo'], $layout_data['period'], 0);
|
$value = reporting_get_agentmodule_data_average($layout_data['id_agente_modulo'], $layout_data['period'], 0);
|
||||||
if ($value === false) {
|
if ($value === false) {
|
||||||
$value = __('Unknown');
|
$value = __('Unknown');
|
||||||
|
@ -1186,40 +1172,8 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case PERCENTILE_BAR:
|
||||||
// ****************************************************************
|
case PERCENTILE_BUBBLE:
|
||||||
// Progress bar
|
|
||||||
// ****************************************************************
|
|
||||||
case 9:
|
|
||||||
// ****************************************************************
|
|
||||||
// Progress bubble
|
|
||||||
// ****************************************************************
|
|
||||||
|
|
||||||
switch ($status) {
|
|
||||||
case 1:
|
|
||||||
//Critical (BAD)
|
|
||||||
$colorStatus = "#ff0000";
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
//Critical (ALERT)
|
|
||||||
$colorStatus = "#ff8800";
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
//Normal (OK)
|
|
||||||
$colorStatus = "#00ff00";
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
//Warning
|
|
||||||
$colorStatus = "#ffff00";
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
//Unknown
|
|
||||||
default:
|
|
||||||
$colorStatus = "#5A5AFF";
|
|
||||||
// Default is Grey (Other)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($resizedMap)
|
if ($resizedMap)
|
||||||
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion *$layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion *$layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
echo '<div style="left: 0px; top: 0px; text-align: center; z-index: 1; color: '.$layout_data['label_color'].'; position: absolute; margin-left: '.((integer)($proportion *$layout_data['pos_x'])).'px; margin-top:'.((integer)($proportion *$layout_data['pos_y'])).'px;" id="layout-data-'.$layout_data['id'].'" class="layout-data">';
|
||||||
else
|
else
|
||||||
|
@ -1307,12 +1261,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
break;
|
break;
|
||||||
case 1;
|
case MODULE_GRAPH:
|
||||||
// ****************************************************************
|
|
||||||
// Single module graph
|
|
||||||
// ****************************************************************
|
|
||||||
// SINGLE GRAPH (type = 1)
|
|
||||||
|
|
||||||
if ($resizedMap) {
|
if ($resizedMap) {
|
||||||
$layout_data['width'] = ((integer)($proportion * $layout_data['width']));
|
$layout_data['width'] = ((integer)($proportion * $layout_data['width']));
|
||||||
$layout_data['height'] = ((integer)($proportion * $layout_data['height']));
|
$layout_data['height'] = ((integer)($proportion * $layout_data['height']));
|
||||||
|
@ -1363,6 +1312,10 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
enterprise_hook("enterprise_visual_map_print_item",
|
||||||
|
array($layout_data, $status, $colorStatus));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************
|
// ****************************************************************
|
||||||
|
@ -1375,24 +1328,23 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
$line['node_end'] = 'layout-data-'.$layout_data["id"];
|
$line['node_end'] = 'layout-data-'.$layout_data["id"];
|
||||||
switch ($status_parent) {
|
switch ($status_parent) {
|
||||||
default:
|
default:
|
||||||
case 3:
|
case VISUAL_MAP_STATUS_UNKNOW:
|
||||||
$line["color"] = "#ccc"; // Gray
|
$line["color"] = "#ccc"; // Gray
|
||||||
break;
|
break;
|
||||||
case 2:
|
case VISUAL_MAP_STATUS_WARNING:
|
||||||
$line["color"] = "#20f6f6"; // Yellow
|
$line["color"] = "#20f6f6"; // Yellow
|
||||||
break;
|
break;
|
||||||
case 0:
|
case VISUAL_MAP_STATUS_NORMAL:
|
||||||
$line["color"] = "#00ff00"; // Green
|
$line["color"] = "#00ff00"; // Green
|
||||||
break;
|
break;
|
||||||
case 4:
|
case VISUAL_MAP_STATUS_CRITICAL_ALERT:
|
||||||
case 1:
|
case VISUAL_MAP_STATUS_CRITICAL_BAD:
|
||||||
$line["color"] = "#ff0000"; // Red
|
$line["color"] = "#ff0000"; // Red
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
array_push ($lines, $line);
|
array_push ($lines, $line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($draw_lines) {
|
if ($draw_lines) {
|
||||||
/* If you want lines in the map, call using Javascript:
|
/* If you want lines in the map, call using Javascript:
|
||||||
|
@ -1411,19 +1363,6 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array Layout data types
|
|
||||||
*/
|
|
||||||
function visual_map_get_layout_data_types () {
|
|
||||||
$types = array ();
|
|
||||||
$types[0] = __('Static graph');
|
|
||||||
$types[1] = __('Module graph');
|
|
||||||
$types[2] = __('Simple value');
|
|
||||||
$types[3] = __('Percentile bar');
|
|
||||||
|
|
||||||
return $types;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list with the layouts for a user.
|
* Get a list with the layouts for a user.
|
||||||
*
|
*
|
||||||
|
@ -1473,7 +1412,6 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
||||||
return $retval;
|
return $retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the status of a layout.
|
* Get the status of a layout.
|
||||||
*
|
*
|
||||||
|
@ -1487,13 +1425,13 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
||||||
* @return bool The status of the given layout. True if it's OK, false if not.
|
* @return bool The status of the given layout. True if it's OK, false if not.
|
||||||
*/
|
*/
|
||||||
function visual_map_get_layout_status ($id_layout = 0, $depth = 0) {
|
function visual_map_get_layout_status ($id_layout = 0, $depth = 0) {
|
||||||
$temp_status = 0;
|
$temp_status = VISUAL_MAP_STATUS_NORMAL;
|
||||||
$temp_total = 0;
|
$temp_total = VISUAL_MAP_STATUS_NORMAL;
|
||||||
$depth++; // For recursion depth checking
|
$depth++; // For recursion depth checking
|
||||||
|
|
||||||
// TODO: Implement this limit as a configurable item in setup
|
// TODO: Implement this limit as a configurable item in setup
|
||||||
if ($depth > 10) {
|
if ($depth > 10) {
|
||||||
return 3; // No status data if we need to exit by a excesive recursion
|
return VISUAL_MAP_STATUS_UNKNOW; // No status data if we need to exit by a excesive recursion
|
||||||
}
|
}
|
||||||
|
|
||||||
$id_layout = (int) $id_layout;
|
$id_layout = (int) $id_layout;
|
||||||
|
@ -1501,7 +1439,7 @@ function visual_map_get_layout_status ($id_layout = 0, $depth = 0) {
|
||||||
$result = db_get_all_rows_filter ('tlayout_data', array ('id_layout' => $id_layout),
|
$result = db_get_all_rows_filter ('tlayout_data', array ('id_layout' => $id_layout),
|
||||||
array ('id_agente_modulo', 'parent_item', 'id_layout_linked', 'id_agent', 'type'));
|
array ('id_agente_modulo', 'parent_item', 'id_layout_linked', 'id_agent', 'type'));
|
||||||
if ($result === false)
|
if ($result === false)
|
||||||
return 0;
|
return VISUAL_MAP_STATUS_NORMAL;
|
||||||
|
|
||||||
foreach ($result as $rownum => $data) {
|
foreach ($result as $rownum => $data) {
|
||||||
if (($data["id_layout_linked"] == 0 && $data["id_agente_modulo"] == 0 && $data["id_agent"] == 0) || $data['type'] != 0)
|
if (($data["id_layout_linked"] == 0 && $data["id_agente_modulo"] == 0 && $data["id_agent"] == 0) || $data['type'] != 0)
|
||||||
|
@ -1519,8 +1457,8 @@ function visual_map_get_layout_status ($id_layout = 0, $depth = 0) {
|
||||||
else {
|
else {
|
||||||
$status = agents_get_status ($data["id_agent"]);
|
$status = agents_get_status ($data["id_agent"]);
|
||||||
}
|
}
|
||||||
if ($status == 1)
|
if ($status == VISUAL_MAP_STATUS_CRITICAL_BAD)
|
||||||
return 1;
|
return VISUAL_MAP_STATUS_CRITICAL_BAD;
|
||||||
if ($status > $temp_total)
|
if ($status > $temp_total)
|
||||||
$temp_total = $status;
|
$temp_total = $status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
||||||
|
|
||||||
|
|
||||||
echo '<div id="properties_panel" style="display: none; position: absolute; border: 2px solid #114105; padding: 5px; background: white; z-index: 90;">';
|
echo '<div id="properties_panel" style="display: none; position: absolute; border: 2px solid #114105; padding: 5px; background: white; z-index: 90;">';
|
||||||
//----------------------------Hiden Form----------------------------------------
|
//----------------------------Hiden Form----------------------------
|
||||||
?>
|
?>
|
||||||
<table class="databox" border="0" cellpadding="4" cellspacing="4" width="300">
|
<table class="databox" border="0" cellpadding="4" cellspacing="4" width="300">
|
||||||
<caption>
|
<caption>
|
||||||
|
|
|
@ -12,13 +12,14 @@
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU Lesser General Public License for more details.
|
// GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
// If is called from index
|
|
||||||
if (file_exists('include/functions.php')) {
|
if (file_exists('include/functions.php')) {
|
||||||
|
// If is called from index
|
||||||
include_once('include/functions.php');
|
include_once('include/functions.php');
|
||||||
include_once('include/functions_html.php');
|
include_once('include/functions_html.php');
|
||||||
include_once('include/graphs/functions_utils.php');
|
include_once('include/graphs/functions_utils.php');
|
||||||
} // If is called through url
|
}
|
||||||
else if (file_exists('../functions.php')) {
|
else if (file_exists('../functions.php')) {
|
||||||
|
// If is called through url
|
||||||
include_once('../functions.php');
|
include_once('../functions.php');
|
||||||
include_once('../functions_html.php');
|
include_once('../functions_html.php');
|
||||||
include_once('functions_utils.php');
|
include_once('functions_utils.php');
|
||||||
|
@ -105,7 +106,8 @@ function gd_histogram ($width, $height, $mode, $data, $max_value, $font, $title,
|
||||||
|
|
||||||
if ($mode != 2) {
|
if ($mode != 2) {
|
||||||
$size_per = ($max_value / ($width-40));
|
$size_per = ($max_value / ($width-40));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$size_per = ($max_value / ($width));
|
$size_per = ($max_value / ($width));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue