Skip to content

Commit

Permalink
JQuery version correction | Improvements | Some changes
Browse files Browse the repository at this point in the history
The follow changes were made:
- Correction in the version of JQuery used. (The use of the Slim version caused a bug in the notification system due to the absence of some animations)
- Minimized the number of fixed characters used in the report, allowing more information to be sent.
- Cleaning of unused code. (Code commented)
- Version update.
- DebugInfo version update.
- README update.
  • Loading branch information
jocafamaka committed Sep 14, 2018
1 parent 1a0f0b3 commit 3547010
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Some changes were made to the functions and logic used in the original project a
* New system of sound warning.
* Almost total control of page characteristics.
* Powerful debug page.
* Service filter. <sup>(NEW)</sup>
* Self report of errors. <sup>(NEW)</sup>
* Service filter.
* Self report of errors.
* Access control. <sup>(NEW)</sup>

## What you can control

Expand Down
2 changes: 1 addition & 1 deletion debugInfo/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//Auth Request
require_auth();

$version = 'v1.3.0';
$version = 'v1.3.1';

$files = get_config_files();

Expand Down
4 changes: 2 additions & 2 deletions debugInfo/resources/js/jquery.min.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,13 @@ function get_config_files() {
$file = explode('=',$line,2);
$file[1] = trim($file[1]);
$files[] = $file[1];
//echo "\n\n// including Nagios config file ".$file[1].", config reference $line\n";
unset($file);
} elseif (preg_match("/^cfg_dir/i",$line)) {
$dir = explode('=',$line,2);
$dir[1] = trim($dir[1]);
read_recursive_dir($files, $dir[1]);
}
}
//echo "\n\n// end of reading config file $nagios_cfg_file\n\n";
$file_list = array_unique($files);
return $file_list;
}
Expand All @@ -217,7 +215,6 @@ function read_recursive_dir(&$files, $dir){
foreach ($dir_recursive as $file => $object) {
if(preg_match("/.cfg$/i",$file)) {
$files[] = $file;
//echo "\n\n// including Nagios config file ".$file.", config reference ".$line."\n";
} elseif (is_link($file) || (is_dir($file) && !preg_match("/\.$/i",$file)) ) {
read_recursive_dir($files, $file);
}
Expand Down
15 changes: 8 additions & 7 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
error_reporting(E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR);
$nagMapR_version = '1.5.0';
$nagMapR_version = '1.5.1';
$nagMapR_CurrVersion = file_get_contents('https://pastebin.com/raw/HGUTiEtE'); //Get current version;
if($nagMapR_CurrVersion == "") //Set local version in case of fail.
$nagMapR_CurrVersion = $nagMapR_version;
Expand Down Expand Up @@ -779,7 +779,7 @@ function removeHost(i, status){
if((!waitToReport) && (diferent)){
var report = "err:" + error + ",url:" + url + ",lineN:" + lineNo + ",at:" + now() + ",hFr:['. $nagMapR_FilterHostgroup. '],sF:['. $nagMapR_FilterService. '],uD:['. $nagMapR_Debug. '],iN:['. $nagMapR_IsNagios. '],uS:['. $nagMapR_Style. '],uCB:['. $nagMapR_ChangesBar. '],mCB:['. $nagMapR_ChangesBarMode. '],dF:['. $nagMapR_DateFormat. '],sL:['. $nagMapR_Lines. '],tU:['. $nagMapR_TimeUpdate. ']";
var report = "err:" + error + "&url:" + url + "&lineN:" + lineNo + "&at:" + now() + "&hFr:'. $nagMapR_FilterHostgroup. '&sF:'. $nagMapR_FilterService. '&uD:'. $nagMapR_Debug. '&iN:'. $nagMapR_IsNagios. '&uS:'. $nagMapR_Style. '&uCB:'. $nagMapR_ChangesBar. '&mCB:'. $nagMapR_ChangesBarMode. '&dF:'. $nagMapR_DateFormat. '&sL:'. $nagMapR_Lines. '&tU:'. $nagMapR_TimeUpdate. '";
var doc=document, elt=doc.createElement("script"), spt=doc.getElementsByTagName("script")[0];
elt.type="text/javascript"; elt.async=true; elt.docefer=true; elt.src="//nagmaprebornanalytics.000webhostapp.com/reports/report-error.php?report="+Encrypt(report);
Expand All @@ -795,15 +795,16 @@ function removeHost(i, status){
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "10000",
"extendedTimeOut": "5000",
"timeOut": "20000",
"extendedTimeOut": "10000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
toastr["info"]("'. $errorFound .'", "'. $error . $reported .'");
toastr.options = {
"closeButton": false,
"progressBar": false,
Expand Down Expand Up @@ -836,7 +837,7 @@ function removeHost(i, status){
if((!waitToReport) && (diferent)){
var report = "err:" + error + ",url:" + url + ",lineN:" + lineNo + ",at:" + now() + ",hFr:['. $nagMapR_FilterHostgroup. '],sF:['. $nagMapR_FilterService. '],uD:['. $nagMapR_Debug. '],iN:['. $nagMapR_IsNagios. '],uS:['. $nagMapR_Style. '],uCB:['. $nagMapR_ChangesBar. '],mCB:['. $nagMapR_ChangesBarMode. '],dF:['. $nagMapR_DateFormat. '],sL:['. $nagMapR_Lines. '],tU:['. $nagMapR_TimeUpdate. ']";
var report = "err:" + error + "&url:" + url + "&lineN:" + lineNo + "&at:" + now() + "&hFr:'. $nagMapR_FilterHostgroup. '&sF:'. $nagMapR_FilterService. '&uD:'. $nagMapR_Debug. '&iN:'. $nagMapR_IsNagios. '&uS:'. $nagMapR_Style. '&uCB:'. $nagMapR_ChangesBar. '&mCB:'. $nagMapR_ChangesBarMode. '&dF:'. $nagMapR_DateFormat. '&sL:'. $nagMapR_Lines. '&tU:'. $nagMapR_TimeUpdate. '";
var doc=document, elt=doc.createElement("script"), spt=doc.getElementsByTagName("script")[0];
elt.type="text/javascript"; elt.async=true; elt.docefer=true; elt.src="//nagmaprebornanalytics.000webhostapp.com/reports/report-error.php?report="+Encrypt(report);
Expand All @@ -852,8 +853,8 @@ function removeHost(i, status){
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "10000",
"extendedTimeOut": "5000",
"timeOut": "20000",
"extendedTimeOut": "10000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
Expand Down

0 comments on commit 3547010

Please sign in to comment.