2011-08-10 Sancho Lerena <slerena@artica.es>
* pandoradb_data.sql: New sensor as agent type. Updated version. * include/graphs/functions_gd.php: Progressbar has a fixed font size. * include/functions_config.php: By default now gets a fontsize called "Smallfont"; ideal to be used with our graphs instead the other. Size is also smaller as default. * godmode/servers/manage_recontask.php: Fixed broken code (matching for NULL, now works). * godmode/servers/manage_recontask_form.php: Altered some default values to be better. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4710 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e02b6d2767
commit
c963f94d27
|
@ -1,3 +1,19 @@
|
|||
2011-08-10 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandoradb_data.sql: New sensor as agent type. Updated version.
|
||||
|
||||
* include/graphs/functions_gd.php: Progressbar has a fixed font size.
|
||||
|
||||
* include/functions_config.php: By default now gets a fontsize
|
||||
called "Smallfont"; ideal to be used with our graphs instead the
|
||||
other. Size is also smaller as default.
|
||||
|
||||
* godmode/servers/manage_recontask.php: Fixed broken code (matching
|
||||
for NULL, now works).
|
||||
|
||||
* godmode/servers/manage_recontask_form.php: Altered some default values
|
||||
to be better.
|
||||
|
||||
2011-08-10 Javier Lanz <javier.lanz@artica.es>
|
||||
|
||||
* operation/agentes/exportdata.php: Fixed an ugly spelling mistake
|
||||
|
|
|
@ -127,12 +127,13 @@ if (isset($_GET["update"])) {
|
|||
$where = array('id_rt' => $id);
|
||||
|
||||
if ($name != "") {
|
||||
if (($id_recon_script == 0) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
if (($id_recon_script == 'NULL') && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||
elseif ($id_recon_script != 0)
|
||||
elseif ($id_recon_script != 'NULL')
|
||||
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||
else
|
||||
$result = false;
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
$result = false;
|
||||
|
@ -172,16 +173,19 @@ if (isset($_GET["create"])) {
|
|||
'parent_recursion' => $parent_recursion
|
||||
);
|
||||
|
||||
$reason = "";
|
||||
if ($name != "") {
|
||||
if (($id_recon_script == 0) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
if (($id_recon_script == 'NULL') && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
{
|
||||
$result = db_process_sql_insert('trecon_task', $values);
|
||||
$reason = __("Network provided is not correct");
|
||||
}
|
||||
elseif ($id_recon_script != 0) {
|
||||
elseif ($id_recon_script != 'NULL') {
|
||||
$result = db_process_sql_insert('trecon_task', $values);
|
||||
}
|
||||
else
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
$result = false;
|
||||
|
@ -191,6 +195,7 @@ if (isset($_GET["create"])) {
|
|||
}
|
||||
else {
|
||||
echo '<h3 class="error">'.__('Error creating recon task').'</h3>';
|
||||
echo $reason;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,7 +295,7 @@ if ($result !== false) {
|
|||
echo '<div class="nf">'.__('There are no recon task configured').'</div>';
|
||||
}
|
||||
|
||||
echo '<div class="action-buttons" style="width: 700px">';
|
||||
echo '<div class="action-buttons" style="width: 99%;">';
|
||||
echo '<form method="post" action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create">';
|
||||
echo html_print_submit_button (__('Create'),"crt",false,'class="sub next"',true);
|
||||
echo '</form>';
|
||||
|
|
|
@ -77,8 +77,8 @@ if (isset ($_GET["update"])) { // Edit mode
|
|||
$mode = "network_sweep";
|
||||
$os_detect = 0;
|
||||
$resolve_names = 0;
|
||||
$parent_detection = 0;
|
||||
$parent_recursion = 1;
|
||||
$parent_detection = 1;
|
||||
$parent_recursion = 5;
|
||||
}
|
||||
|
||||
// Headers
|
||||
|
@ -214,7 +214,7 @@ $table->data[19][1] = html_print_checkbox ('parent_detection', 1, $parent_detec
|
|||
|
||||
// Parent recursion
|
||||
$table->data[20][0] = "<b>".__('Parent recursion');
|
||||
$table->data[20][1] = html_print_input_text ('parent_recursion', $parent_recursion, '', 1, 0, true);
|
||||
$table->data[20][1] = html_print_input_text ('parent_recursion', $parent_recursion, '', 5, 0, true);
|
||||
|
||||
// Different Form url if it's a create or if it's a update form
|
||||
echo '<form name="modulo" method="post" action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&'.(($id_rt != -1) ? 'update='.$id_rt : 'create=1').'">';
|
||||
|
|
|
@ -437,7 +437,7 @@ function config_process_config () {
|
|||
}
|
||||
|
||||
if (!isset ($config['fontpath'])) {
|
||||
config_update_value ( 'fontpath', $config['homedir'].'/include/fonts/unicode.ttf');
|
||||
config_update_value ( 'fontpath', $config['homedir'].'/include/fonts/smallfont.ttf');
|
||||
}
|
||||
|
||||
if (!isset ($config['style'])) {
|
||||
|
|
|
@ -278,7 +278,7 @@ if ($mode == 0) {
|
|||
imagePng($imgPng);
|
||||
}
|
||||
else
|
||||
drawRating($progress, $width, $height, $font, $out_of_lim_str, $mode, $fontsize);
|
||||
drawRating($progress, $width, $height, $font, $out_of_lim_str, $mode, 6);
|
||||
break;
|
||||
case 2:
|
||||
if ($progress > 100 || $progress < 0) {
|
||||
|
@ -290,7 +290,7 @@ if ($mode == 0) {
|
|||
imagePng($imgPng);
|
||||
}
|
||||
else
|
||||
drawRating($progress, $width, $height, $font, $out_of_lim_str, $mode, $fontsize);
|
||||
drawRating($progress, $width, $height, $font, $out_of_lim_str, $mode, 6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('days_compact','15'),
|
||||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','4.0-dev'),
|
||||
('db_scheme_build','PD110122'),
|
||||
('db_scheme_version','4.0RC1'),
|
||||
('db_scheme_build','PD110810'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
@ -100,7 +100,7 @@ INSERT INTO `tconfig_os` VALUES
|
|||
(10,'Other','Other SO','so_other.png'),
|
||||
(11,'Network','Pandora FMS Network Agent','network.png'),
|
||||
(12,'Web Server','Web Server/Application','network.png'),
|
||||
(13,'Octopods','Octopods Pandora FMS Hardware Agent','network.png'),
|
||||
(13,'Sensor',' Pandora FMS Hardware Agent (Sensor)','network.png'),
|
||||
(14,'Embedded','Embedded device running a Pandora FMS agent','embedded.png'),
|
||||
(15,'Android','Android agent','android.png');
|
||||
UNLOCK TABLES;
|
||||
|
|
Loading…
Reference in New Issue