[gold-users] gui problem with more than 1000 hits

Scott Jackson scott at clusterresources.com
Tue Jan 22 18:01:54 MST 2008


Tim,

I just augmented gold to fix the problem.

Attached is the diff of the fix. Let me know if you want me to generate
a new version of Gold with the fix in it.

Scott

$ svn diff
Index: src/list.cgi
===================================================================
--- src/list.cgi        (revision 51)
+++ src/list.cgi        (working copy)
@@ -834,10 +834,19 @@
     <input type="hidden" name="myobject" value="$object">
     <input type="hidden" name="myaction" value="$action">
 END_OF_FORM
-    if ($chunk > 1) { print "<input type=\"image\" name=\"mychunk\"
value=\"", $chunk - 1, "\" src=\"/cgi-bin/gold/images/leftbluearrow.gif
\">"; }
+    if ($cgi->param("ObjectCondition")) { print "    <input type=
\"hidden\" name=\"ObjectCondition\" value=\"",
$cgi->param("ObjectCondition"), "\">\n"; }
+    if ($cgi->param("ActionCondition")) { print "    <input type=
\"hidden\" name=\"ActionCondition\" value=\"",
$cgi->param("ActionCondition"), "\">\n"; }
+    if ($cgi->param("StartTimeCondition")) { print "    <input type=
\"hidden\" name=\"StartTimeCondition\" value=\"",
$cgi->param("StartTimeCondition"), "\">\n"; }
+    if ($cgi->param("EndTimeCondition")) { print "    <input type=
\"hidden\" name=\"EndTimeCondition\" value=\"",
$cgi->param("EndTimeCondition"), "\">\n"; }
+    if ($cgi->param("JobIdCondition")) { print "    <input type=
\"hidden\" name=\"JobIdCondition\" value=\"",
$cgi->param("JobIdCondition"), "\">\n"; }
+    if ($cgi->param("AccountCondition")) { print "    <input type=
\"hidden\" name=\"AccountCondition\" value=\"",
$cgi->param("AccountCondition"), "\">\n"; }
+    if ($cgi->param("ProjectCondition")) { print "    <input type=
\"hidden\" name=\"ProjectCondition\" value=\"",
$cgi->param("ProjectCondition"), "\">\n"; }
+    if ($cgi->param("UserCondition")) { print "    <input type=\"hidden
\" name=\"UserCondition\" value=\"", $cgi->param("UserCondition"),
"\">\n"; }
+    if ($cgi->param("MachineCondition")) { print "    <input type=
\"hidden\" name=\"MachineCondition\" value=\"",
$cgi->param("MachineCondition"), "\">\n"; }
+    if ($chunk > 1) { print "<input type=\"image\" name=\"mychunk\"
value=\"", $chunk - 1, "\" src=\"/cgi-bin/gold/images/leftbluearrow.gif
\">\n"; }
     print "&nbsp;&nbsp;[$begin-$end]&nbsp;&nbsp;";
     if ($count >= $limit) { print "<input type=\"image\" name=\"mychunk
\" value=\"", $chunk + 1, "\" src=
\"/cgi-bin/gold/images/rightbluearrow.gif\">"; }
-    print "</div>\n</form>\n";
+    print "\n</div>\n</form>\n";
   }
 
   # Print the table


