diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 758ee6811a..622cc7270c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.730-190116 +Version: 7.0NG.730-190117 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 4e5706c7cf..a72de2c8c4 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.730-190116" +pandora_version="7.0NG.730-190117" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 9646cee020..f6989c43ca 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.730'; -use constant AGENT_BUILD => '190116'; +use constant AGENT_BUILD => '190117'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index bd1b569af4..c2a9a68636 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.730 -%define release 190116 +%define release 190117 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1156c6297a..4a83112001 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.730 -%define release 190116 +%define release 190117 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index b4c3b66bab..85826b4ba3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.730" -PI_BUILD="190116" +PI_BUILD="190117" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3c639031de..3139d0cccd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190116} +{190117} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 87cec0dbac..c12964790f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.730(Build 190116)") +#define PANDORA_VERSION ("7.0NG.730(Build 190117)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 91df373d23..537951418e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.730(Build 190116))" + VALUE "ProductVersion", "(7.0NG.730(Build 190117))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d7e1669bf6..bab938db18 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.730-190116 +Version: 7.0NG.730-190117 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index af3a24ea27..305f752fbe 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.730-190116" +pandora_version="7.0NG.730-190117" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 280aba46a5..f805ec33d8 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190116'; +$build_version = 'PC190117'; $pandora_version = 'v7.0NG.730'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index f2056f058e..e8130b6e4d 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3435,4 +3435,60 @@ function pandora_xhprof_display_result($key = "", $method = "link") { } } + +/** + * From a network with a mask remove the smallest ip and the highest + * + * @param string address to identify the network. + * @param string mask to identify the mask network + * @return array or false with smallest ip and highest ip + */ +function range_ips_for_network($address, $mask) { + if(!isset($address) || !isset($mask)){ + return false; + } + + //convert ip addresses to long form + $address_long = ip2long($address); + $mask_long = ip2long($mask); + + //caculate first usable address + $ip_host_first = ((~$mask_long) & $address_long); + $ip_first = ($address_long ^ $ip_host_first) + 1; + + //caculate last usable address + $ip_broadcast_invert = ~$mask_long; + $ip_last = ($address_long | $ip_broadcast_invert) - 1; + + $range = array( + 'first' => long2ip($ip_first), + 'last' => long2ip($ip_last) + ); + + return $range; +} + +/** + * from two ips find out if there is such an ip + * + * @param string ip ip wont validate + * @param string ip_lower + * @param string ip_upper + * @return bool true or false if the ip is between the two ips + */ +function is_in_network ($ip, $ip_lower, $ip_upper) { + if(!isset($ip) || !isset($ip_lower) || !isset($ip_upper)){ + return false; + } + + $ip = (float)sprintf("%u",ip2long($ip)); + $ip_lower = (float)sprintf("%u",ip2long($ip_lower)); + $ip_upper = (float)sprintf("%u",ip2long($ip_upper)); + + if ($ip >= $ip_lower && $ip <= $ip_upper){ + return true; + } else { + return false; + } +} ?> diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index 29728984e1..f33a3b5e68 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -1332,7 +1332,7 @@ function print_phases_donut (recipient, phases) { var svg = d3.select(recipient) .append("svg") .attr("width", 800) - .attr("height", 400) + .attr("height", 500) .append("g"); svg.append("g") @@ -1361,7 +1361,7 @@ function print_phases_donut (recipient, phases) { .outerRadius(radius * 0.9); width = 800; - height = 400; + height = 500; svg.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); var key = function(d){ return d.data.label; }; @@ -1440,6 +1440,8 @@ function print_phases_donut (recipient, phases) { return d.startAngle + (d.endAngle - d.startAngle)/2; } + var ex = 1; + var sum = 0; text.transition().duration(0) .attrTween("transform", function(d) { this._current = this._current || d; @@ -1447,8 +1449,26 @@ function print_phases_donut (recipient, phases) { this._current = interpolate(0); return function(t) { var d2 = interpolate(t); - var pos = outerArc.centroid(d2); - pos[0] = radius * (midAngle(d2) < Math.PI ? 1 : -1); + + //fix for labels of a very small portion increase the + //height of the label so that they do not overlap + if( ( d2.endAngle - d2.startAngle ) < 0.1){ + var pos = outerArc.centroid(d2); + if (ex%2==0){ + pos[0] = 150; + } + else{ + pos[0] = -150; + sum++; + } + pos[1] = pos[1] - (35*sum); + ex++; + } + else{ + var pos = outerArc.centroid(d2); + pos[0] = radius * (midAngle(d2) < Math.PI ? 1 : -1); + } + return "translate("+ pos +")"; }; }) @@ -1458,6 +1478,17 @@ function print_phases_donut (recipient, phases) { this._current = interpolate(0); return function(t) { var d2 = interpolate(t); + + //fix for labels of a very small portion increase the + //height of the label so that they do not overlap + if( ( d2.endAngle - d2.startAngle ) < 0.1){ + if (ex%2==0){ + return "start"; + } + else{ + return "end"; + } + } return midAngle(d2) < Math.PI ? "start":"end"; }; }); @@ -1468,10 +1499,12 @@ function print_phases_donut (recipient, phases) { /* ------- SLICE TO TEXT POLYLINES -------*/ var polyline = svg.select(".lines").selectAll("polyline") .data(pie(data), key); - + polyline.enter() .append("polyline"); + var ex2 = 1; + var sum2 = 0; polyline.transition().duration(0) .attrTween("points", function(d){ this._current = this._current || d; @@ -1479,16 +1512,33 @@ function print_phases_donut (recipient, phases) { this._current = interpolate(0); return function(t) { var d2 = interpolate(t); - var pos = outerArc.centroid(d2); - pos[0] = radius * 0.95 * (midAngle(d2) < Math.PI ? 1 : -1); + + //fix for labels of a very small portion increase the + //height of the label so that they do not overlap + if( ( d2.endAngle - d2.startAngle ) < 0.1){ + var pos = outerArc.centroid(d2); + if (ex2%2==0){ + pos[0] = 150 * 0.95; + } + else{ + pos[0] = -150 * 0.95; + sum2++; + } + pos[1] = pos[1] - (30*sum2); + ex2++; + } + else{ + var pos = outerArc.centroid(d2); + pos[0] = radius * 0.95 * (midAngle(d2) < Math.PI ? 1 : -1); + } return [arc.centroid(d2), outerArc.centroid(d2), pos]; - }; + }; }) .style("stroke", "black") .style("opacity", ".3") .style("stroke-width", "2px") .style("fill", "none"); - + polyline.exit() .remove(); } @@ -2331,4 +2381,4 @@ var digitPattern = [ setTimeout(tick, 1000 - now % 1000); })(); -} \ No newline at end of file +} diff --git a/pandora_console/install.php b/pandora_console/install.php index a82dfc4ca6..f3e5073da0 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -116,7 +116,7 @@
' . __('User ID') . ''; $data[0] .= $jump . '' . $id . ''; $data[1] = '' . __('Full (display) name') . ''; -$data[1] .= $jump . '' . html_print_input_text_extended ("fullname", $user_info["fullname"], '', '', 20, 100, $view_mode, '', 'class="input"', true).''; +$data[1] .= $jump . '' . html_print_input_text_extended ("fullname", $user_info["fullname"], 'fullname', '', 20, 100, $view_mode, '', 'class="input"', true).''; // Show "Picture" (in future versions, why not, allow users to upload it's own avatar here. if (is_user_admin ($id)) { @@ -243,9 +255,9 @@ $table->data[] = $data; $data = array(); $data[0] = ''.__('E-mail').''; -$data[0] .= $jump .''. html_print_input_text_extended ("email", $user_info["email"], '', '', '25', '100', $view_mode, '', 'class="input"', true).''; +$data[0] .= $jump .''. html_print_input_text_extended ("email", $user_info["email"], 'email', '', '25', '100', $view_mode, '', 'class="input"', true).''; $data[1] = ''.__('Phone number').''; -$data[1] .= $jump . '
'.html_print_input_text_extended ("phone", $user_info["phone"], '', '', '20', '30', $view_mode, '', 'class="input"', true).'
'; +$data[1] .= $jump . '
'.html_print_input_text_extended ("phone", $user_info["phone"], 'phone', '', '20', '30', $view_mode, '', 'class="input"', true).'
'; $table->rowclass[] = ''; $table->rowstyle[] = 'font-weight: bold;'; $table->data[] = $data; @@ -254,9 +266,9 @@ if ($view_mode === false) { if ($config["user_can_update_password"]) { $data = array(); $data[0] = ''.__('New Password').''; - $data[0] .= $jump .''.html_print_input_text_extended ("password_new", "", '', '', '25', '45', $view_mode, '', 'class="input"', true, true).''; + $data[0] .= $jump .''.html_print_input_text_extended ("password_new", "", 'password_new', '', '25', '45', $view_mode, '', 'class="input"', true, true).''; $data[1] = ''.__('Password confirmation').''; - $data[1] .= $jump . ''.html_print_input_text_extended ("password_conf", "", '', '', '20', '45', $view_mode, '', 'class="input"', true, true).''; + $data[1] .= $jump . ''.html_print_input_text_extended ("password_conf", "", 'password_conf', '', '20', '45', $view_mode, '', 'class="input"', true, true).''; $table->rowclass[] = ''; $table->rowstyle[] = 'font-weight: bold;'; $table->data[] = $data; diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index f3cd5523e4..96b3fe1277 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.730 -%define release 190116 +%define release 190117 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index b05edc5e78..81c7209412 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.730 -%define release 190116 +%define release 190117 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 674c0d718a..e60fa14e91 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.730-190116 +Version: 7.0NG.730-190117 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index a5f005088e..e9b04e228f 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.730-190116" +pandora_version="7.0NG.730-190117" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 6c90dba2dc..2ccc627454 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.730"; -my $pandora_build = "190116"; +my $pandora_build = "190117"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 4759a018f2..9c2f3d8a14 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -32,7 +32,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.730"; -my $pandora_build = "190116"; +my $pandora_build = "190117"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 87903a3efb..456fa04c0f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.730 -%define release 190116 +%define release 190117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1f46908e02..6185c86068 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.730 -%define release 190116 +%define release 190117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 636984f6b0..603f9fe2c7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.730" -PI_BUILD="190116" +PI_BUILD="190117" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index da655fa933..b456f59405 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.730 PS190116"; +my $version = "7.0NG.730 PS190117"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 85e8ce85f6..891653efc6 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.730 PS190116"; +my $version = "7.0NG.730 PS190117"; # save program name for logging my $progname = basename($0);