diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d06efe7039..2f579d46f1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.740-191112 +Version: 7.0NG.740-191113 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 93da0c7203..f28fdab114 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.740-191112" +pandora_version="7.0NG.740-191113" 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 e1595c8f87..a3c40e50f0 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.740'; -use constant AGENT_BUILD => '191112'; +use constant AGENT_BUILD => '191113'; # 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 caf3bc23e9..f5ed96e5d9 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.740 -%define release 191112 +%define release 191113 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 718f4a78d8..ea8efb582c 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.740 -%define release 191112 +%define release 191113 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 cb801abd35..316e2a03c2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.740" -PI_BUILD="191112" +PI_BUILD="191113" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 631998e34e..be5a498d11 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191112} +{191113} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9f7e86356b..b268f7f436 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.740(Build 191112)") +#define PANDORA_VERSION ("7.0NG.740(Build 191113)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 83b717ce3c..e2707bff53 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.740(Build 191112))" + VALUE "ProductVersion", "(7.0NG.740(Build 191113))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9344a59739..45e4ec20f1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.740-191112 +Version: 7.0NG.740-191113 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 e3dffdd563..cf617bb4e3 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.740-191112" +pandora_version="7.0NG.740-191113" package_pear=0 package_pandora=1 diff --git a/pandora_console/general/alert_enterprise.php b/pandora_console/general/alert_enterprise.php index 69a09d2998..4cb4a29740 100644 --- a/pandora_console/general/alert_enterprise.php +++ b/pandora_console/general/alert_enterprise.php @@ -105,7 +105,7 @@ if (check_login()) { echo __( "This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.

