Web pgadmin.org
 Home 
 ·  ·  ·  ·  ·  ·  · 
SVN Commit by dpage: r4232 - trunk/pgadmin3/src/agent

SVN Commit by dpage: r4232 - trunk/pgadmin3/src/agent



Author: dpage
Date: 2005-05-23 09:43:57 +0100 (Mon, 23 May 2005)
New Revision: 4232

Modified:
   trunk/pgadmin3/src/agent/pgaJob.cpp
   trunk/pgadmin3/src/agent/pgaStep.cpp
Log:
Limit the number of log rows displayed for jobs/steps to settings->MaxRows()

Modified: trunk/pgadmin3/src/agent/pgaJob.cpp
===================================================================
--- trunk/pgadmin3/src/agent/pgaJob.cpp	2005-05-23 08:31:10 UTC (rev 4231)
+++ trunk/pgadmin3/src/agent/pgaJob.cpp	2005-05-23 08:43:57 UTC (rev 4232)
@@ -22,6 +22,7 @@
 #include "pgaStep.h"
 #include "pgaSchedule.h"
 
+extern sysSettings *settings;
 
 pgaJob::pgaJob(const wxString& newName)
 : pgDatabaseObject(PGA_JOB, newName)
@@ -170,7 +171,8 @@
 			 wxT(", (jlgstart + jlgduration) AS endtime")
              wxT("  FROM pgagent.pga_joblog\n")
              wxT(" WHERE jlgjobid = ") + NumToStr(GetRecId()) +
-			 wxT(" ORDER BY jlgstart DESC");
+			 wxT(" ORDER BY jlgstart DESC") +
+			 wxT(" LIMIT ") + NumToStr(settings->GetMaxRows());
 
     if (statistics)
     {

Modified: trunk/pgadmin3/src/agent/pgaStep.cpp
===================================================================
--- trunk/pgadmin3/src/agent/pgaStep.cpp	2005-05-23 08:31:10 UTC (rev 4231)
+++ trunk/pgadmin3/src/agent/pgaStep.cpp	2005-05-23 08:43:57 UTC (rev 4232)
@@ -22,6 +22,7 @@
 #include "pgaStep.h"
 #include "pgaSchedule.h"
 
+extern sysSettings *settings;
 
 pgaStep::pgaStep(pgCollection *_collection, const wxString& newName)
 : pgaJobObject(_collection->GetJob(), PGA_STEP, newName)
@@ -155,7 +156,8 @@
 			 wxT(", (jslstart + jslduration) AS endtime")
              wxT("  FROM pgagent.pga_jobsteplog\n")
              wxT(" WHERE jsljstid = ") + NumToStr(GetRecId()) +
-			 wxT(" ORDER BY jslstart DESC");
+			 wxT(" ORDER BY jslstart DESC")
+			 wxT(" LIMIT ") + NumToStr(settings->GetMaxRows());
 
     if (statistics)
     {




Home | Main Index | Thread Index

top