Changeset 248
- Timestamp:
- 04/11/06 15:07:28 (17 years ago)
- Location:
- trunk/web/addons/job_monarch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/job_monarch/conf.php
r246 r248 3 3 // 4 4 $default_showhosts = 1; 5 6 // Stop displaying archive search results after SEARCH_RESULT_LIMIT 7 // 8 $SEARCH_RESULT_LIMIT = 20; 5 9 6 10 // Show the column job attribute 'requested memory'? -
trunk/web/addons/job_monarch/libtoga.php
r246 r248 142 142 function searchDbase( $id = null, $queue = null, $user = null, $name = null, $start_from_time = null, $start_to_time = null, $end_from_time = null, $end_to_time = null ) { 143 143 144 global $SEARCH_RESULT_LIMIT; 145 144 146 if( $id ) 145 147 $query = "SELECT job_id FROM jobs WHERE job_id = '$id' AND job_status = 'F'"; … … 162 164 $query_args[] = "job_stop_timestamp <= $end_to_time"; 163 165 164 $query = " SELECT job_idFROM jobs WHERE job_status = 'F' AND ";166 $query = "FROM jobs WHERE job_status = 'F' AND "; 165 167 $extra_query_args = ''; 166 168 … … 175 177 } 176 178 177 $ids = $this->queryDbase( $query ); 179 $count_result_idname = "COUNT(job_id)"; 180 $select_result_idname = "job_id"; 181 182 $count_query = "SELECT " . $count_result_idname . " " . $query; 183 184 $count_result = $this->queryDbase( $count_query ); 185 $this->resultcount = (int) $count_result[0][count]; 186 187 $select_query = "SELECT " . $select_result_idname . " " . $query . " ORDER BY job_id LIMIT " . $SEARCH_RESULT_LIMIT; 188 $ids = $this->queryDbase( $select_query ); 178 189 179 190 $ret = array(); -
trunk/web/addons/job_monarch/search.php
r247 r248 325 325 global $end_from_time, $end_to_time, $filter, $default_showhosts, $m, $hosts_up; 326 326 global $period_start, $period_stop, $sortby, $sortorder, $COLUMN_REQUESTED_MEMORY; 327 global $SEARCH_RESULT_LIMIT; 327 328 328 329 $metricname = $m; … … 351 352 if( $end_to_time ) $end_to_time = datetimeToEpoch( $end_to_time ); 352 353 $search_ids = $tdb->searchDbase( $id, $queue, $user, $name, $start_from_time, $start_to_time, $end_from_time, $end_to_time ); 354 355 if( ($tdb->resultcount) > (int) $SEARCH_RESULT_LIMIT ) { 356 $tpl->gotoBlock( "_ROOT" ); 357 358 $tpl->assign( "form_error_msg", "Got " . $tdb->resultcount . " search results, output limited to last " . $SEARCH_RESULT_LIMIT . " jobs." ); 359 $tpl->gotoBlock( "search_results" ); 360 } 353 361 354 362 $jobs = array();
Note: See TracChangeset
for help on using the changeset viewer.