- Download the official documentation", + Download the official documentation", get_product_name(), get_product_name(), get_product_name(), diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 1fba644037..e9f1aef011 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -290,7 +290,7 @@ $table_aux = new stdClass(); foreach ($result_graphs as $graph) { $data = []; - $data[0] = ''.ui_print_truncate_text($graph['name'], 70).''; + $data[0] = ''.ui_print_truncate_text(io_safe_output($graph['name']), 70).''; $data[1] = ui_print_truncate_text($graph['description'], 70); diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 0e7e41e7d6..fab43724b5 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -557,7 +557,7 @@ $row++; // For 5.1 Autohidden menu feature - $table_styles->data['autohidden'][0] = __('Autohidden menu'); + $table_styles->data['autohidden'][0] = __('Automatically hide submenu'); $table_styles->data['autohidden'][1] = html_print_checkbox_switch( 'autohidden_menu', 1, @@ -1032,6 +1032,12 @@ $row++; ); $row++; + + $table_other->data[$row][0] = __('Font size for items reports'); + $table_other->data[$row][1] = ""; + + $row++; + // ---------------------------------------------------------------------- $dirItems = scandir($config['homedir'].'/images/custom_logo'); foreach ($dirItems as $entryDir) { diff --git a/pandora_console/include/class/HelpFeedBack.class.php b/pandora_console/include/class/HelpFeedBack.class.php index 074f3d8df2..825d3c923f 100644 --- a/pandora_console/include/class/HelpFeedBack.class.php +++ b/pandora_console/include/class/HelpFeedBack.class.php @@ -54,6 +54,7 @@ class HelpFeedBack extends Wizard */ public $ajaxController; + /** * Checks if target method is available to be called using AJAX. * @@ -61,8 +62,6 @@ class HelpFeedBack extends Wizard * * @return boolean True allowed, false not. */ - - public function ajaxMethod($method) { return in_array($method, $this->AJAXMethods); @@ -91,6 +90,7 @@ class HelpFeedBack extends Wizard */ public function run() { + ui_require_css_File('discovery'); ui_require_css_file('help_feedback'); $help_url = get_parameter('url', null); @@ -105,10 +105,15 @@ class HelpFeedBack extends Wizard '; + + echo $hidden; + echo '
'; // Load feedback form. echo $this->loadFeedbackForm(); - echo '
'; + echo ''; } @@ -123,8 +128,6 @@ class HelpFeedBack extends Wizard { global $config; - ui_require_css_file('helper'); - $form = [ 'action' => '#', 'id' => 'feedback_form', @@ -134,35 +137,38 @@ class HelpFeedBack extends Wizard $inputs = [ [ 'wrapper' => 'div', - 'block_id' => 'btn_section', - 'class' => 'btn_section', + 'block_id' => 'flex-row-baseline w100p', + 'class' => 'flex-row-baseline w100p', 'direct' => 1, 'block_content' => [ [ 'arguments' => [ 'label' => __('Sugesstion'), - 'type' => 'button', - 'attributes' => 'class="btn_sug"', - 'name' => 'option_1', - 'id' => 'option_1', - 'script' => 'change_option1()', + 'type' => 'radio_button', + 'attributes' => 'class="btn"', + 'name' => 'suggestion', + 'id' => 'suggestion', + 'script' => 'disableRadio(\'report\')', + 'return' => true, ], ], [ 'arguments' => [ 'label' => __('Something is not quite right'), - 'type' => 'button', - 'attributes' => 'class="btn_something"', - 'name' => 'option_2', - 'id' => 'option_2', - 'script' => 'change_option2()', + 'type' => 'radio_button', + 'attributes' => 'class="btn"', + 'name' => 'report', + 'id' => 'report', + 'script' => 'disableRadio(\'suggestion\')', + 'return' => true, ], ], ], ], [ - 'label' => __('What Happend?'), + 'label' => __('What happened?'), + 'class' => 'explain', 'arguments' => [ 'class' => 'textarea_feedback', 'id' => 'feedback_text', @@ -177,7 +183,8 @@ class HelpFeedBack extends Wizard 'name' => 'feedback_email', 'input_class' => 'email_feedback', 'class' => 'email_feedback', - 'type' => 'text', + 'type' => 'email', + 'required' => true, ], ], [ @@ -192,21 +199,23 @@ class HelpFeedBack extends Wizard ], ]; - $output = ui_toggle( - $this->printForm( - [ - 'form' => $form, - 'inputs' => $inputs, - ], - true - ), - __('Feedback'), - '', - '', - true, - false, - '', - 'no-border' + $output = ui_print_toggle( + [ + 'id' => 'toggle_help_feedback', + 'content' => $this->printForm( + [ + 'form' => $form, + 'inputs' => $inputs, + ], + true + ), + 'name' => __('Feedback'), + 'return' => true, + 'class' => 'no-border', + 'img_a' => 'images/arrow_down_white.png', + 'img_b' => 'images/arrow_up_white.png', + + ] ); $output .= $this->loadJS(); @@ -222,80 +231,152 @@ class HelpFeedBack extends Wizard * @param​ ​string​ $feedback_text text mail. * @param​ ​string​ $feedback_mail costumer mail. * - * @return integer Status of the email send task. + * @return void. */ public function sendMailMethod() { - $subject = get_parameter('feedback_option', null); + $suggestion = get_parameter('type', 'false'); $feedback_text = get_parameter('feedback_text', null); $feedback_mail = get_parameter('feedback_email', null); + $help_url = get_parameter('help_url', 'unknown'); - $subject; + $section = explode('title=', $help_url, 2); - if ($subject === null) { - echo json_encode(['error' => __('No ha seleccionado una opcion')]); + $subject = ''; + if (is_array($section) === true && isset($section[1]) === true) { + $subject = '['.$section[1].']'; + } + + if ($suggestion !== 'false') { + $subject .= __('[pandorafms wiki] New suggestion'); + } else { + $subject .= __('[pandorafms wiki] New report'); + } + + if (empty($feedback_mail) === true) { + $error = [ + 'error' => __( + 'Please provide your email address, we promise not to bother you' + ), + ]; + } + + if (empty($feedback_text) === true) { + if ($suggestion !== 'false') { + $msg = 'Please provide some feedback. Write something awesome!'; + } else { + $msg = 'Please provide some feedback. We\'ll appreciate it!'; + } + + $error = [ + 'error' => __($msg), + ]; + } + + if ($error !== null) { + echo json_encode($error); exit; } enterprise_include_once('include/functions_cron.php'); - $feedback_text .= ' - From '.$feedback_mail.' '; + $uid = $config['pandora_uid']; + if (empty($uid) === true) { + $uid = 'not registered'; + } - $res = enterprise_hook('send_email_attachment', ['feedback@artica.es', $feedback_text, $subject]); + $body = ''; + $body .= '

Message

'; + $body .= '

'.$feedback_text.'

'; - return $res; + $res = enterprise_hook( + 'send_email_attachment', + [ + 'feedback@artica.es', + $body, + $subject, + ] + ); + // Response. + if ($res == 1) { + $r = ['error' => '']; + } else { + $r = ['error' => __('Something went wrong while sending the report.')]; + } + + echo json_encode($r); + + exit; } + /** + * Load extra JS. + * + * @return string JS content. + */ public function loadJS() { ob_start(); ?>