Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop

This commit is contained in:
m-lopez-f 2015-08-04 09:32:28 +02:00
commit 44835298fa
24 changed files with 72 additions and 47 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 6.0RC1-150803
Version: 6.0RC1-150804
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.0RC1-150803"
pandora_version="6.0RC1-150804"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '6.0RC1';
use constant AGENT_BUILD => '150803';
use constant AGENT_BUILD => '150804';
# Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => {

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.0RC1
%define release 150803
%define release 150804
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.0RC1
%define release 150803
%define release 150804
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{150803}
{150804}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("6.0RC1(Build 150803)")
#define PANDORA_VERSION ("6.0RC1(Build 150804)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(6.0RC1(Build 150803))"
VALUE "ProductVersion", "(6.0RC1(Build 150804))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 6.0RC1-150803
Version: 6.0RC1-150804
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.0RC1-150803"
pandora_version="6.0RC1-150804"
package_pear=0
package_pandora=1

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC150803';
$build_version = 'PC150804';
$pandora_version = 'v6.0RC1';
// Do not overwrite default timezone set if defined.

View File

@ -157,6 +157,9 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
}
}
// Module name
var module_name = $("#text-module_filter").val();
var idAgents = Array();
jQuery.each ($("#id_agents option:selected"), function (i, val) {
@ -214,6 +217,7 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
"id_agent[]": idAgents,
"all": find_modules,
"module_types_excluded[]": module_types_excluded,
"name": module_name,
"selection_mode": selection_mode,
"serialized": serialized,
"id_server": id_server

View File

@ -63,7 +63,7 @@
<div style='height: 10px'>
<?php
$version = '6.0RC1';
$build = '150803';
$build = '150804';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -46,7 +46,8 @@ if (is_ajax ()) {
if ($get_agents_group_json) {
$id_group = (int) get_parameter('id_group');
$recursion = (int) get_parameter ('recursion', 0);
$custom_condition = get_parameter('custom_condition', '');
$id_os = get_parameter('id_os', '');
$agent_name = get_parameter('name', '');
$privilege = (string) get_parameter ('privilege', "AR");
// Is is possible add keys prefix to avoid auto sorting in js object conversion
@ -65,41 +66,46 @@ if (is_ajax ()) {
$groups = array_keys($groups_orig);
}
// Build filter
$filter = array();
$filter['id_grupo'] = $groups;
$filter = " WHERE id_grupo IN (" . implode(',', $groups) . ") ";
$filter .= io_safe_output($custom_condition);
if (!empty($id_os))
$filter['id_os'] = $id_os;
if (!empty($agent_name))
$filter['nombre'] = '%' . $agent_name . '%';
switch ($status_agents) {
case AGENT_STATUS_NORMAL:
$filter .=
" AND normal_count = total_count";
$filter[] = "(normal_count = total_count)";
break;
case AGENT_STATUS_WARNING:
$filter .=
" AND critical_count = 0 AND warning_count > 0";
$filter[] = "(critical_count = 0 AND warning_count > 0)";
break;
case AGENT_STATUS_CRITICAL:
$filter .=
" AND critical_count > 0";
$filter[] = "(critical_count > 0)";
break;
case AGENT_STATUS_UNKNOWN:
$filter .=
" AND critical_count = 0 AND warning_count = 0
AND unknown_count > 0";
$filter[] = "(critical_count = 0 AND warning_count = 0 AND unknown_count > 0)";
break;
case AGENT_STATUS_NOT_NORMAL:
$filter .= " AND normal_count <> total_count";
$filter[] = "(normal_count <> total_count)";
break;
case AGENT_STATUS_NOT_INIT:
$filter .= " AND notinit_count = total_count";
$filter[] = "(notinit_count = total_count)";
break;
}
$filter .= " ORDER BY nombre ASC";
$agents = db_get_all_rows_sql("SELECT id_agente, nombre
FROM tagente" . $filter);
$filter['order'] = "nombre ASC";
// Build fields
$fields = array('id_agente', 'nombre');
// Perform search
$agents = db_get_all_rows_filter('tagente', $filter, $fields);
if (empty($agents)) $agents = array();
// Add keys prefix
if ($keys_prefix !== "") {
if ($keys_prefix !== '') {
foreach ($agents as $k => $v) {
$agents[$keys_prefix . $k] = $v;
unset($agents[$k]);
@ -215,6 +221,7 @@ if (is_ajax ()) {
if ($get_agent_modules_json_for_multiple_agents) {
$idAgents = get_parameter('id_agent');
$module_types_excluded = get_parameter('module_types_excluded', array());
$module_name = (string) get_parameter('name');
$selection_mode = get_parameter('selection_mode', 'common');
$serialized = get_parameter('serialized', '');
$id_server = (int) get_parameter('id_server', 0);
@ -233,12 +240,26 @@ if (is_ajax ()) {
$filter .= ' AND 1 = 1';
break;
case 'enabled':
$filter .= ' AND disabled = 0';
$filter .= ' AND t1.disabled = 0';
break;
}
if (!empty($module_types_excluded) && is_array($module_types_excluded))
$filter .= ' AND id_tipo_modulo NOT IN (' . implode($module_types_excluded) . ')';
$filter .= ' AND t1.id_tipo_modulo NOT IN (' . implode($module_types_excluded) . ')';
if (!empty($module_name)) {
switch ($config['dbtype']) {
case "mysql":
$filter .= " AND t1.nombre COLLATE utf8_general_ci LIKE '%$module_name%'";
break;
case "postgresql":
$filter .= " AND t1.nombre LIKE '%$module_name%'";
break;
case "oracle":
$filter .= " AND UPPER(t1.nombre) LIKE UPPER('%$module_name%')";
break;
}
}
if (is_metaconsole()) {
$result = array();
@ -356,17 +377,17 @@ if (is_ajax ()) {
else {
$sql = 'SELECT DISTINCT(nombre)
FROM tagente_modulo t1
WHERE ' . $filter .
'AND delete_pending = 0
AND id_agente IN (' . implode(',', $idAgents) . ')';
WHERE ' . $filter . '
AND t1.delete_pending = 0
AND t1.id_agente IN (' . implode(',', $idAgents) . ')';
if ($selection_mode == 'common') {
$sql .= ' AND (
SELECT count(nombre)
FROM tagente_modulo t2
WHERE delete_pending = 0
WHERE t2.delete_pending = 0
AND t1.nombre = t2.nombre
AND id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
AND t2.id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
}
$sql .= ' ORDER BY nombre';

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.0RC1
%define release 150803
%define release 150804
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.0RC1
%define release 150803
%define release 150804
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -39,7 +39,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('step_compact','1'),
('db_scheme_first_version', '6.0dev'),
('db_scheme_version','6.0RC1'),
('db_scheme_build','PD150803'),
('db_scheme_build','PD150804'),
('show_unknown','0'),
('show_lastalerts','1'),
('style','pandora'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 6.0RC1-150803
Version: 6.0RC1-150804
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.0RC1-150803"
pandora_version="6.0RC1-150804"
package_cpan=0
package_pandora=1

View File

@ -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 = "150803";
my $pandora_build = "150804";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.0RC1
%define release 150803
%define release 150804
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.0RC1
%define release 150803
%define release 150804
Summary: Pandora FMS Server
Name: %{name}

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "6.0RC1 PS150803";
my $version = "6.0RC1 PS150804";
# Pandora server configuration
my %conf;

View File

@ -35,7 +35,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "6.0RC1 PS150803";
my $version = "6.0RC1 PS150804";
# save program name for logging
my $progname = basename($0);