Changeset 550 for trunk/web2/addons/job_monarch/jobstore.php
- Timestamp:
- 07/14/08 14:31:03 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/jobstore.php
r549 r550 1 1 <?php 2 3 ini_set("memory_limit","100M"); 4 set_time_limit(0); 2 5 3 6 $c = $_POST["c"]; … … 20 23 $status = isset($_POST['status']) ? $_POST['status'] : null; 21 24 $queue = isset($_POST['queue']) ? $_POST['queue'] : null; 25 $host = isset($_POST['host']) ? $_POST['host'] : null; 22 26 23 27 global $c, $clustername, $cluster; … … 222 226 function filterJobs( $jobs ) 223 227 { 224 global $jid, $owner, $queue, $status ;228 global $jid, $owner, $queue, $status, $host, $use_fqdn; 225 229 226 230 $filtered_jobs = array(); … … 240 244 { 241 245 $nodes = count( $jobattrs[nodes] ); 246 247 $mynodehosts = array(); 248 foreach( $jobattrs[nodes] as $mynode ) 249 { 250 if( $use_fqdn == 1) 251 { 252 $mynode = $mynode.".".$jobattrs[domain]; 253 } 254 $mynodehosts[] = $mynode; 255 } 256 $jobattrs[nodes] = $mynodehosts; 242 257 } 243 258 else … … 251 266 $start_time = (int) $jobattrs[start_timestamp]; 252 267 $runningtime = $report_time - $start_time; 253 268 269 $domain = $jobattrs[domain]; 270 $domain_len = 0 - strlen( $domain ); 271 254 272 $keepjob = true; 255 273 … … 261 279 } 262 280 } 281 282 if( $host ) 283 { 284 if( $state == 'R' ) 285 { 286 $jnodes = $jobattrs['nodes']; 287 288 $keepjob = false; 289 290 foreach( $jnodes as $jnode) 291 { 292 if( $jnode == $host ) 293 { 294 $keepjob = true; 295 } 296 } 297 } 298 else 299 { 300 $keepjob = false; 301 } 302 } 263 303 if( $owner ) 264 304 { … … 295 335 { 296 336 global $jobs, $hearbeat, $pstart, $pend; 297 global $sortfield, $sortorder, $query ;337 global $sortfield, $sortorder, $query, $host; 298 338 global $jid, $owner, $queue, $status; 299 339 … … 316 356 $jobs = quickSearchJobs( $jobs, $query ); 317 357 } 318 if( $jid || $owner || $queue || $status )358 if( $jid || $owner || $queue || $status || $host ) 319 359 { 320 360 $jobs = filterJobs( $jobs );
Note: See TracChangeset
for help on using the changeset viewer.