Merge branch 'develop' into new-agent-view
This commit is contained in:
commit
d829d34f13
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 6.0RC1-151006
|
||||
Version: 6.0RC1-151007
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0RC1-151006"
|
||||
pandora_version="6.0RC1-151007"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '6.0RC1';
|
||||
use constant AGENT_BUILD => '151006';
|
||||
use constant AGENT_BUILD => '151007';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
@ -883,7 +883,14 @@ sub send_buffered_xml_files () {
|
|||
next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$Conf{'temporal'}/$xml_file");
|
||||
|
||||
my $rc = send_file ("$Conf{'temporal'}/$xml_file", 1);
|
||||
unlink ("$Conf{'temporal'}/$xml_file") if ($rc == 0);
|
||||
|
||||
if ($rc == 0) {
|
||||
if ($Conf{'debug'} eq '1') {
|
||||
rename "$Conf{'temporal'}/$xml_file", "$Conf{'temporal'}/$xml_file". "sent";
|
||||
} else {
|
||||
unlink ("$Conf{'temporal'}/$xml_file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2350,13 +2357,16 @@ while (1) {
|
|||
if ($Conf{'debug'} eq '1') {
|
||||
log_message ('debug', "Wrote XML data file '$temp_file'");
|
||||
log_message ('debug', "Wrote XML data file '$temp_file'", *STDOUT);
|
||||
last;
|
||||
}
|
||||
|
||||
# Send the XML data file
|
||||
my $rc = send_file ($temp_file, 1);
|
||||
if ($rc == 0 || $Conf{'xml_buffer'} == 0 || temporal_freedisk () < $Conf{'temporal_min_size'}) {
|
||||
unlink ($temp_file);
|
||||
if ($Conf{'debug'} eq '1') {
|
||||
rename $temp_file, $temp_file . "sent";
|
||||
} else {
|
||||
unlink ($temp_file);
|
||||
}
|
||||
}
|
||||
|
||||
# Send buffered XML data files
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0RC1
|
||||
%define release 151006
|
||||
%define release 151007
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0RC1
|
||||
%define release 151006
|
||||
%define release 151007
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{151006}
|
||||
{151007}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0RC1(Build 151006)")
|
||||
#define PANDORA_VERSION ("6.0RC1(Build 151007)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -1699,19 +1699,23 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) {
|
|||
fprintf (conf_fh, "%s", data_xml.c_str ());
|
||||
fclose (conf_fh);
|
||||
|
||||
/* Only send if debug is not activated */
|
||||
if (getPandoraDebug () == false) {
|
||||
rc = this->copyDataFile (tmp_filename);
|
||||
/* Allways reports to Data Server*/
|
||||
rc = this->copyDataFile (tmp_filename);
|
||||
|
||||
/* Delete the file if successfully copied, buffer disabled or not enough space available */
|
||||
if (rc == 0 || xml_buffer == 0 || (GetDiskFreeSpaceEx (tmp_filepath.c_str (), &free_bytes, NULL, NULL) != 0 && free_bytes.QuadPart < min_free_bytes)) {
|
||||
Pandora_File::removeFile (tmp_filepath);
|
||||
/* Delete the file if successfully copied, buffer disabled or not enough space available */
|
||||
if (rc == 0 || xml_buffer == 0 || (GetDiskFreeSpaceEx (tmp_filepath.c_str (), &free_bytes, NULL, NULL) != 0 && free_bytes.QuadPart < min_free_bytes)) {
|
||||
/* Rename the file if debug mode is enabled*/
|
||||
if (getPandoraDebug ()) {
|
||||
string tmp_filepath_sent = tmp_filepath;
|
||||
tmp_filepath_sent.append("sent");
|
||||
CopyFile (tmp_filepath.c_str(), tmp_filepath_sent.c_str(), false);
|
||||
}
|
||||
Pandora_File::removeFile (tmp_filepath);
|
||||
}
|
||||
|
||||
/* Send any buffered data files */
|
||||
if (xml_buffer == 1) {
|
||||
this->sendBufferedXml (conf->getValue ("temporal"));
|
||||
}
|
||||
/* Send any buffered data files */
|
||||
if (xml_buffer == 1) {
|
||||
this->sendBufferedXml (conf->getValue ("temporal"));
|
||||
}
|
||||
|
||||
ReleaseMutex (mutex);
|
||||
|
@ -1739,6 +1743,14 @@ Pandora_Windows_Service::sendBufferedXml (string path) {
|
|||
FindClose(find);
|
||||
return;
|
||||
}
|
||||
|
||||
if (getPandoraDebug ()){
|
||||
string file_data_path = base_path + file_data.cFileName;
|
||||
string file_data_sent = file_data_path;
|
||||
file_data_sent.append("sent");
|
||||
CopyFile (file_data_path.c_str(), file_data_sent.c_str(), false);
|
||||
}
|
||||
|
||||
Pandora_File::removeFile (base_path + file_data.cFileName);
|
||||
|
||||
while (FindNextFile(find, &file_data) != 0) {
|
||||
|
@ -1746,6 +1758,12 @@ Pandora_Windows_Service::sendBufferedXml (string path) {
|
|||
FindClose(find);
|
||||
return;
|
||||
}
|
||||
if (getPandoraDebug ()){
|
||||
string file_data_path = base_path + file_data.cFileName;
|
||||
string file_data_sent = file_data_path;
|
||||
file_data_sent.append("sent");
|
||||
CopyFile (file_data_path.c_str(), file_data_sent.c_str(), false);
|
||||
}
|
||||
Pandora_File::removeFile (base_path + file_data.cFileName);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(6.0RC1(Build 151006))"
|
||||
VALUE "ProductVersion", "(6.0RC1(Build 151007))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 6.0RC1-151006
|
||||
Version: 6.0RC1-151007
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0RC1-151006"
|
||||
pandora_version="6.0RC1-151007"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -163,6 +163,7 @@ DROP TABLE `tgis_map_has_tgis_map_connection`;
|
|||
ALTER TABLE `tmodule_relationship`
|
||||
--ADD COLUMN `id_rt` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
ADD FOREIGN KEY (`id_rt`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE;
|
||||
ALTER TABLE tmodule_relationship MODIFY `id_rt` int(10) unsigned NULL default NULL;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tevent_filter`
|
||||
|
|
|
@ -187,6 +187,7 @@ $id_group = 0;
|
|||
|
||||
$groups = users_get_groups();
|
||||
|
||||
$table = new StdClass();
|
||||
$table->id = 'delete_table';
|
||||
$table->class = 'databox filters';
|
||||
$table->width = '100%';
|
||||
|
@ -246,12 +247,18 @@ $description = "";
|
|||
|
||||
echo '<div id="form_agents" style="display: none;">';
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = "databox filters";
|
||||
|
||||
$table->head = array ();
|
||||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
|
||||
$table->data = array ();
|
||||
|
||||
$groups = users_get_groups ($config["id_user"], "AW",false);
|
||||
|
@ -265,7 +272,10 @@ $params['input_name'] = 'id_parent';
|
|||
$params['value'] = agents_get_name ($id_parent);
|
||||
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
|
||||
|
||||
$table->data[0][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . ui_print_help_icon("cascade_protection", true);
|
||||
$table->data[0][1] .= "<b>" . __('Cascade protection'). "</b> " .
|
||||
ui_print_help_icon("cascade_protection", true) .
|
||||
html_print_select(array(1 => __('Yes'), 0 => __('No')),
|
||||
"cascade_protection", -1, "", __('No change'), -1, true);
|
||||
|
||||
$table->data[1][0] = __('Group');
|
||||
$table->data[1][1] = html_print_select_groups(false, "AR", false, 'group', $group, '', __('No change'), -1, true, false, true, '', false, 'width: 150px;');
|
||||
|
@ -305,9 +315,15 @@ $update_gis_data = -1;
|
|||
$cascade_protection = -1;
|
||||
$quiet_select = -1;
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = "databox filters";
|
||||
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
|
||||
$table->head = array ();
|
||||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
|
@ -387,6 +403,7 @@ $table->data[6][1] = html_print_select(array(-1 => __('No change'),
|
|||
ui_toggle(html_print_table ($table, true), __('Advanced options'));
|
||||
unset($table);
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = "databox filters";
|
||||
|
||||
|
@ -394,6 +411,10 @@ $table->head = array ();
|
|||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->data = array ();
|
||||
$table->size[0] = '15%';
|
||||
$table->size[1] = '35%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[3] = '35%';
|
||||
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ $write_groups = users_get_groups_for_select(false, "RW",
|
|||
users_can_manage_group_all(), true, false, 'id_grupo');
|
||||
|
||||
// If the report group is not among the RW groups (special permission) we add it
|
||||
if (!isset($write_groups[$idGroupReport])) {
|
||||
if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {
|
||||
$write_groups[$idGroupReport] = groups_get_name($idGroupReport);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC151006';
|
||||
$build_version = 'PC151007';
|
||||
$pandora_version = 'v6.0RC1';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -2051,8 +2051,8 @@ function html_html2rgb($htmlcolor)
|
|||
* @return mixed If the $return is true, return the output as string.
|
||||
*/
|
||||
function html_print_autocomplete_modules($name = 'module',
|
||||
$default = '', $id_agents = false, $id_agent_module = 0, $ACL = true, $scriptResult = '',
|
||||
$filter = array(), $return = false) {
|
||||
$default = '', $id_agents = false, $ACL = true, $scriptResult = '',
|
||||
$filter = array(), $return = false,$id_agent_module = 0) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0RC1';
|
||||
$build = '151006';
|
||||
$build = '151007';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -92,10 +92,10 @@ $id = get_parameter('id');
|
|||
|
||||
function show_others() {
|
||||
if (!$("#checkbox-avg_only").attr('checked')) {
|
||||
$("#hidden-show_other").val(1);
|
||||
$("#hidden-show_other").val(0);
|
||||
}
|
||||
else {
|
||||
$("#hidden-show_other").val(0);
|
||||
$("#hidden-show_other").val(1);
|
||||
}
|
||||
}
|
||||
//-->
|
||||
|
|
|
@ -435,7 +435,7 @@ $data[0] .= html_print_select($user_users, "id_user_ack", $id_user_ack, '',
|
|||
if (!$meta) {
|
||||
$data[1] = __('Module search') . $jump;
|
||||
$data[1] .= html_print_autocomplete_modules('module_search',
|
||||
$text_module, false, $id_agent_module, true, '', array(), true);
|
||||
$text_module, false, true, '', array(), true,$id_agent_module);
|
||||
}
|
||||
else {
|
||||
$data[1] = __('Server') . $jump;
|
||||
|
|
|
@ -260,7 +260,8 @@ ui_print_page_header (__('Reporting'). " » ".__('Custom graph viewer'), "
|
|||
|
||||
$graphs = custom_graphs_get_user ();
|
||||
if (! empty ($graphs)) {
|
||||
$table->width = '98%';
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$tale->class = 'databox_frame';
|
||||
$table->align = array ();
|
||||
$table->align[2] = 'center';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0RC1
|
||||
%define release 151006
|
||||
%define release 151007
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0RC1
|
||||
%define release 151006
|
||||
%define release 151007
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -65,7 +65,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
|
|||
INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
|
||||
INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
|
||||
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.0RC1');
|
||||
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD151006');
|
||||
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD151007');
|
||||
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
|
||||
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
|
||||
INSERT INTO tconfig (token, value) VALUES ('style','pandora');
|
||||
|
|
|
@ -697,7 +697,7 @@ CREATE TABLE IF NOT EXISTS `trecon_task` (
|
|||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmodule_relationship` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_rt` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`id_rt` int(10) unsigned DEFAULT NULL,
|
||||
`module_a` int(10) unsigned NOT NULL,
|
||||
`module_b` int(10) unsigned NOT NULL,
|
||||
`disable_update` tinyint(1) unsigned NOT NULL default '0',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 6.0RC1-151006
|
||||
Version: 6.0RC1-151007
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0RC1-151006"
|
||||
pandora_version="6.0RC1-151007"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0RC1";
|
||||
my $pandora_build = "151006";
|
||||
my $pandora_build = "151007";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0RC1
|
||||
%define release 151006
|
||||
%define release 151007
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0RC1
|
||||
%define release 151006
|
||||
%define release 151007
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0RC1 PS151006";
|
||||
my $version = "6.0RC1 PS151007";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -1021,8 +1021,8 @@ else {
|
|||
|
||||
# Connect to the DB
|
||||
my $dbh = db_connect ($conf{'dbengine'}, $conf{'dbname'}, $conf{'dbhost'}, $conf{'dbport'}, $conf{'dbuser'}, $conf{'dbpass'});
|
||||
my $history_dbh = ($conf{'_history_db_enabled'} eq '1') ? db_connect ('mysql', $conf{'_history_db_name'},
|
||||
$conf{'_history_db_host'}, '3306', $conf{'_history_db_user'}, $conf{'_history_db_pass'}) : undef;
|
||||
my $history_dbh = ($conf{'_history_db_enabled'} eq '1') ? db_connect ($conf{'dbengine'}, $conf{'_history_db_name'},
|
||||
$conf{'_history_db_host'}, $conf{'_history_db_port'}, $conf{'_history_db_user'}, $conf{'_history_db_pass'}) : undef;
|
||||
|
||||
# Get a lock
|
||||
my $lock = db_get_lock ($dbh, 'pandora_db');
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0RC1 PS151006";
|
||||
my $version = "6.0RC1 PS151007";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue