dmohan001c commented on a change in pull request #6235:
URL: https://github.com/apache/trafficcontrol/pull/6235#discussion_r717740416
##########
File path: traffic_ops/traffic_ops_golang/logs/log.go
##########
@@ -135,11 +163,64 @@ FROM "log" as l JOIN tm_user as u ON l.tm_user = u.id`
const countQuery = `SELECT count(l.tm_user) FROM log as l`
+func getLogV40(inf *api.APIInfo, days int) ([]tc.Log, uint64, error) {
+ var count = uint64(0)
+ var whereCount string
+
+ queryParamsToQueryCols := map[string]dbhelpers.WhereColumnInfo{
+ "username": {Column: "u.username", Checker: nil},
+ }
+ where, _, pagination, queryValues, errs :=
+ dbhelpers.BuildWhereAndOrderByAndPagination(inf.Params,
queryParamsToQueryCols)
+
+ if len(errs) > 0 {
+ return nil, 0, util.JoinErrs(errs)
+ }
+
+ timeInterval := fmt.Sprintf("l.last_updated > now() - INTERVAL '%v'
DAY", days)
Review comment:
updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]