mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2017-11-08 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'List Logs' Web API call that broke searches when the 'RECENT' parameter was set.
This commit is contained in:
@@ -16342,3 +16342,6 @@
|
|||||||
2017-11-08 Fred Gleason <fredg@paravelsystems.com>
|
2017-11-08 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in the 'RDLogFilter' widget that caused excluded
|
* Fixed a bug in the 'RDLogFilter' widget that caused excluded
|
||||||
services to be included when specifying a filter string.
|
services to be included when specifying a filter string.
|
||||||
|
2017-11-08 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in the 'List Logs' Web API call that broke searches
|
||||||
|
when the 'RECENT' parameter was set.
|
||||||
|
@@ -138,8 +138,6 @@ void Xport::ListLogs()
|
|||||||
// Generate Log List
|
// Generate Log List
|
||||||
//
|
//
|
||||||
sql="select NAME from LOGS";
|
sql="select NAME from LOGS";
|
||||||
if((!service_name.isEmpty())||(!log_name.isEmpty())||(trackable=="1")||
|
|
||||||
(!filter.isEmpty())||(recent=="1")) {
|
|
||||||
sql+=" where";
|
sql+=" where";
|
||||||
if(!log_name.isEmpty()) {
|
if(!log_name.isEmpty()) {
|
||||||
sql+=" (NAME=\""+RDEscapeString(log_name)+"\")&&";
|
sql+=" (NAME=\""+RDEscapeString(log_name)+"\")&&";
|
||||||
@@ -161,11 +159,20 @@ void Xport::ListLogs()
|
|||||||
sql+="(LOGS.DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\"))&&";
|
sql+="(LOGS.DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\"))&&";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sql=sql.stripWhiteSpace();
|
||||||
|
if(sql.right(2)=="&&") {
|
||||||
sql=sql.left(sql.length()-2);
|
sql=sql.left(sql.length()-2);
|
||||||
}
|
}
|
||||||
sql+=" order by NAME";
|
sql=sql.stripWhiteSpace();
|
||||||
|
if(sql.right(5)=="where") {
|
||||||
|
sql=sql.left(sql.length()-5);
|
||||||
|
}
|
||||||
if(recent=="1") {
|
if(recent=="1") {
|
||||||
sql+=QString().sprintf(" limit %d",RD_LOGFILTER_LIMIT_QUAN);
|
sql+=QString().sprintf(" order by LOGS.ORIGIN_DATETIME desc limit %d",
|
||||||
|
RD_LOGFILTER_LIMIT_QUAN);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sql+=" order by NAME";
|
||||||
}
|
}
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user