2017-11-08 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the 'RDLogFilter' widget that caused excluded
	services to be included when specifying a filter string.
This commit is contained in:
Fred Gleason 2017-11-08 10:31:56 -05:00
parent 83d36698a0
commit b37bd08ca7
2 changed files with 12 additions and 3 deletions

View File

@ -16339,3 +16339,6 @@
2017-11-08 Fred Gleason <fredg@paravelsystems.com>
* Added 'FILTER' and 'RECENT' call parameters to the 'ListLogs' Web
API call.
2017-11-08 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'RDLogFilter' widget that caused excluded
services to be included when specifying a filter string.

View File

@ -103,10 +103,16 @@ RDLogFilter::RDLogFilter(QWidget *parent)
}
QString filter=filter_filter_edit->text();
if(!filter.isEmpty()) {
if(filter_service_box->currentItem()==0) {
sql+="&&((LOGS.NAME like \"%%"+RDEscapeString(filter)+"%%\")||";
sql+="(LOGS.DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\")||";
sql+="(LOGS.SERVICE like \"%%"+RDEscapeString(filter)+"%%\"))";
}
else {
sql+="&&((LOGS.NAME like \"%%"+RDEscapeString(filter)+"%%\")||";
sql+="(LOGS.DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\"))";
}
}
if(filter_recent_check->isChecked()) {
sql+=QString().sprintf("order by LOGS.ORIGIN_DATETIME desc limit %d",
RD_LOGFILTER_LIMIT_QUAN);