2011-03-22 Raul Mateos <raulofpandora@gmail.com>

* extensions/resource_registration.php,
	extensions/resource_exporation.php, extensions/agent_modules.php:
	Cleaned code and updated page disclaimers.

	* include/functions_reporting.php: Removed SVN errors in code.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4119 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
raulmateos 2011-03-22 21:41:52 +00:00
parent 7166aff392
commit cf6f219fc5
5 changed files with 46 additions and 40 deletions

View File

@ -1,3 +1,11 @@
2011-03-22 Raul Mateos <raulofpandora@gmail.com>
* extensions/resource_registration.php,
extensions/resource_exporation.php, extensions/agent_modules.php:
Cleaned code and updated page disclaimers.
* include/functions_reporting.php: Removed SVN errors in code.
2011-03-22 Miguel de Dios <miguel.dedios@artica.es> 2011-03-22 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php: fixed the update "collection_max_size" * include/functions_config.php: fixed the update "collection_max_size"

View File

@ -164,22 +164,22 @@ function mainAgentsModules() {
$new_hor_offset = $hor_offset-$block; $new_hor_offset = $hor_offset-$block;
echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&refr=0&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".print_image("images/darrowleft.png",true, array('title' => __('Previous modules')))."</a> </th>"; echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&refr=0&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".print_image("images/darrowleft.png",true, array('title' => __('Previous modules')))."</a> </th>";
} }
$nmodules = 0; $nmodules = 0;
foreach($modules_by_name as $module) { foreach($modules_by_name as $module) {
$nmodules++; $nmodules++;
if($nmodules <= $hor_offset || $nmodules > ($hor_offset+$block)) { if($nmodules <= $hor_offset || $nmodules > ($hor_offset+$block)) {
continue; continue;
} }
$file_name = string2image(printTruncateText($module['name'],15, false, true, false, '...'), 115, 13, 3, 270, '#9EAC8B', 'FFF', 4, 0); $file_name = string2image(printTruncateText($module['name'],15, false, true, false, '...'), 115, 13, 3, 270, '#9EAC8B', 'FFF', 4, 0);
echo '<th width="22px">'.print_image($file_name, true, array('title' => $module['name']))."</th>"; echo '<th width="22px">'.print_image($file_name, true, array('title' => $module['name']))."</th>";
} }
if(($hor_offset + $block) < $nmodules) { if(($hor_offset + $block) < $nmodules) {
$new_hor_offset = $hor_offset+$block; $new_hor_offset = $hor_offset+$block;
echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".print_image("images/darrowright.png",true, array('title' => __('More modules')))."</a> </th>"; echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".print_image("images/darrowright.png",true, array('title' => __('More modules')))."</a> </th>";
} }
$filter_agents = false; $filter_agents = false;
if($group_id > 0) { if($group_id > 0) {
@ -276,7 +276,7 @@ function mainAgentsModules() {
echo "</table>"; echo "</table>";
echo "<br><br><p>" . __("The colours meaning:") . echo "<br><br><p>" . __("The colours meaning:") .
"<ul style='float: left;'>" . "<ul style='float: left;'>" .
'<li style="clear: both;"> '<li style="clear: both;">
<div style="float: left; background: #ffa300; height: 14px; width: 26px;margin-right: 5px; margin-bottom: 5px;">&nbsp;</div>' . <div style="float: left; background: #ffa300; height: 14px; width: 26px;margin-right: 5px; margin-bottom: 5px;">&nbsp;</div>' .

View File

@ -1,15 +1,17 @@
<?php <?php
//Pandora FMS- http://pandorafms.com // Pandora FMS - http://pandorafms.com
// ================================================== // ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation for version 2. // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
if (isset($_GET['get_ptr'])) { if (isset($_GET['get_ptr'])) {
@ -17,7 +19,7 @@ if (isset($_GET['get_ptr'])) {
if (file_exists("../include/config.php")) if (file_exists("../include/config.php"))
require ("../include/config.php"); require ("../include/config.php");
else { else {
//TODO FIX AND SET AS RELATIVE DIRECTORY //TODO FIX AND SET AS RELATIVE DIRECTORY
if (file_exists("/var/www/pandora_console/include/config.php")) if (file_exists("/var/www/pandora_console/include/config.php"))
require ("/var/www/pandora_console/include/config.php"); require ("/var/www/pandora_console/include/config.php");
@ -134,7 +136,7 @@ function output_xml_report($id) {
echo "<time_to>" . $item['time_to'] . "</time_to>\n"; echo "<time_to>" . $item['time_to'] . "</time_to>\n";
$slas = get_db_all_rows_field_filter('treport_content_sla_combined', 'id_report_content', $item['id_rc']); $slas = get_db_all_rows_field_filter('treport_content_sla_combined', 'id_report_content', $item['id_rc']);
if ($slas === false) $slas = array(); if ($slas === false) $slas = array();
foreach ($slas as $sla) { foreach ($slas as $sla) {
$module = get_db_value('nombre', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']); $module = get_db_value('nombre', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']);
@ -243,22 +245,22 @@ function output_xml_visual_console($id) {
echo "<item>\n"; echo "<item>\n";
echo "<other_id>" . $item['id'] . "</other_id>\n"; //OLD ID USE FOR parent item echo "<other_id>" . $item['id'] . "</other_id>\n"; //OLD ID USE FOR parent item
if (!empty($item['label'])) { if (!empty($item['label'])) {
echo "<label><![CDATA[" . safe_output($item['label']) . "]]></label>\n"; echo "<label><![CDATA[" . safe_output($item['label']) . "]]></label>\n";
} }
echo "<x>" . $item['pos_x'] . "</x>\n"; echo "<x>" . $item['pos_x'] . "</x>\n";
echo "<y>" . $item['pos_y'] . "</y>\n"; echo "<y>" . $item['pos_y'] . "</y>\n";
echo "<type>" . $item['type'] . "</type>\n"; echo "<type>" . $item['type'] . "</type>\n";
if ($item['width'] != 0) { if ($item['width'] != 0) {
echo "<width>" . $item['width'] . "</width>\n"; echo "<width>" . $item['width'] . "</width>\n";
} }
if ($item['height'] != 0) { if ($item['height'] != 0) {
echo "<height>" . $item['height'] . "</height>\n"; echo "<height>" . $item['height'] . "</height>\n";
} }
if (!empty($item['image'])) { if (!empty($item['image'])) {
echo "<image>" . $item['image'] . "</image>\n"; echo "<image>" . $item['image'] . "</image>\n";
} }
if ($item['period'] != 0) { if ($item['period'] != 0) {
echo "<period>" . $item['period'] . "</period>\n"; echo "<period>" . $item['period'] . "</period>\n";
} }
$agent = ''; $agent = '';
if ($item['id_agent'] != 0) { if ($item['id_agent'] != 0) {
@ -370,4 +372,4 @@ function resource_exportation_extension_main() {
</script> </script>
<?php <?php
} }
?> ?>

View File

@ -1,15 +1,17 @@
<?php <?php
//Pandora FMS- http://pandorafms.com // Pandora FMS - http://pandorafms.com
// ================================================== // ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation for version 2. // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
//Remember the hard-coded values //Remember the hard-coded values
@ -613,8 +615,8 @@ function process_upload_xml_component($xml) {
$auth_password = safe_input((string)$componentElement->auth_password); $auth_password = safe_input((string)$componentElement->auth_password);
$auth_method = safe_input((string)$componentElement->auth_method); $auth_method = safe_input((string)$componentElement->auth_method);
$privacy_method = safe_input((string)$componentElement->privacy_method); $privacy_method = safe_input((string)$componentElement->privacy_method);
$privacy_pass = safe_input((string)$componentElement->privacy_pass); $privacy_pass = safe_input((string)$componentElement->privacy_pass);
$security_level = safe_input((string)$componentElement->security_level); $security_level = safe_input((string)$componentElement->security_level);
$wmi_query = safe_input((string)$componentElement->wmi_query); $wmi_query = safe_input((string)$componentElement->wmi_query);
$key_string = safe_input((string)$componentElement->key_string); $key_string = safe_input((string)$componentElement->key_string);
$field_number = (int)$componentElement->field_number; $field_number = (int)$componentElement->field_number;
@ -813,7 +815,7 @@ function resource_registration_extension_main() {
require_once($config['homedir'] . '/include/functions_network_components.php'); require_once($config['homedir'] . '/include/functions_network_components.php');
require_once($config['homedir'] . '/include/functions_db.php'); require_once($config['homedir'] . '/include/functions_db.php');
enterprise_include_once('include/functions_local_components.php'); enterprise_include_once('include/functions_local_components.php');
print_page_header (__('Resource registration'), "images/extensions.png", false, "", true, "" ); print_page_header (__('Resource registration'), "images/extensions.png", false, "", true, "" );
if (!extension_loaded("libxml")) { if (!extension_loaded("libxml")) {
@ -858,4 +860,4 @@ function resource_registration_extension_main() {
add_godmode_menu_option (__('Resource registration'), 'PM','gservers',''); add_godmode_menu_option (__('Resource registration'), 'PM','gservers','');
add_extension_godmode_function('resource_registration_extension_main'); add_extension_godmode_function('resource_registration_extension_main');
?> ?>

View File

@ -1828,12 +1828,9 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
array_push ($table->data, $data); array_push ($table->data, $data);
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
<<<<<<< .mine
if ($content["description"] != "") {
=======
$table->colspan[2][0] = 3; $table->colspan[2][0] = 3;
if ($content["description"] != ""){ if ($content["description"] != ""){
>>>>>>> .r4112
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);
@ -1870,12 +1867,9 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
$n = array_push ($table->data, $data); $n = array_push ($table->data, $data);
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
<<<<<<< .mine
if ($content["description"] != "") {
=======
$table->colspan[1][0] = 3; $table->colspan[1][0] = 3;
if ($content["description"] != ""){ if ($content["description"] != ""){
>>>>>>> .r4112
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);