diff --git a/extras/docker/build_and_push.sh b/extras/docker/build_and_push.sh index 980087cfe5..91e6fa15e5 100755 --- a/extras/docker/build_and_push.sh +++ b/extras/docker/build_and_push.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build --rm=true --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \ +docker build --rm=true --pull --no-cache --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \ docker push pandorafms/pandorafms:7 diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index eb8b1c3691..6ba34d562c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.734-190503 +Version: 7.0NG.734-190514 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 a2f8aff4d9..ede8b53399 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.734-190503" +pandora_version="7.0NG.734-190514" 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 b680215775..fd001a54f3 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.734'; -use constant AGENT_BUILD => '190503'; +use constant AGENT_BUILD => '190514'; # 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 c60820e6f1..d52c0b9e78 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.734 -%define release 190503 +%define release 190514 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 eca287b258..77bca84902 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.734 -%define release 190503 +%define release 190514 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 6ffa961750..9403638f7e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190503" +PI_BUILD="190514" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/unix/plugins/inventory b/pandora_agents/unix/plugins/inventory index a6d9a8bc83..6ef6233d23 100755 --- a/pandora_agents/unix/plugins/inventory +++ b/pandora_agents/unix/plugins/inventory @@ -4,23 +4,44 @@ # Copyright (c) 2009 Artica Soluciones Tecnologicas S.L. # # inventory Generate a hardware/software inventory. -# +# # Sample usage: ./inventory [cpu] [ram] [video] [nic] [hd] [cdrom] [software] [init_services] [filesystem] [process] [users] # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License for more details. # ############################################################################### use strict; use constant TSTAMP_FILE => '/tmp/pandora_inventory.tstamp'; +use Scalar::Util qw(looks_like_number); +use Data::Dumper; +# Set environment language to English +$ENV{"LANG"} = "en_US"; + +# Check AIX system +my $AIX=0; +my $system = `uname -a | awk '{print $1}'`; +if ($system =~ 'AIX') { + $AIX=1; +} + +sub is_enabled { + my $value = shift; + if ((defined ($value)) && looks_like_number($value) && ($value > 0)){ + # return true + return 1; + } + #return false + return 0; +} # Operation mode (LSHW or HWINFO) my $Mode; @@ -31,12 +52,12 @@ my $Separator; sub get_module_data ($$$$) { my ($name, $hwinfo, $keys, $modules) = @_; my %module; - - # Store keys + $Separator='\s+\*\-'; + # Store keys foreach my $key (@{$keys}) { push (@{$module{'_keys'}}, $key); } - + # Parse module data while (my $line = shift (@{$hwinfo})) { if ($line =~ /$Separator/) { @@ -46,7 +67,7 @@ sub get_module_data ($$$$) { foreach my $key (@{$keys}) { if ($line =~ /$key:\s+(.+)/) { $module{$key} = $1; - # Replace semicolon by comma to avoid parse errors + # Replace semicolon by comma to avoid parse errors $module{$key} =~ s/;/,/g; } } @@ -58,12 +79,65 @@ sub get_module_data ($$$$) { push (@{$modules->{$name}}, \%module); } +sub test_contain ($$) { + my ($value, $array)=@_; + if ( grep( /$value/, @{$array} ) ) { + return 1; + } +} +sub get_module_data_aix_ram_cpu ($$$$) { + my ($name, $hwinfo, $keys, $modules) = @_; + my %module; + # Store keys + foreach my $key (@{$keys}) { + push (@{$module{'_keys'}}, $key); + } + # Parse module data + foreach my $line (@{$hwinfo}) { + foreach my $key (@{$keys}) { + if ($line =~ /$key:\s+(.+)/) { + $module{$key} = $1; + $module{$key} =~ s/,/ /g; + } + } + } + + # No data found + #my @data = keys (%module); + #return unless ($#data >= 0); + + push (@{$modules->{$name}}, \%module); +} +sub get_module_data_aix ($$$$) { + my ($name,$hwinfo,$regex,$modules) = @_; + my %module; + foreach my $line (@{$hwinfo}) { + $line =~ s/\s{2,}/;/g; + $line =~ s/\+ //g; + $line =~ s/\* //g; + } + foreach my $line (@{$hwinfo}) { + if ($line =~ /$regex/){ + my ($var1, $var2, $var3) = split /;/, $line; + my %module; + $module{'device'} = $var1; + $module{'serial'} = $var2; + $module{'description'}=$var3; + $module{'_keys'} = ['device','serial','description']; + push (@{$modules->{$name}}, \%module); + } + } +} # Get a list of information file system in machine sub get_file_system($$) { my ($name, $modules) = @_; - - my @fileSystems = `df -hP | tail -n +2`; #remove the titles of columns + my @fileSystems; + if (is_enabled $AIX){ + @fileSystems = `df -gP | tail -n +2`; + } else { + @fileSystems = `df -hP | tail -n +2`; #remove the titles of columns + } foreach my $row (@fileSystems) { next unless ($row =~ /^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s+\S+\s+(\S+)/); @@ -73,94 +147,110 @@ sub get_file_system($$) { $module{'used'} = $2; $module{'avail'} = $3; $module{'mount'} = $4; - $module{'_keys'} = ['filesystem', 'used','avail', 'mount']; - push (@{$modules->{$name}}, \%module); - } + $module{'_keys'} = ['filesystem', 'used','avail', 'mount']; + push (@{$modules->{$name}}, \%module); + } } # Get a list of services init in machine sub get_servicies_init_machine($$) { my ($name, $modules) = @_; - my $runlevel = `who -r | awk '{print \$2}'`; + my $runlevel; + if (is_enabled $AIX) { + $runlevel = `who -r | awk '{print \$3}'`; + } else { + $runlevel = `who -r | awk '{print \$2}'`; + } #ini trim($runlevel) $runlevel =~ s/^\s*//; #ltrim $runlevel =~ s/\s*$//; #rtrim #end trim($runlevel) - my $script = ""; - + my $script; + if (-e "/etc/rc" . $runlevel .".d/") { - $script = "ls /etc/rc" . $runlevel .".d/ -l | grep \"^l.*\" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; + $script = "ls -l /etc/rc" . $runlevel .".d/ | grep \"^l.*\" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; } else { - $script = "ls /etc/rc.d/rc" . $runlevel .".d/ -l | grep \"^l.*\" | grep \" S.* \" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; - + $script = "ls -l /etc/rc.d/rc" . $runlevel .".d/ | grep \"^l.*\" | grep \" S.* \" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; } - + my @services = `$script`; foreach my $row (@services) { - my %module; - $row =~ s/\n//; - $module{'service'} = $row; - $module{'_keys'} = ['service']; - push (@{$modules->{$name}}, \%module); + $row =~ s/\n//; + $module{'service'} = $row; + $module{'_keys'} = ['service']; + push (@{$modules->{$name}}, \%module); } } # Get a list of running processes sub get_processes ($$) { my ($name, $modules) = @_; + my $script; + if (is_enabled $AIX) { + $script = "ps -eo args | tail -n +2"; + } else { + $script = "ps -eo command | tail -n +2"; + } - my $script = "ps -eo command"; - - my @services = `$script`; - foreach my $row (@services) { - my %module; - # Remove carriage returns - $row =~ s/[\n\l\f]//g; - # Replace semicolon by comma to avoid parse errors - $row =~ s/;/,/g; - $module{'service'} = $row; - $module{'_keys'} = ['service']; - push (@{$modules->{$name}}, \%module); - } + my @services = `$script`; + foreach my $row (@services) { + my %module; + # Remove carriage returns + $row =~ s/[\n\l\f]//g; + # Replace semicolon by comma to avoid parse errors + $row =~ s/;/,/g; + $module{'service'} = $row; + $module{'_keys'} = ['service']; + push (@{$modules->{$name}}, \%module); + } } # Get a list of valid users in the system sub get_users ($$) { - my ($name, $modules) = @_; - - my $script = "cat /etc/passwd"; + my ($name, $modules) = @_; + my $script = "cat /etc/passwd"; my $user = ""; my $estado = ""; - my @services = `$script`; - foreach my $row (@services) { - my %module; + my @services = `$script`; + foreach my $row (@services) { + my %module; - next unless ($row =~ /^([A-Za-z0-9\-\_]*)/); - - $user = $1; - $script = `passwd -S $user`; - if ( $script =~ /^(\S+)\sP./){ - $module{'user'} = $user; - $module{'_keys'} = ['user']; - push (@{$modules->{$name}}, \%module); + next unless ($row =~ /^([A-Za-z0-9\-\_]*)/); + if (is_enabled $AIX) { + $user = $1; + $script = `lsuser $user`; + if ( $script =~ /^(\S+)\sid./){ + $module{'user'} = $user; + $module{'_keys'} = ['user']; + push (@{$modules->{$name}}, \%module); + } + } else { + $user = $1; + $script = `passwd -S $user`; + if ( $script =~ /^(\S+)\sP./){ + $module{'user'} = $user; + $module{'_keys'} = ['user']; + push (@{$modules->{$name}}, \%module); } } + + } } # Show Kernel Information sub get_kernel_info ($$) { - my ($name, $modules) = @_; - my $script = `uname -a | tr -d \";\"`; - my %module; + my ($name, $modules) = @_; + my $script = `uname -a | tr -d \";\"`; + my %module; - $module{'Kernel'} = $script; - $module{'_keys'} = ['Kernel']; - push (@{$modules->{$name}}, \%module); + $module{'Kernel'} = $script; + $module{'_keys'} = ['Kernel']; + push (@{$modules->{$name}}, \%module); } @@ -171,11 +261,13 @@ sub get_software_module_data ($$) { # Guess the current distribution my $distrib_id = ""; - if ( -e "/etc/SuSE-release"){ + if (is_enabled $AIX) { + $distrib_id = "AIX"; + }elsif ( -e "/etc/SuSE-release"){ $distrib_id = "SUSE"; - } elsif ( -e "/etc/redhat-release"){ + }elsif ( -e "/etc/redhat-release"){ $distrib_id = "REDHAT"; - } else { + }else { $distrib_id = "DEBIAN"; } @@ -183,7 +275,9 @@ sub get_software_module_data ($$) { my @soft; if ($distrib_id eq 'DEBIAN') { @soft = `dpkg -l | grep ii`; - } else { + }elsif ($distrib_id eq 'AIX') { + @soft = `lslpp -Lcq | awk -F: '{print "ii "\$1" "\$3" "\$8}'`; + }else { # Sometimes rpm return data splitted in two lines, and with dupes. Thats bad for our inventory system @soft = `rpm -q -a --qf "ii %{NAME} %{VERSION} %{SUMMARY}\n" | grep "^ii" | sort -u`; } @@ -197,7 +291,7 @@ sub get_software_module_data ($$) { $module{'program'} = $1; $module{'version'} = $2; $module{'description'} = $3; - # Replace semicolon by comma to avoid parse errors + # Replace semicolon by comma to avoid parse errors $module{'program'} =~ s/;/,/g; $module{'version'} =~ s/;/,/g; $module{'description'} =~ s/;/,/g; @@ -211,67 +305,95 @@ sub get_software_module_data ($$) { #Get the list of interfaces with the ip assigned sub get_ips ($$) { my ($name, $modules) = @_; + my @interfaces; + my $ifconfig; + if (is_enabled $AIX) { + $ifconfig = `ifconfig -a`; + } else { + $ifconfig = `ifconfig`; + } - my $ifconfig = `ifconfig`; - - my @ifconfig_array = split("\n", $ifconfig); - - for(my $i = 0; $i<$#ifconfig_array; $i++) { - - #Check for an interface - if ($ifconfig_array[$i] =~ /Link/) { - my %info; - - my @line_split = split(" ", $ifconfig_array[$i]); - - #Get interface name - $info{'interface'} = $line_split[0]; - #Get IP address - my $line = $ifconfig_array[$i+1]; - - $line =~ s/\s+//g; + my @ifconfig_array = split("\n", $ifconfig); - @line_split = split(":", $line); - - if($line_split[1] =~ /(\d+\.\d+\.\d+\.\d+).+/) { - $info{'ip'} = $1; - } - - $info{'_keys'} = ['interface', 'ip']; - push (@{$modules->{$name}}, \%info); - - } + foreach (@ifconfig_array){ + if ($_=~/(.*)flags/){ + my $match; + ($match)=$_=~/^(.*?)\: flags/; + $match=~s/://; + push @interfaces,$match; + } + } + foreach (@interfaces) { + my $ifconfig_item=`ifconfig $_`; + my $interface=$_; + my @ip_array = split("\n", $ifconfig_item); + foreach (@ip_array) { + if ($_=~/(?<=inet )(.*)(?= netmask)/){ + my $ip; + ($ip)=$_=~/inet (.*) netmask/; + my %info; + $info{'interface'} = $interface; + $info{'ip'} = $ip; + $info{'_keys'} = ['interface','ip']; + push (@{$modules->{$name}}, \%info); + } + } } } #Get route table sub get_route_table ($$) { - my ($name, $modules) = @_; - - my $route_table = `route`; - - my @table_split = split("\n", $route_table); - - for (my $i=2; $i<=$#table_split; $i++) { - - my @split = split(" ", $table_split[$i]); - - my %info; - - $info{'destination'} = $split[0]; - $info{'gateway'} = $split[1]; - $info{'mask'} = $split[2]; - $info{'flags'} = $split[3]; - $info{'metric'} = $split[4]; - $info{'ref'} = $split[5]; - $info{'use'} = $split[6]; - $info{'interface'} = $split[7]; - - $info{'_keys'} = ['destination', 'gateway', 'mask', 'flags', 'metric', 'use', 'interface']; - - push (@{$modules->{$name}}, \%info); - } + my ($name, $modules) = @_; + my $route_table; + my @table_split; + if (is_enabled $AIX) { + $route_table = `netstat -rn`; + @table_split = split("\n", $route_table); + my $length=scalar @table_split; + for (my $i=4; $i<=$length-4; $i++) { + + my @split = split(" ", $table_split[$i]); + + my %info; + + $info{'destination'} = $split[0]; + $info{'gateway'} = $split[1]; + $info{'mask'} = $split[2]; + $info{'flags'} = $split[3]; + $info{'metric'} = $split[4]; + $info{'ref'} = $split[5]; + $info{'use'} = $split[6]; + $info{'interface'} = $split[7]; + + $info{'_keys'} = ['destination', 'gateway', 'mask', 'flags', 'metric', 'use', 'interface']; + + push (@{$modules->{$name}}, \%info); + } + } else { + $route_table = `route`; + my @table_split = split("\n", $route_table); + + for (my $i=2; $i<=$#table_split; $i++) { + + my @split = split(" ", $table_split[$i]); + + my %info; + + $info{'destination'} = $split[0]; + $info{'gateway'} = $split[1]; + $info{'mask'} = $split[2]; + $info{'flags'} = $split[3]; + $info{'metric'} = $split[4]; + $info{'ref'} = $split[5]; + $info{'use'} = $split[6]; + $info{'interface'} = $split[7]; + + $info{'_keys'} = ['destination', 'gateway', 'mask', 'flags', 'metric', 'use', 'interface']; + + push (@{$modules->{$name}}, \%info); + } + } } # Print module data sub print_module ($$) { @@ -309,14 +431,18 @@ my $enable_all = 0; $interval = $ARGV[0]; if ($#ARGV == 0){ - $enable_all = 1; + $enable_all = 1; +} +if ($interval!=/[:alpha:]/){ + splice @ARGV,0,1; } -foreach my $module (@ARGV) { +foreach my $module (@ARGV) { if ($module eq "all"){ - $enable_all = 1; - } - $enabled{$module} = 1; + $enable_all = 1; + }else { + $enabled{$module} = 1; + } } # Check execution interval @@ -333,76 +459,107 @@ close (FILE); # Retrieve hardware information $Mode = 'LSHW'; $Separator = '\s+\*\-'; -my @hwinfo = `lshw 2>/dev/null`; -if ($? != 0) { - $Mode = 'HWINFO'; - $Separator = 'Hardware Class:'; - @hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`; +my @hwinfo; +if (is_enabled $AIX) { + $Separator = '^\s*$'; + @hwinfo=`prtconf 2>/dev/null`; +} else { + @hwinfo = `lshw 2>/dev/null`; + if ($? != 0) { + $Mode = 'HWINFO'; + $Separator = 'Hardware Class:'; + @hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`; + } } -# Parse hardware information my %modules; -while (my $line = shift (@hwinfo)) { + + if (is_enabled $AIX) { + #CPU + # VIDEO + ### Not avilable in AIX ### + # NIC + ### Not relevant in AIX ### + if ((test_contain('ent',\@hwinfo)) && ($enable_all == 1 || $enabled{'nic'} == 1)) { + get_module_data_aix ('NIC',\@hwinfo,'^ent',\%modules); + } + if ((test_contain('hdisk',\@hwinfo)) && ($enable_all == 1 || $enabled{'hd'} == 1)) { + get_module_data_aix ('HD',\@hwinfo,'^hdisk',\%modules); + } + + foreach my $line (@hwinfo) { + chomp ($line); + #CPU + if (($line =~ /^Memory Size:/) && ($enable_all == 1 || $enabled{'ram'} == 1)) { + get_module_data_aix_ram_cpu ('RAM', \@hwinfo, ['Memory Size','Good Memory Size'], \%modules); + } + + if (($line =~ /^System Model/) && ($enable_all == 1 || $enabled{'cpu'} == 1)) { + get_module_data_aix_ram_cpu ('CPU', \@hwinfo, ['System Model', 'Processor Implementation Mode', 'Number Of Processors'], \%modules); + } + } +} else { + # Parse hardware information + while (my $line= shift (@hwinfo)) { chomp ($line); + # CPU + if (($line =~ /\*\-cpu/ || $line =~ /Hardware Class: cpu/) && ($enable_all == 1 || $enabled{'cpu'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('CPU', \@hwinfo, ['product', 'vendor', 'capacity'], \%modules); + } else { + get_module_data ('CPU', \@hwinfo, ['Model', 'Vendor', 'Clock'], \%modules); + } + } - # CPU - if (($line =~ /\*\-cpu/ || $line =~ /Hardware Class: cpu/) && ($enable_all == 1 || $enabled{'cpu'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('CPU', \@hwinfo, ['product', 'vendor', 'capacity'], \%modules); - } else { - get_module_data ('CPU', \@hwinfo, ['Model', 'Vendor', 'Clock'], \%modules); - } - } + # RAM + if (($line =~ /\*\-bank/ || $line =~ /\*\-memory/ || $line =~ /Hardware Class: memory/) && ($enable_all == 1 || $enabled{'ram'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('RAM', \@hwinfo, ['description', 'size'], \%modules); + } else { + get_module_data ('RAM', \@hwinfo, ['Model', 'Memory Size'], \%modules); + } + } - # RAM - if (($line =~ /\*\-bank/ || $line =~ /Hardware Class: memory/) && ($enable_all == 1 || $enabled{'ram'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('RAM', \@hwinfo, ['description', 'size'], \%modules); - } else { - get_module_data ('RAM', \@hwinfo, ['Model', 'Memory Size'], \%modules); - } - } + # VIDEO + if (($line =~ /\*\-display/ || $line =~ /Hardware Class: graphics card/) && ($enable_all == 1 || $enabled{'video'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('VIDEO', \@hwinfo, ['product', 'description', 'vendor'], \%modules); + } else { + # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor + get_module_data ('VIDEO', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); + } + } - # VIDEO - if (($line =~ /\*\-display/ || $line =~ /Hardware Class: graphics card/) && ($enable_all == 1 || $enabled{'video'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('VIDEO', \@hwinfo, ['product', 'description', 'vendor'], \%modules); - } else { - # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor - get_module_data ('VIDEO', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); - } - } + # NIC + if (($line =~ /\*\-network/ || $line =~ /Hardware Class: network/) && ($enable_all == 1 || $enabled{'nic'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('NIC', \@hwinfo, ['product', 'description', 'vendor', 'serial'], \%modules); + } else { + # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor + get_module_data ('NIC', \@hwinfo, ['Model', ' Device', ' Vendor', 'HW Address'], \%modules); + } + } - # NIC - if (($line =~ /\*\-network/ || $line =~ /Hardware Class: network/) && ($enable_all == 1 || $enabled{'nic'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('NIC', \@hwinfo, ['product', 'description', 'vendor', 'serial'], \%modules); - } else { - # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor - get_module_data ('NIC', \@hwinfo, ['Model', ' Device', ' Vendor', 'HW Address'], \%modules); - } - } - - # CDROM - if (($line =~ /\*\-cdrom/ || $line =~ /Hardware Class: cdrom/) && ($enable_all == 1 || $enabled{'cdrom'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('CDROM', \@hwinfo, ['product', 'description', 'vendor'], \%modules); - } else { - # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor - get_module_data ('CDROM', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); - } - } + # CDROM + if (($line =~ /\*\-cdrom/ || $line =~ /Hardware Class: cdrom/) && ($enable_all == 1 || $enabled{'cdrom'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('CDROM', \@hwinfo, ['product', 'description', 'vendor'], \%modules); + } else { + # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor + get_module_data ('CDROM', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); + } + } - # HD - if (($line =~ /\*\-disk/ || $line =~ /Hardware Class: disk/) && ($enable_all == 1 || $enabled{'hd'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('HD', \@hwinfo, ['product', 'description', 'size'], \%modules); - } else { - get_module_data ('HD', \@hwinfo, ['Model', 'Serial ID', 'Size'], \%modules); - } - } + # HD + if (($line =~ /\*\-disk/ || $line =~ /Hardware Class: disk/) && ($enable_all == 1 || $enabled{'hd'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('HD', \@hwinfo, ['product', 'description', 'size'], \%modules); + } else { + get_module_data ('HD', \@hwinfo, ['Model', 'Serial ID', 'Size'], \%modules); + } + } + } } - # Software if ($enable_all == 1 || $enabled{'software'} == 1) { get_software_module_data ('Software', \%modules); @@ -410,12 +567,12 @@ if ($enable_all == 1 || $enabled{'software'} == 1) { #init_services if ($enable_all == 1 || $enabled{'init_services'} == 1) { - get_servicies_init_machine ('Init services', \%modules); + get_servicies_init_machine ('Init_services', \%modules); } #filesystem if ($enable_all == 1 || $enabled{'filesystem'} == 1) { - get_file_system('File system', \%modules); + get_file_system('Filesystem', \%modules); } #processes @@ -442,7 +599,6 @@ if ($enable_all == 1 || $enabled{'route'} == 1) { if ($enable_all == 1 || $enabled{'kernel'} == 1){ get_kernel_info ('Kernel', \%modules); } - # Print module data print "\n"; while (my ($name, $module) = each (%modules)) { diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 144b069fdd..a54477ba42 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190503} +{190514} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c66bd9f4ca..9eef4e589e 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.734(Build 190503)") +#define PANDORA_VERSION ("7.0NG.734(Build 190514)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4b8c5f45fe..56ba6cc522 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.734(Build 190503))" + VALUE "ProductVersion", "(7.0NG.734(Build 190514))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 17ae6188e5..aad7098af4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.734-190503 +Version: 7.0NG.734-190514 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 f261003fdc..c968940f1f 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.734-190503" +pandora_version="7.0NG.734-190514" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/mr/28.sql b/pandora_console/extras/mr/28.sql index c4a95c252f..b6ca45431c 100644 --- a/pandora_console/extras/mr/28.sql +++ b/pandora_console/extras/mr/28.sql @@ -4,4 +4,10 @@ ALTER TABLE `treport_content` ADD COLUMN `current_month` TINYINT(1) DEFAULT '1'; ALTER TABLE `treport_content_template` ADD COLUMN `current_month` TINYINT(1) DEFAULT '1'; +ALTER TABLE `talert_commands` ADD COLUMN `fields_hidden` text; + +ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal'); + +DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event'; + COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php index 10e9fbfd42..34cfac8ea4 100644 --- a/pandora_console/extras/pandora_diag.php +++ b/pandora_console/extras/pandora_diag.php @@ -122,7 +122,7 @@ function execution_time() if ($times[0]['datos'] > ($times[1]['datos'] * 1.2)) { return "Warning Status   The execution time could be degrading. For a more extensive information of this data consult the Execution Time graph"; } else { - return "Normal Status   The execution time is correct. For a more extensive information of this data consult the Execution Time graph"; + return "Normal Status   The execution time is correct. For more information about this data, check the Execution Time graph"; } } @@ -173,9 +173,9 @@ function license_capacity() $status_license_capacity = ''; $current_count = db_get_value_sql('SELECT count(*) FROM tagente'); if ($current_count > ($license_limit * 90 / 100)) { - $status_license_capacity = "Warning Status   The license capacity is more than 90 percent"; + $status_license_capacity = "Warning Status   License capacity exceeds 90 percent"; } else { - $status_license_capacity = "Normal Status   The license capacity is less than 90 percent"; + $status_license_capacity = "Normal Status   License capacity is less than 90 percent"; } return $status_license_capacity; @@ -202,9 +202,9 @@ function interval_average_of_network_modules() $average_time = ((int) $total_module_interval_time / $total_network_modules); if ($average_time < 180) { - $status_average_modules = "Warning Status   The system has a lot of load (average time $average_time) and a very fine configuration is required"; + $status_average_modules = "Warning Status   The system is overloaded (average time $average_time) and a very fine configuration is required"; } else { - $status_average_modules = "Normal Status   The system has an acceptable charge (average time $average_time) "; + $status_average_modules = "Normal Status   The system is not overloaded (average time $average_time) "; } if ($average_time == 0) { @@ -221,9 +221,9 @@ $attachment_total_files = count(glob($config['homedir'].'/attachment/{*.*}', GLO function files_attachment_folder($total_files) { if ($total_files <= 700) { - $status_total_files = "Normal Status   The attachment folder has less than 700 files."; + $status_total_files = "Normal Status   The attached folder contains less than 700 files."; } else { - $status_total_files = "Warning Status   The attachment folder has more than 700 files."; + $status_total_files = "Warning Status   The attached folder contains more than 700 files."; } return $status_total_files; @@ -236,9 +236,9 @@ $tagente_datos_size = db_get_value_sql('SELECT COUNT(*) FROM tagente_datos'); function status_tagente_datos($tagente_datos_size) { if ($tagente_datos_size <= 3000000) { - $tagente_datos_size = "Normal Status   The tagente_datos table has an acceptable amount of data."; + $tagente_datos_size = "Normal Status   The tagente_datos table contains an acceptable amount of data."; } else { - $tagente_datos_size = "Warning Status   The tagente_datos table has too much data. A historical database is recommended."; + $tagente_datos_size = "Warning Status   The tagente_datos table contains too much data. A historical database is recommended."; } return $tagente_datos_size; @@ -302,9 +302,9 @@ function status_fragmentation_tables($tables_fragmentation_max_rec_value, $table { $status_tables_frag = ''; if ($tables_fragmentation > $tables_fragmentation_max_rec_value) { - $status_tables_frag = "Warning Status   The fragmentation tables is higher than recommended. You should defragment them."; + $status_tables_frag = "Warning Status   Table fragmentation is higher than recommended. They should be defragmented."; } else { - $status_tables_frag = "Normal Status   The fragmentation tables is correct."; + $status_tables_frag = "Normal Status   Table fragmentation is correct."; } return $status_tables_frag; @@ -320,9 +320,9 @@ if ($console_mode == 1) { echo "\nPandora FMS PHP diagnostic tool v3.2 (c) Artica ST 2009-2010 \n"; if ($argc == 1 || in_array($argv[1], ['--help', '-help', '-h', '-?'])) { - echo "\nThis command line script gives information about Pandora FMS database. -This program only can be executed from console, and need a parameter, the -full path to Pandora FMS 'config.php' file. + echo "\nThis command line script contains information about Pandora FMS database. + This program can only be executed from the console, and it needs a parameter, the + full path to Pandora FMS 'config.php' file. Usage: php pandora_diag.php path_to_pandora_console @@ -705,7 +705,7 @@ render_info_data( render_row($tables_fragmentation_max_rec_value.'%', 'Tables fragmentation (maximum recommended value)'); render_row(number_format($tables_fragmentation, 2).'%', 'Tables fragmentation (current value)'); - render_row(status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation), 'Status fragmentation tables'); + render_row(status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation), 'Table fragmentation status'); echo "".__(' Pandora FMS logs dates').''; @@ -734,14 +734,14 @@ render_info_data( echo "".__(' Status of the attachment folder').''; - render_row($attachment_total_files, 'Total files in the attachment folder'); + render_row($attachment_total_files, 'Total files in the attached folder'); render_row(files_attachment_folder($attachment_total_files), 'Status of the attachment folder'); echo "".__(' Information from the tagente_datos table').''; - render_row($tagente_datos_size, 'Total data in the tagente_datos table'); - render_row(status_tagente_datos($tagente_datos_size), 'Status of the tagente_datos table'); - render_row(execution_time(), 'Degradation of the execution time when executing a count'); + render_row($tagente_datos_size, 'Total data in tagente_datos table'); + render_row(status_tagente_datos($tagente_datos_size), 'Tangente_datos table status'); + render_row(execution_time(), 'Execution time degradation when executing a count'); echo "".__(' Pandora FMS server threads').''; @@ -784,6 +784,6 @@ render_info_data( echo "
"; echo ''.__( - '(*) Please check your Pandora Server setup and be sure that database maintenance daemon is running. It\' very important to -keep up-to-date database to get the best performance and results in Pandora' + '(*) Please check your Pandora Server setup and make sure that the database maintenance daemon is running. It\' is very important to + keep the database up-to-date to get the best performance and results in Pandora' ).'


'; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 4c5348b3a1..74ea08a608 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1198,6 +1198,7 @@ ALTER TABLE talert_actions ADD COLUMN `field15_recovery` TEXT NOT NULL DEFAULT " UPDATE `talert_commands` SET `fields_descriptions` = '[\"Integria IMS API path\",\"Integria IMS API pass\",\"Integria IMS user\",\"Integria IMS user pass\",\"Ticket title\",\"Ticket group ID\",\"Ticket priority\",\"Email copy\",\"Ticket owner\",\"Ticket description\"]', `fields_values` = '[\"\",\"\",\"\",\"\",\"\",\"\",\"10,Maintenance;0,Informative;1,Low;2,Medium;3,Serious;4,Very Serious\",\"\",\"\",\"\"]' WHERE `id` = 11 AND `name` = 'Integria IMS Ticket'; UPDATE `talert_commands` SET `description` = 'This alert send an email using internal Pandora FMS Server SMTP capabilities (defined in each server, using: _field1_ as destination email address, and _field2_ as subject for message. _field3_ as text of message. _field4_ as content type (text/plain or html/text).', `fields_descriptions` = '[\"Destination address\",\"Subject\",\"Text\",\"Content Type\",\"\",\"\",\"\",\"\",\"\",\"\"]', `fields_values` = '[\"\",\"\",\"_html_editor_\",\"_content_type_\",\"\",\"\",\"\",\"\",\"\",\"\"]' WHERE id=1; ALTER TABLE `talert_commands` ADD COLUMN `id_group` mediumint(8) unsigned NULL default 0; +ALTER TABLE `talert_commands` ADD COLUMN `fields_hidden` text; UPDATE `talert_actions` SET `field4` = 'text/html', `field4_recovery` = 'text/html' WHERE id = 1; @@ -2104,3 +2105,9 @@ ALTER TABLE `tnetflow_filter` DROP COLUMN `output`; -- Update table `tuser_task` -- ---------------------------------------------------------------------- UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; + +-- ---------------------------------------------------------------------- +-- Alter table `talert_templates` +-- ---------------------------------------------------------------------- + + ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal'); diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index a7fc1f156a..cee4cb2684 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -167,27 +167,18 @@ if ($disk_conf_delete) { echo '
'; -$table = new stdClass(); -$table->width = '100%'; -$table->class = 'databox filters'; - -$table->head = []; -$table->style = []; -$table->style[0] = 'font-weight: bold; width: 150px;'; -$table->data = []; - -$table->align[2] = 'center'; - if (!$new_agent && $alias != '') { - $table->data[0][0] = __('Agent name').ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true); - $table->data[0][1] = html_print_input_text('agente', $nombre_agente, '', 50, 100, true); + $table_agent_name = '

'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'

'; + $table_agent_name .= '
'; + $table_agent_name .= '
'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'
'; + $table_agent_name .= '
'; - $table->data[0][2] = __('QR Code Agent view'); + $table_qr_code = '

'.__('QR Code Agent view').':

'; if ($id_agente) { - $table->data[0][1] .= ' '.__('ID')."  $id_agente  "; - $table->data[0][1] .= '  '; - $table->data[0][1] .= html_print_image( + $table_agent_name .= ''.__('ID').' '.$id_agente.''; + $table_agent_name .= ''; + $table_agent_name .= html_print_image( 'images/zoom.png', true, [ @@ -195,20 +186,23 @@ if (!$new_agent && $alias != '') { 'title' => __('Agent detail'), ] ); - $table->data[0][1] .= ''; + $table_agent_name .= ''; } -} -// Remote configuration available -if (!$new_agent) { + $agent_options_update = 'agent_options_update'; + + // Delete link from here. + $table_agent_name .= "".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).''; + + // Remote configuration available. if (isset($filename)) { if (file_exists($filename['md5'])) { $agent_name = agents_get_name($id_agente); $agent_name = io_safe_output($agent_name); $agent_md5 = md5($agent_name, false); - $table->data[0][1] .= '  '.''; - $table->data[0][1] .= html_print_image( + $table_agent_name .= ''; + $table_agent_name .= html_print_image( 'images/application_edit.png', true, [ @@ -216,35 +210,44 @@ if (!$new_agent) { 'title' => __('This agent can be remotely configured'), ] ); - $table->data[0][1] .= ''.ui_print_help_tip( + $table_agent_name .= ''.ui_print_help_tip( __('You can remotely edit this agent configuration'), true ); } } + + $table_agent_name .= '
'; } -// Delete link from here -if (!$new_agent) { - $table->data[0][1] .= "  ".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).''; -} - -$table->data[1][0] = __('Alias').ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).''; -$table->data[1][1] = html_print_input_text('alias', $alias, '', 50, 100, true); if ($new_agent) { - $table->data[1][1] .= html_print_checkbox('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name'); + $label_select_child_left = 'label_select_child_left'; + $label_select_parent = 'label_select_parent'; } -$table->data[2][0] = __('IP Address'); -$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).html_print_checkbox('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true); +$table_alias = '

'.__('Alias').': '.ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'

'; +$table_alias .= '
'; +$table_alias .= '
'.html_print_input_text('alias', $alias, '', 50, 100, true).'
'; +if ($new_agent) { + $table_alias .= '
'.html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name').'
'; +} + +$table_alias .= '
'; + +$table_ip = '

'.__('IP Address').':

'; +$table_ip .= '
'; +$table_ip .= '
'.html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).'
'; +$table_ip .= '
'.html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true).'
'; +$table_ip .= '
'; if ($id_agente) { - $table->data[2][1] .= '    '; - $ip_all = agents_get_addresses($id_agente); - $table->data[2][1] .= html_print_select($ip_all, 'address_list', $direccion_agente, '', '', 0, true); - $table->data[2][1] .= ' '.html_print_checkbox('delete_ip', 1, false, true).__('Delete selected'); + $table_ip .= '
'; + $table_ip .= '
'; + $table_ip .= '
'.html_print_select($ip_all, 'address_list', $direccion_agente, '', '', 0, true).'
'; + $table_ip .= '
'.html_print_checkbox_switch('delete_ip', 1, false, true).__('Delete selected').'
'; + $table_ip .= '
'; } ?> @@ -254,13 +257,12 @@ if ($id_agente) { } rowspan[2][2] = 3; +if (!$new_agent && $alias != '') { if ($id_agente) { - $table->data[2][2] = ""; - } else { - $table->data[2][2] = __('Only it is show when
the agent is saved.'); + $table_qr_code .= ""; } + + $table_qr_code .= '
'; } $groups = users_get_groups($config['id_user'], 'AR', false); @@ -277,28 +279,32 @@ if (is_array($modules)) { } } -$table->data[4][0] = __('Primary group'); -// Cannot change primary group if user have not permission for that group +$table_primary_group = '

'.__('Primary group').':

'; +$table_primary_group .= '
'; +// Cannot change primary group if user have not permission for that group. if (isset($groups[$grupo]) || $new_agent) { - $table->data[4][1] = html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true); + $table_primary_group .= html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true); } else { - $table->data[4][1] = groups_get_name($grupo); - $table->data[4][1] .= html_print_input_hidden('grupo', $grupo, true); + $table_primary_group .= groups_get_name($grupo); + $table_primary_group .= html_print_input_hidden('grupo', $grupo, true); } -$table->data[4][1] .= ' '; -$table->data[4][1] .= ui_print_group_icon($grupo, true); -$table->data[4][1] .= ''; +$table_primary_group .= '
'; +$table_primary_group .= ui_print_group_icon($grupo, true); +$table_primary_group .= '
'; -$table->data[5][0] = __('Interval'); - -$table->data[5][1] = html_print_extended_select_for_time('intervalo', $intervalo, '', '', '0', 10, true); +$table_interval = '

'.__('Interval').':

'; +$table_interval .= '
'; +$table_interval .= html_print_extended_select_for_time('intervalo', $intervalo, '', '', '0', 10, true); if ($intervalo < SECONDS_5MINUTES) { - $table->data[5][1] .= clippy_context_help('interval_agent_min'); + $table_interval .= clippy_context_help('interval_agent_min'); } -$table->data[6][0] = __('OS'); -$table->data[6][1] = html_print_select_from_sql( +$table_interval .= '
'; + +$table_os = '

'.__('OS').':

'; +$table_os .= '
'; +$table_os .= html_print_select_from_sql( 'SELECT id_os, name FROM tconfig_os', 'id_os', $id_os, @@ -307,18 +313,19 @@ $table->data[6][1] = html_print_select_from_sql( '0', true ); -$table->data[6][1] .= ' '; -$table->data[6][1] .= ui_print_os_icon($id_os, false, true); -$table->data[6][1] .= ''; +$table_os .= '
'; +$table_os .= ui_print_os_icon($id_os, false, true); +$table_os .= '
'; -// Network server +// Network server. $servers = servers_get_names(); if (!array_key_exists($server_name, $servers)) { $server_Name = 0; // Set the agent have not server. } -$table->data[7][0] = __('Server'); +$table_server = '

'.__('Server').':

'; +$table_server .= '
'; if ($new_agent) { // Set first server by default. $servers_get_names = servers_get_names(); @@ -326,7 +333,7 @@ if ($new_agent) { $server_name = reset($array_keys_servers_get_names); } -$table->data[7][1] = html_print_select( +$table_server .= html_print_select( servers_get_names(), 'server_name', $server_name, @@ -334,36 +341,35 @@ $table->data[7][1] = html_print_select( __('None'), 0, true -).' '.ui_print_help_icon('agent_server', true); +).'
'.ui_print_help_icon('agent_server', true).'
'; -// Description -$table->data[8][0] = __('Description'); -$table->data[8][1] = html_print_input_text( +// Description. +$table_description = '

'.__('Description').':

'; +$table_description .= html_print_input_text( 'comentarios', $comentarios, '', 45, 200, true -); +).'
'; -html_print_table($table); -unset($table); -$table = new stdClass(); -$table->width = '100%'; -$table->class = 'databox filters'; +echo '
+
+
'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'
+
'.$table_interval.$table_os.$table_server.$table_description.'
+
'; +if (!$new_agent && $alias != '') { + echo $table_qr_code; +} -$table->head = []; -$table->style = []; -$table->style[0] = 'font-weight: bold; '; -$table->style[4] = 'font-weight: bold;'; -$table->data = []; +echo '
'; if (enterprise_installed()) { $secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]); - $table->data['secondary_groups'][0] = __('Secondary groups').ui_print_help_icon('secondary_groups', true); - $table->data['secondary_groups'][1] = html_print_select_groups( + $table_adv_secondary_groups = '

'.__('Secondary groups').': '.ui_print_help_icon('secondary_groups', true).'

'; + $table_adv_secondary_groups_left = html_print_select_groups( false, // Use the current user to select the groups 'AR', @@ -390,7 +396,7 @@ if (enterprise_installed()) { // CSS classnames (default) false, // Not disabled (default) - false, + 'width:50%; min-width:170px; text-align:center', // Inline styles (default) false, // Option style select (default) @@ -404,29 +410,31 @@ if (enterprise_installed()) { // Do not show the primary group in this selection ); - $table->data['secondary_groups'][2] = html_print_input_image( + $table_adv_secondary_groups_arrows = html_print_input_image( 'add_secondary', - 'images/darrowright.png', + 'images/darrowright_green.png', 1, '', true, [ + 'id' => 'right_autorefreshlist', 'title' => __('Add secondary groups'), 'onclick' => 'agent_manager_add_secondary_groups(event, '.$id_agente.');', ] - ).'



'.html_print_input_image( + ).html_print_input_image( 'remove_secondary', - 'images/darrowleft.png', + 'images/darrowleft_green.png', 1, '', true, [ + 'id' => 'left_autorefreshlist', 'title' => __('Remove secondary groups'), 'onclick' => 'agent_manager_remove_secondary_groups(event, '.$id_agente.');', ] ); - $table->data['secondary_groups'][3] = html_print_select( + $table_adv_secondary_groups_right .= html_print_select( $secondary_groups_selected['for_select'], // Values 'secondary_groups_selected', @@ -441,8 +449,16 @@ if (enterprise_installed()) { // Nothing selected true, // Return HTML (not echo) - true + true, // Multiple selection + true, + // Sort + '', + // Class + false, + // Disabled + 'width:50%; min-width:170px; text-align:center' + // Style ); // safe operation mode @@ -457,47 +473,42 @@ if (enterprise_installed()) { $safe_mode_modules[$m['id_module']] = $m['name']; } - $table->data[2][0] = __('Safe operation mode').ui_print_help_tip( + $table_adv_safe = '

'.__('Safe operation mode').': '.ui_print_help_tip( __( 'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status', get_product_name() ), true - ); - $table->data[2][1] = html_print_checkbox('safe_mode', 1, $safe_mode, true); - $table->data[2][1] .= '  '.__('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true); + ).'

'; + $table_adv_safe .= html_print_checkbox_switch('safe_mode', 1, $safe_mode, true); + $table_adv_safe .= __('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true).'
'; } // Remote configuration - $table->data[5][0] = __('Remote configuration'); + $table_adv_remote = '

'.__('Remote configuration').':

'; - if (!$new_agent) { - $table->data[5][1] = ''.__('Not available').''; - if (isset($filename)) { - if (file_exists($filename['md5'])) { - $table->data[5][1] = date('F d Y H:i:s', fileatime($filename['md5'])); - // Delete remote configuration - $table->data[5][1] .= ''; - $table->data[5][1] .= html_print_image( - 'images/cross.png', - true, - [ - 'title' => __('Delete remote configuration file'), - 'style' => 'vertical-align: middle;', - ] - ).''; - $table->data[5][1] .= ''.ui_print_help_tip( - __('Delete this conf file implies that for restore you must reactive remote config in the local agent.'), - true - ); - } - } + if (!$new_agent && isset($filename) && file_exists($filename['md5'])) { + $table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5'])); + // Delete remote configuration + $table_adv_remote .= ''; + $table_adv_remote .= html_print_image( + 'images/cross.png', + true, + [ + 'title' => __('Delete remote configuration file'), + 'style' => 'vertical-align: middle;', + ] + ).''; + $table_adv_remote .= ''.ui_print_help_tip( + __('Delete this conf file implies that for restore you must reactive remote config in the local agent.'), + true + ); } else { - $table->data[5][1] = ''.__('Not available').''; + $table_adv_remote .= ''.__('Not available').''; } - + $table_adv_remote .= '
'; $cps_array[-1] = __('Disabled'); if ($cps > 0) { @@ -511,16 +522,16 @@ if (enterprise_installed()) { $cps_array[$cps_inc] = __('Enabled'); } - $table->data[6][0] = __('Cascade protection services'); - $table->data[6][0] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true); - $table->data[6][1] = html_print_select($cps_array, 'cps', $cps, '', '', 0, true); + $table_adv_cascade = '

'.__('Cascade protection services').': '; + $table_adv_cascade .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true).'

'; + $table_adv_cascade .= html_print_select($cps_array, 'cps', $cps, '', '', 0, true).'
'; } // Custom ID -$table->data[0][0] = __('Custom ID'); -$table->data[0][1] = html_print_input_text('custom_id', $custom_id, '', 16, 255, true); +$table_adv_custom_id = '

'.__('Custom ID').':

'; +$table_adv_custom_id .= html_print_input_text('custom_id', $custom_id, '', 16, 255, true).'
'; -$table->data[1][0] = __('Parent'); +$table_adv_parent = '

'.__('Parent').':

'; $params = []; $params['return'] = true; $params['show_helptip'] = true; @@ -532,75 +543,79 @@ $params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent); $params['selectbox_id'] = 'cascade_protection_module'; $params['javascript_is_function_select'] = true; $params['cascade_protection'] = true; - -$table->data[1][1] = ui_print_agent_autocomplete_input($params); +$table_adv_parent .= '
'; +$table_adv_parent .= ui_print_agent_autocomplete_input($params); if (enterprise_installed()) { - $table->data[1][1] .= html_print_checkbox('cascade_protection', 1, $cascade_protection, true).__('Cascade protection').' '.ui_print_help_icon('cascade_protection', true); + $table_adv_parent .= html_print_checkbox_switch('cascade_protection', 1, $cascade_protection, true).__('Cascade protection').' '.ui_print_help_icon('cascade_protection', true); } -$table->data[1][1] .= '  '.__('Module').' '.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true); +$table_adv_parent .= __('Module').' '.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true).'
'; + // Learn mode / Normal mode -$table->data[3][0] = __('Module definition').ui_print_help_icon('module_definition', true); -$table->data[3][1] = __('Learning mode').' '.html_print_radio_button_extended( +$table_adv_module_mode = '

'.__('Module definition').': '.ui_print_help_icon('module_definition', true).'

'; +$table_adv_module_mode .= '
'; +$table_adv_module_mode .= html_print_radio_button_extended( 'modo', 1, - '', + __('Learning mode'), $modo, false, 'show_modules_not_learning_mode_context_help();', - 'style="margin-right: 40px;"', + '', true ); -$table->data[3][1] .= __('Normal mode').' '.html_print_radio_button_extended( +$table_adv_module_mode .= html_print_radio_button_extended( 'modo', 0, - '', + __('Normal mode'), $modo, false, 'show_modules_not_learning_mode_context_help();', - 'style="margin-right: 40px;"', + '', true ); -$table->data[3][1] .= __('Autodisable mode').' '.html_print_radio_button_extended( +$table_adv_module_mode .= html_print_radio_button_extended( 'modo', 2, - '', + __('Autodisable mode'), $modo, false, 'show_modules_not_learning_mode_context_help();', - 'style="margin-right: 40px;"', + '', true ); +$table_adv_module_mode .= '
'; // Status (Disabled / Enabled) -$table->data[4][0] = __('Status'); -$table->data[4][1] = __('Disabled').' '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).' '.html_print_radio_button_extended('disabled', 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); -$table->data[4][1] .= __('Enabled').' '.html_print_radio_button_extended('disabled', 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); +$table_adv_status = '

'.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'

'; +$table_adv_status .= html_print_checkbox_switch('disabled', 1, $disabled, true).'
'; + +// Url address. if (enterprise_installed()) { - $table->data[4][2] = __('Url address').ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true); - $table->data[4][3] = html_print_input_text( + $table_adv_url = '

'.__('Url address').': '.ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true).'

'; + $table_adv_url .= html_print_input_text( 'url_description', $url_description, '', 45, 255, true - ); + ).'
'; } else { - $table->data[5][0] = __('Url address'); - $table->data[5][1] = html_print_input_text( + $table_adv_url = '

'.__('Url address').':

'; + $table_adv_url .= html_print_input_text( 'url_description', $url_description, '', 45, 255, true - ); + ).''; } -$table->data[5][2] = __('Quiet'); -$table->data[5][3] .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true); -$table->data[5][3] = html_print_checkbox('quiet', 1, $quiet, true); +$table_adv_quiet = '

'.__('Quiet').': '; +$table_adv_quiet .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true).'

'; +$table_adv_quiet .= html_print_checkbox_switch('quiet', 1, $quiet, true).'
'; $listIcons = gis_get_array_list_icons(); @@ -611,7 +626,7 @@ foreach ($listIcons as $index => $value) { $path = 'images/gis_map/icons/'; // TODO set better method the path -$table->data[0][2] = __('Agent icon').ui_print_help_tip(__('Agent icon for GIS Maps.'), true); +$table_adv_agent_icon = '

'.__('Agent icon').': '.ui_print_help_tip(__('Agent icon for GIS Maps.'), true).'

'; if ($icon_path == '') { $display_icons = 'none'; // Hack to show no icon. Use any given image to fix not found image errors @@ -629,7 +644,7 @@ if ($icon_path == '') { $path_warning = $path.$icon_path.'.warning.png'; } -$table->data[0][3] = html_print_select( +$table_adv_agent_icon .= html_print_select( $arraySelectIcon, 'icon_path', $icon_path, @@ -637,63 +652,68 @@ $table->data[0][3] = html_print_select( __('None'), '', true -).' '.html_print_image( +).html_print_image( $path_ok, true, [ 'id' => 'icon_ok', 'style' => 'display:'.$display_icons.';', ] -).' '.html_print_image( +).html_print_image( $path_bad, true, [ 'id' => 'icon_bad', 'style' => 'display:'.$display_icons.';', ] -).' '.html_print_image( +).html_print_image( $path_warning, true, [ 'id' => 'icon_warning', 'style' => 'display:'.$display_icons.';', ] -); +).'
'; if ($config['activate_gis']) { - $table->data[3][2] = __('Ignore new GIS data:'); - $table->data[3][3] = __('Yes').' '.html_print_radio_button_extended( - 'update_gis_data', - 0, - '', - $update_gis_data, - false, - '', - 'style="margin-right: 40px;"', - true - ); - $table->data[3][3] .= __('No').' '.html_print_radio_button_extended( - 'update_gis_data', - 1, - '', - $update_gis_data, - false, - '', - 'style="margin-right: 40px;"', - true - ); + $table_adv_gis = '

'.__('Ignore new GIS data:').'

'; + if ($new_agent) { + $update_gis_data = true; + } + + $table_adv_gis .= html_print_checkbox_switch('update_gis_data', 1, $update_gis_data, true).'No / Yes
'; } -ui_toggle(html_print_table($table, true), __('Advanced options')); -unset($table); + + +$table_adv_options = $table_adv_secondary_groups.'
+
+ '.$table_adv_secondary_groups_left.' +
+
+ '.$table_adv_secondary_groups_arrows.' +
+
+ '.$table_adv_secondary_groups_right.' +
+
+
+
'.$table_adv_parent.$table_adv_custom_id.$table_adv_module_mode.$table_adv_cascade.$table_adv_gis.'
+
'.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
+
'; + +echo '
'; + ui_toggle($table_adv_options, __('Advanced options'), '', true, false, 'white_box white_box_opened'); +echo '
'; + $table = new stdClass(); $table->width = '100%'; -$table->class = 'databox filters'; +$table->class = 'custom_fields_table'; $table->head = []; $table->style = []; -$table->style[0] = 'font-weight: bold; width: 100px;'; +$table->style[0] = 'font-weight: bold;'; $table->data = []; $fields = db_get_all_fields_in_table('tagent_custom_fields'); @@ -703,11 +723,15 @@ if ($fields === false) { } foreach ($fields as $field) { - $data[0] = ''.$field['name'].''; + $id_custom_field = $field['id_field']; + + $data[0] = '
'; + $data[0] .= ''.$field['name'].''; $data[0] .= ui_print_help_tip( __('This field allows url insertion using the BBCode\'s url tag').'.
'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.

'.__('e.g.: [url=google.com]Google web search[/url]'), true ); + $data[0] .= '
'; $combo = []; $combo = $field['combo_values']; $combo = explode(',', $combo); @@ -730,7 +754,7 @@ foreach ($fields as $field) { } if ($field['is_password_type']) { - $data[1] = html_print_input_text_extended( + $data_field[1] = html_print_input_text_extended( 'customvalue_'.$field['id_field'], $custom_value, 'customvalue_'.$field['id_field'], @@ -744,18 +768,18 @@ foreach ($fields as $field) { true ); } else { - $data[1] = html_print_textarea( + $data_field[1] = html_print_textarea( 'customvalue_'.$field['id_field'], 2, 65, $custom_value, - 'style="min-height: 30px; width:96%;"', + 'style="min-height: 30px;"', true ); } if ($field['combo_values'] !== '') { - $data[1] = html_print_select( + $data_field[1] = html_print_select( $combo_values, 'customvalue_'.$field['id_field'], $custom_value, @@ -776,19 +800,25 @@ foreach ($fields as $field) { ); }; + $table->rowid[] = 'name_field-'.$id_custom_field; array_push($table->data, $data); + + $table->rowid[] = 'field-'.$id_custom_field; + array_push($table->data, $data_field); } if (!empty($fields)) { - ui_toggle(html_print_table($table, true), __('Custom fields')); + echo '
'; + ui_toggle(html_print_table($table, true), __('Custom fields'), '', true, false, 'white_box white_box_opened'); + echo '
'; } -echo '
'; +echo '
'; // The context help about the learning mode. if ($modo == 0) { - echo ""; + echo ""; } else { echo "'; if ($id_agente) { - echo '
'; + echo '
'; html_print_submit_button( __('Update'), 'updbutton', @@ -825,6 +855,19 @@ ui_require_jquery_file('bgiframe'); ?> diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index d6828dd599..6603e5230f 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -679,7 +679,7 @@ if ($step == 2) { 'type', $type, '', - __('Select'), + __('None'), 0, true, false, @@ -1018,6 +1018,7 @@ var onchange_msg = ; var unknown = ; var error_message_min_max_zero = ; +var not_normal = ; function check_fields_step2() { var correct = true; @@ -1174,6 +1175,13 @@ if ($step == 2) { /* Show example */ $("span#example").empty ().append (critical); break; + case "not_normal": + $("#template-value, #template-max, span#matches_value, #template-min").hide (); + $("#template-example").show (); + + /* Show example */ + $("span#example").empty ().append (not_normal); + break; case "onchange": $("#template-value, #template-max, #template-min").hide (); $("#template-example, span#matches_value").show (); diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 08c29b92e2..645815e6c0 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -242,7 +242,6 @@ if ($filemanager) { $chunck_url = '&create=1'; } - $homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false; filemanager_file_explorer( $real_directory, $directory, @@ -253,7 +252,7 @@ if ($filemanager) { 'index.php?sec=gservers&sec2=godmode/servers/plugin'.$chunck_url.'&plugin_command=[FILE_FULLPATH]&id_plugin='.$id_plugin, true, 0775, - $homedir_filemanager + false ); } diff --git a/pandora_console/godmode/setup/file_manager.php b/pandora_console/godmode/setup/file_manager.php index 27f3e232c8..6d5e7679b7 100644 --- a/pandora_console/godmode/setup/file_manager.php +++ b/pandora_console/godmode/setup/file_manager.php @@ -66,8 +66,6 @@ $real_directory = realpath($config['homedir'].'/'.$directory); echo '

'.__('Index of %s', $directory).'

'; -$homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false; - filemanager_file_explorer( $real_directory, $directory, @@ -78,5 +76,5 @@ filemanager_file_explorer( '', false, '', - $homedir_filemanager + false ); diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index 4e51181b8a..61491496f5 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -331,7 +331,7 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); theme : "advanced", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", - theme_advanced_buttons1 : "bold,italic, |, image, link, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright", + theme_advanced_buttons1 : "bold,italic, |, image, link, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright, | ,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", convert_urls : false, diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index 4d4281eec5..b46530fdee 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -200,8 +200,8 @@ if ($config['history_db_enabled'] == 1) { ); $time_pandora_db_history = false; - if ($history_connect !== false) { - if ($config['history_db_connection'] !== false) { + if ($history_connect) { + if ($config['history_db_connection']) { $time_pandora_db_history = mysql_db_process_sql( $sql, 'insert_id', @@ -405,16 +405,16 @@ if ($config['history_db_enabled'] == 1) { ); } - $history_connect = @mysql_db_process_sql( - 'SELECT 1 FROM tconfig', - 'affected_rows', - $config['history_db_connection'], - false - ); - $config_history = false; - if ($history_connect !== false) { - if ($config['history_db_connection'] != false) { + if ($config['history_db_connection']) { + $history_connect = @mysql_db_process_sql( + 'SELECT 1 FROM tconfig', + 'affected_rows', + $config['history_db_connection'], + false + ); + + if ($history_connect !== false) { $config_history_array = mysql_db_process_sql( 'SELECT * FROM tconfig', 'affected_rows', @@ -427,11 +427,11 @@ if ($config['history_db_enabled'] == 1) { $config_history[$value['token']] = $value['value']; } } + } else { + echo ui_print_error_message( + __('The tconfig table does not exist in the historical database') + ); } - } else { - echo ui_print_error_message( - __('The tconfig table does not exist in the historical database') - ); } if ($config_history === false) { diff --git a/pandora_console/godmode/update_manager/update_manager.css b/pandora_console/godmode/update_manager/update_manager.css index f68c92ea94..168c6fcf7a 100644 --- a/pandora_console/godmode/update_manager/update_manager.css +++ b/pandora_console/godmode/update_manager/update_manager.css @@ -140,6 +140,162 @@ } #box_online { - background-color: #e6e6e6; - padding: 10px; + background-image: url("../../images/update_manager_background.jpg"); + background-size: cover; + background-position: center center; + background-repeat: no-repeat; + background-color: #fff; + padding: 40px 50px; + border: 1px solid #f3f3f3; + border-radius: 5px; + min-height: 600px; +} + +div#box_online * { + font-size: 16pt; + font-family: "Open Sans", sans-serif; +} + +#box_online .content { + max-width: 60%; +} + +.update_popup { + display: flex; + justify-content: space-between; + align-items: center; + padding-left: 10px; + padding-right: 10px; +} + +.update_icon { + padding-left: 20px; +} + +.update_text h3 { + font-weight: bold; + font-size: 12pt; +} + +.update_text p { + font-size: 11pt; +} + +.update_text a { + font-size: 11pt; + color: #82b92e !important; +} + +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: left !important; + padding-left: 19px; + padding-bottom: 5px; +} + +.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget { + background-color: #cecece !important; + border: none !important; + border-radius: 2px !important; + text-transform: uppercase !important; + font-weight: bold !important; +} + +.ui-dialog-buttonset > button.success_button.ui-button.ui-corner-all.ui-widget, +.update_manager_button { + background-color: #82b92e !important; + color: #fff !important; + border-radius: 2px !important; + text-transform: uppercase !important; + font-weight: bold !important; +} + +a.update_manager_button { + padding: 10px 12px; + margin-top: 10px; + display: inline-flex; + align-items: center; + font-size: 16px !important; + border-radius: 4px !important; + text-decoration: none; + font-family: "Open Sans", sans-serif; +} + +a.update_manager_button:after { + content: url(../../images/update_manager_button.png); + padding-left: 10px; +} + +.progressbar { + margin-top: 15px; +} + +.ui-draggable, +.ui-draggable .ui-dialog-titlebar { + cursor: default !important; +} + +#box_online #pkg_version { + color: #82b92e; + font-size: 75pt; + font-weight: bold; +} + +/* METACONSOLE */ +.box_online_meta { + background: none !important; + min-height: 400px !important; + text-align: center; + border: none !important; +} + +div#box_online.box_online_meta * { + font-size: 14pt; +} + +#box_online.box_online_meta .content { + max-width: 100%; +} + +#box_online.box_online_meta #pkg_version { + font-size: 60pt; +} + +/* COMMUNITY */ +.update_manager_open { + max-width: 50%; + font-size: 10pt; + margin-top: 40px; + padding: 20px; + border: 1px solid #eaeaea; + border-radius: 5px; +} + +.update_manager_warning { + display: flex; + align-items: center; + margin-bottom: 10px; +} + +.update_manager_warning p { + font-size: 10pt !important; +} + +.update_manager_warning img { + padding-right: 20px; + width: 90px; +} + +a.update_manager_button_open { + padding: 5px 10px; + font-size: 16px !important; + border-radius: 4px !important; + text-decoration: none; + border: 1px solid #82b92e; + color: #82b92e; + border-radius: 2px; +} + +a.update_manager_button_open:hover { + color: #fff; + background-color: #82b92e; } diff --git a/pandora_console/godmode/update_manager/update_manager.online.php b/pandora_console/godmode/update_manager/update_manager.online.php index 3e807367bd..ef9b25075c 100644 --- a/pandora_console/godmode/update_manager/update_manager.online.php +++ b/pandora_console/godmode/update_manager/update_manager.online.php @@ -1,16 +1,22 @@ @import 'styles/meta_pandora.css'; @@ -69,23 +75,29 @@ if (is_metaconsole()) { } if (is_metaconsole()) { - echo "