Skip site navigation (1) Skip section navigation (2)

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

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by dpage: r4232 - trunk/pgadmin3/src/agent
Date: 2005-05-23 08:43:57
Message-ID: 200505230843.j4N8hvwm024146@developer.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
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)
     {


pgadmin-hackers by date

Next:From: Dave PageDate: 2005-05-23 14:31:13
Subject: Re: 1.2.2 testing ==> [PROBLEM]
Previous:From: svnDate: 2005-05-23 08:31:10
Subject: SVN Commit by dpage: r4231 - trunk/pgadmin3/xtra/pgagent

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group