Skip to content

Commit

Permalink
Merge branch 'main' into ui-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Dec 20, 2024
2 parents f1949db + 35882ec commit 3f83a31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions services/describe/db/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,16 @@ UNION ALL
(SELECT 'compliance' AS job_type, status, count(*) AS count FROM compliance_jobs WHERE created_at >= ? AND created_at <= ? GROUP BY status )
)
) AS t %s;`, whereQuery)
}else{
rawQuery = fmt.Sprintf(`
SELECT * FROM (
(
(SELECT 'discovery' AS job_type, status, count(*) AS count FROM describe_integration_jobs GROUP BY status)
UNION ALL
(SELECT 'compliance' AS job_type, status, count(*) AS count FROM compliance_jobs GROUP BY status)
)
) AS t %s;`, whereQuery)

}
tx := db.ORM.Raw(rawQuery, values...).Find(&job)
if tx.Error != nil {
Expand Down

0 comments on commit 3f83a31

Please sign in to comment.