Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
* refs #564 : Fix issue with empty selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Assepo committed Sep 17, 2015
1 parent d1c094d commit 71bc083
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ function initM(_time_reload, _sid, _o ){
if (document.getElementById("host_search") && document.getElementById("host_search").value) {
_host_search = document.getElementById("host_search").value;
viewDebugInfo('search: '+document.getElementById("host_search").value);
} else if (document.getElementById("host_search").lenght === 0) {
} else if (document.getElementById("host_search").value.length === 0) {
_host_search = "";
}

if (document.getElementById("sg_search") && document.getElementById("sg_search").value) {
_sg_search = document.getElementById("sg_search").value;
viewDebugInfo('search: '+document.getElementById("sg_search").value);
} else if (document.getElementById("sg_search").lenght == 0) {
} else if (document.getElementById("sg_search").value.length === 0) {
_sg_search = "";
}

if (_first){
mainLoopLocal();
_first = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ function initM(_time_reload, _sid, _o ){
if (document.getElementById("host_search") && document.getElementById("host_search").value) {
_host_search = document.getElementById("host_search").value;
viewDebugInfo('search: '+document.getElementById("host_search").value);
} else if (document.getElementById("host_search").lenght === 0) {
} else if (document.getElementById("host_search").value.length === 0) {
_host_search = "";
}

if (document.getElementById("sg_search") && document.getElementById("sg_search").value) {
_sg_search = document.getElementById("sg_search").value;
viewDebugInfo('search: '+document.getElementById("sg_search").value);
} else if (document.getElementById("sg_search").lenght == 0) {
} else if (document.getElementById("sg_search").value.length == 0) {
_sg_search = "";
}

if (_first){
mainLoopLocal();
_first = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@

ini_set("display_errors", "Off");

include_once "@CENTREON_ETC@/centreon.conf.php";
//include_once "@CENTREON_ETC@/centreon.conf.php";
include_once "/etc/centreon/centreon.conf.php";

include_once $centreon_path . "www/class/centreonXMLBGRequest.class.php";
include_once $centreon_path . "www/include/monitoring/status/Common/common-Func.php";
Expand Down Expand Up @@ -120,7 +121,7 @@

/* Servicegroup search */
if ($sgSearch != ""){
$query .= "AND sg.name like '" . $sgSearch . "' ";
$query .= "AND sg.name = '" . $sgSearch . "' ";
}

/* Service search */
Expand Down Expand Up @@ -157,7 +158,7 @@
$sg_search .= implode(" OR ", $servicegroupsSql1);
$sg_search .= ") ";
if ($sgSearch != ""){
$sg_search .= "AND sg.name like '" . $sgSearch . "' ";
$sg_search .= "AND sg.name = '" . $sgSearch . "' ";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@

ini_set("display_errors", "Off");

include_once "@CENTREON_ETC@/centreon.conf.php";
//include_once "@CENTREON_ETC@/centreon.conf.php";
include_once "/etc/centreon/centreon.conf.php";

include_once $centreon_path . "www/class/centreonXMLBGRequest.class.php";
include_once $centreon_path . "www/include/monitoring/status/Common/common-Func.php";
Expand Down Expand Up @@ -120,7 +121,7 @@

/* Servicegroup search */
if ($sgSearch != ""){
$query .= "AND sg.name like '" . $sgSearch . "' ";
$query .= "AND sg.name = '" . $sgSearch . "' ";
}

/* Service search */
Expand Down Expand Up @@ -158,7 +159,7 @@
$sg_search .= implode(" OR ", $servicegroupsSql1);
$sg_search .= ") ";
if ($sgSearch != ""){
$sg_search .= "AND sg.name like '" . $sgSearch . "' ";
$sg_search .= "AND sg.name = '" . $sgSearch . "' ";
}
}

Expand Down

0 comments on commit 71bc083

Please sign in to comment.