SVN Commit by dpage: r4232 - trunk/pgadmin3/src/agent - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by dpage: r4232 - trunk/pgadmin3/src/agent
Date
Msg-id 200505230843.j4N8hvwm024146@developer.pgadmin.org
Whole thread Raw
List 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:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r4231 - trunk/pgadmin3/xtra/pgagent
Next
From: "Dave Page"
Date:
Subject: Re: 1.2.2 testing ==> [PROBLEM]