Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffparnitzky committed Nov 7, 2019
2 parents 8c34cb6 + 394531e commit 786b703
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Contao Extension "MonitoringResponseTimeGraph"
==============================================

Version 1.2.2 (2019-11-08)
--------------------------
- fixed filtering via search field effecting the filtered view (see #5)

Version 1.2.1 (2019-11-07)
--------------------------
- fixed creating a legend for monitored entry without tests (see #4)

Version 1.2.0 (2018-04-11)
--------------------------
- Added option to filter full response graph view (see #1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,29 @@ public function __construct()
public function navigateToMonitoringResponseTimeGraph()
{
$arrFilter = \Session::getInstance()->get('filter')['tl_monitoring'];
$arrSearch = \Session::getInstance()->get('search')['tl_monitoring'];
unset($arrFilter['limit']);

$select = "SELECT id FROM tl_monitoring";
if (!empty($arrFilter))
if (!empty($arrFilter) || !empty($arrSearch['value']))
{
$select .= " WHERE " . implode(" = ? AND ", array_keys($arrFilter)) . " = ?";
$select .= " WHERE ";

if (!empty($arrFilter))
{
$select .= implode(" = ? AND ", array_keys($arrFilter)) . " = ?";
}

if (!empty($arrSearch['value']))
{
if (!empty($arrFilter))
{
$select .= " AND ";
}
$select .= " " . $arrSearch['field'] . " LIKE ?";
// add the value to the paramters array
$arrFilter[$arrSearch['field']] = "%" . $arrSearch['value'] . "%";
}
}

$objIds = \Database::getInstance()->prepare($select)
Expand Down

0 comments on commit 786b703

Please sign in to comment.