Ignore:
Timestamp:
07/14/08 14:31:03 (16 years ago)
Author:
ramonb
Message:

job_monarch/image.php:

  • fix filter typos

job_monarch/js/jobgrid.js:

  • fixed filter cell click enable/disable check
  • reloading is now a function
  • wil reload both grid and clusterimage now when filters are changed

job_monarch/jobstore.php:

  • set memory limit
  • respect host filter
  • use fqdn setting for nodes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web2/addons/job_monarch/jobstore.php

    r549 r550  
    11<?php
     2
     3ini_set("memory_limit","100M");
     4set_time_limit(0);
    25
    36$c                      = $_POST["c"];
     
    2023$status                 = isset($_POST['status']) ? $_POST['status'] : null;
    2124$queue                  = isset($_POST['queue']) ? $_POST['queue'] : null;
     25$host                   = isset($_POST['host']) ? $_POST['host'] : null;
    2226
    2327global $c, $clustername, $cluster;
     
    222226function filterJobs( $jobs )
    223227{
    224         global $jid, $owner, $queue,  $status;
     228        global $jid, $owner, $queue,  $status, $host, $use_fqdn;
    225229
    226230        $filtered_jobs  = array();
     
    240244                                {
    241245                                        $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;
    242257                                }
    243258                                else
     
    251266                                $start_time     = (int) $jobattrs[start_timestamp];
    252267                                $runningtime    = $report_time - $start_time;
    253        
     268
     269                                $domain         = $jobattrs[domain];
     270                                $domain_len     = 0 - strlen( $domain );
     271
    254272                                $keepjob        = true;
    255273
     
    261279                                        }
    262280                                }
     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                                }
    263303                                if( $owner )
    264304                                {
     
    295335{
    296336        global $jobs, $hearbeat, $pstart, $pend;
    297         global $sortfield, $sortorder, $query;
     337        global $sortfield, $sortorder, $query, $host;
    298338        global $jid, $owner, $queue,  $status;
    299339
     
    316356                $jobs                   = quickSearchJobs( $jobs, $query );
    317357        }
    318         if( $jid || $owner || $queue || $status )
     358        if( $jid || $owner || $queue || $status || $host )
    319359        {
    320360                $jobs                   = filterJobs( $jobs );
Note: See TracChangeset for help on using the changeset viewer.