On Fri, 2008-01-18 at 15:58 +0000, Tim Robinson wrote:
> Hi all
> 
> Any updates on this issue?
> 
> Thanks
> Tim
> 
> On Wed, 2007-11-28 at 12:36 +0000, Tim Robinson wrote:
> > Hi Scott
> > 
> > I've upgraded, but unfortunately it still doesn't seem to work.. for the
> > second page it ignores the selection criteria and just prints the jobs
> > with id from 1001-2000.
> > 
> > Example, if I ask to list jobs with user = tim the first 1000 is
> > correct, but the next thousand is simply jobs 1001-2000, no matter what
> > the user.
> > 
> > Here is the log .. as you can see it doesn't know anything about
> > User=Tim
> > 
> > ----
> > 
> > 
> > 2007-11-28 12:31:23.584 INFO  Gold::Message::receiveChunk  Read message
> > payload (408, <?xml version="1.0" encoding="UTF-8"?>
> > <Envelope><Body><Request action="Query"
> > actor="gold"><Object>Job</Object><Option
> > name="Limit">1000</Option><Option
> > name="Offset">1000</Option></Request></Body><Signature><DigestValue>Jgi7I2VqsIprUsDbjqyftMLfCuM=</DigestValue><SignatureValue>Hp2rijITJRJHVGJC35Y+PffTQAU=</SignatureValue><SecurityToken type="Password" name="gold"></SecurityToken></Signature></Envelope>
> > ).
> > 2007-11-28 12:31:23.585 TRACE Gold::Message::unmarshallChunk  invoked
> > with arguments: (<?xml version="1.0" encoding="UTF-8"?>
> > <Envelope><Body><Request action="Query"
> > actor="gold"><Object>Job</Object><Option
> > name="Limit">1000</Option><Option
> > name="Offset">1000</Option></Request></Body><Signature><DigestValue>Jgi7I2VqsIprUsDbjqyftMLfCuM=</DigestValue><SignatureValue>Hp2rijITJRJHVGJC35Y+PffTQAU=</SignatureValue><SecurityToken type="Password" name="gold"></SecurityToken></Signature></Envelope>
> > )
> > 2007-11-28 12:31:23.586 TRACE Gold::Chunk::authenticate  invoked with
> > arguments: (XML::LibXML::Document=SCALAR(0x8f12904))
> > 2007-11-28 12:31:23.587 TRACE Gold::Cache::getPasswordProperty  invoked
> > with arguments: (gold, Password)
> > 2007-11-28 12:31:23.591 DEBUG Gold::Chunk::authenticate  The security
> > token type is (Password).
> > 2007-11-28 12:31:23.592 DEBUG Gold::Chunk::authenticate  The
> > canonicalized body text is (<Body><Request action="Query"
> > actor="gold"><Object>Job</Object><Option
> > name="Limit">1000</Option><Option
> > name="Offset">1000</Option></Request></Body>).
> > 2007-11-28 12:31:23.592 DEBUG Gold::Chunk::authenticate  The
> > base64-encoded message digest is (Jgi7I2VqsIprUsDbjqyftMLfCuM=).
> > 2007-11-28 12:31:23.593 DEBUG Gold::Chunk::authenticate  The
> > base64-encoded MAC is (Hp2rijITJRJHVGJC35Y+PffTQAU=).
> > 2007-11-28 12:31:23.594 TRACE Gold::Request::new  invoked with
> > arguments: ()
> > 2007-11-28 12:31:23.595 DEBUG Gold::Message::unmarshallChunk  Extracted
> > the request ((Query, gold, [(Job, , )], [], [], [], [(Limit, 1000, ),
> > (Offset, 1000, )], [], 0, 0, 100000, )).
> > 2007-11-28 12:31:23.596 DEBUG Gold::Message::receiveChunk  Read message
> > tail (0).
> > 2007-11-28 12:31:23.596 TRACE Gold::Proxy::new  invoked with arguments:
> > (request => Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:23.597 TRACE Gold::Database::new  invoked with
> > arguments: ()
> > 2007-11-28 12:31:23.598 TRACE Gold::Database::nextId  invoked with
> > arguments: (Request)
> > 2007-11-28 12:31:23.600 TRACE Gold::Database::nextId  generated new id
> > 2391 for Request
> > 2007-11-28 12:31:23.600 TRACE Gold::Proxy::prepare  invoked with
> > arguments: (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:23.617 TRACE Gold::Cache::objectExists  invoked with
> > arguments: (Job)
> > 2007-11-28 12:31:23.618 TRACE Gold::Cache::actionExists  invoked with
> > arguments: (Job, Query)
> > 2007-11-28 12:31:23.620 TRACE Gold::Proxy::authorize  invoked with
> > arguments: (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:23.620 TRACE Gold::Cache::listUserRoles  invoked with
> > arguments: (gold)
> > 2007-11-28 12:31:23.621 TRACE Gold::Cache::listUserRoles  invoked with
> > arguments: (ANY)
> > 2007-11-28 12:31:23.622 TRACE Gold::Cache::getObjectProperty  invoked
> > with arguments: (Job, Association)
> > 2007-11-28 12:31:23.623 TRACE Gold::Cache::listRoleActionInstances
> > invoked with arguments: (SystemAdmin, Job, Query, ANY)
> > 2007-11-28 12:31:23.624 TRACE Gold::Proxy::prepareOptions  invoked with
> > arguments: (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:23.624 DEBUG Gold::Proxy::prepareOptions  Adding cooked
> > option: (Limit, 1000, )
> > 2007-11-28 12:31:23.625 DEBUG Gold::Proxy::prepareOptions  Adding cooked
> > option: (Offset, 1000, )
> > 2007-11-28 12:31:23.625 TRACE Gold::Proxy::prepareSelections  invoked
> > with arguments: (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:23.626 TRACE Gold::Database::select  invoked with
> > arguments: (object => Attribute, options => ARRAY(0x86a4e90), selections
> > => ARRAY(0x8f3fb7c), chunkNum => 0, conditions => ARRAY(0x8b85000))
> > 2007-11-28 12:31:23.626 TRACE Gold::Database::buildWhere  invoked with
> > arguments: (objects => ARRAY(0x8632d54), conditions => ARRAY(0x8632e68))
> > 2007-11-28 12:31:23.627 DEBUG Gold::Database::select  SQL Query: SELECT
> > g_name FROM g_attribute WHERE ( g_object='Job' AND g_hidden!='True' )
> > AND g_deleted!='True' ORDER BY g_sequence
> > 2007-11-28 12:31:24.254 DEBUG Gold::Database::select  SQL Results: Id
> > JobId
> > User
> > Project
> > Machine
> > Charge
> > Queue
> > Type
> > Stage
> > QualityOfService
> > Nodes
> > Processors
> > Executable
> > Application
> > StartTime
> > EndTime
> > WallDuration
> > QuoteId
> > Description
> > 2007-11-28 12:31:24.254 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Id)
> > 2007-11-28 12:31:24.255 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (JobId)
> > 2007-11-28 12:31:24.255 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (User)
> > 2007-11-28 12:31:24.256 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Project)
> > 2007-11-28 12:31:24.256 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Machine)
> > 2007-11-28 12:31:24.256 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Charge)
> > 2007-11-28 12:31:24.257 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Queue)
> > 2007-11-28 12:31:24.257 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Type)
> > 2007-11-28 12:31:24.257 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Stage)
> > 2007-11-28 12:31:24.258 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (QualityOfService)
> > 2007-11-28 12:31:24.258 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Nodes)
> > 2007-11-28 12:31:24.258 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Processors)
> > 2007-11-28 12:31:24.259 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Executable)
> > 2007-11-28 12:31:24.259 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Application)
> > 2007-11-28 12:31:24.259 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (StartTime)
> > 2007-11-28 12:31:24.260 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (EndTime)
> > 2007-11-28 12:31:24.260 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (WallDuration)
> > 2007-11-28 12:31:24.261 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (QuoteId)
> > 2007-11-28 12:31:24.261 DEBUG Gold::Proxy::prepareSelections  Adding
> > cooked selection: (Description)
> > 2007-11-28 12:31:24.261 TRACE Gold::Proxy::prepareAssignments  invoked
> > with arguments: (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:24.262 TRACE Gold::Cache::listAttributes  invoked with
> > arguments: (Job)
> > 2007-11-28 12:31:24.263 TRACE Gold::Proxy::prepareConditions  invoked
> > with arguments: (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:24.264 DEBUG Gold::Proxy::prepare  Cooked request:
> > (Query, gold, [(Job, , )], [(Id, , , ), (JobId, , , ), (User, , , ),
> > (Project, , , ), (Machine, , , ), (Charge, , , ), (Queue, , , ),
> > (Type, , , ), (Stage, , , ), (QualityOfService, , , ), (Nodes, , , ),
> > (Processors, , , ), (Executable, , , ), (Application, , , ),
> > (StartTime, , , ), (EndTime, , , ), (WallDuration, , , ),
> > (QuoteId, , , ), (Description, , , )], [], [], [(Limit, 1000, ),
> > (Offset, 1000, )], [], 0, 0, 100000, Gold::Database=HASH(0x8f36eb0))
> > 2007-11-28 12:31:24.264 TRACE Gold::Proxy::execute  invoked with
> > arguments: ()
> > 2007-11-28 12:31:24.265 TRACE Gold::Bank::execute  invoked with
> > arguments: (Gold::Proxy=HASH(0x8f12034))
> > 2007-11-28 12:31:24.265 DEBUG Gold::Bank::query  invoked with arguments:
> > (Gold::Request=HASH(0x8749970), 2391)
> > 2007-11-28 12:31:24.266 DEBUG Gold::Base::query  invoked with arguments:
> > (Gold::Request=HASH(0x8749970))
> > 2007-11-28 12:31:24.266 TRACE Gold::Database::select  invoked with
> > arguments: (chunkSize => 100000, options => ARRAY(0x8b2d224), selections
> > => ARRAY(0x8b2d1ac), objects => ARRAY(0x8b2d0bc), chunkNum => 1,
> > conditions => ARRAY(0x8b2d1e8))
> > 2007-11-28 12:31:24.288 TRACE Gold::Database::buildWhere  invoked with
> > arguments: (objects => ARRAY(0x8632d54), conditions => ARRAY(0x8632e68))
> > 2007-11-28 12:31:24.289 DEBUG Gold::Database::select  SQL Query: SELECT
> > g_id,g_job_id,g_user,g_project,g_machine,g_charge,g_queue,g_type,g_stage,g_quality_of_service,g_nodes,g_processors,g_executable,g_application,g_start_time,g_end_time,g_wall_duration,g_quote_id,g_description FROM g_job WHERE g_deleted!='True' LIMIT 1000 OFFSET 1000
> > 2007-11-28 12:31:24.313 DEBUG Gold::Database::select  SQL Results: 1001|
> > 998|gold|z1|machine1|10|||Charge|||1|||||10||
> > 1002|999|gold|z1|machine1|10|||Charge|||1|||||10||
> > 1003|1000|gold|z1|machine1|10|||Charge|||1|||||10||
> > 1004|1001|gold|z1|machine1|10|||Charge|||1|||||10||
> > 1005|1002|gold|z1|machine1|10|||Charge|||1|||||10||
> > 1006|1003|tim|z1|machine1|10|||Charge|||1|||||10||
> > and so on
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold.patch
Type: text/x-patch
Size: 2319 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/gold-users/attachments/20080122/13d4d38b/gold.bin


More information about the gold-users mailing list