Ignore:
Timestamp:
02/07/08 10:35:47 (16 years ago)
Author:
bastiaans
Message:

libtoga.php:

  • added getUsingFQDN() functions to determine FQDN usage from overview etc
  • fixed: moved column and row number header printing so that it will always be printed, even if there are nodes missing
  • code cleanup
  • added more comments

overview.php:

  • check getUsingFQDN() whether or not to use a domain name for node hostnames
  • added more comments

version.php:

  • make sure it's know this is a SVN version
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/overview.php

    r462 r463  
    4444$gnodes         = $data_gatherer->getNodes();
    4545$cpus           = $data_gatherer->getCpus();
     46$use_fqdn       = $data_gatherer->getUsingFQDN();
    4647
    4748function setupFilterSettings()
     
    507508        global $start, $end, $reports, $gnodes, $default_showhosts;
    508509        global $COLUMN_QUEUED, $COLUMN_REQUESTED_MEMORY, $COLUMN_NODES, $hostname;
    509         global $cluster;
     510        global $cluster, $use_fqdn;
    510511
    511512        $metricname             = $m;
     
    552553        $view_name_nodes        = array();
    553554
     555        // Is the "requested memory" column enabled in the config
     556        //
    554557        if( $COLUMN_REQUESTED_MEMORY )
    555558        {
     
    557560        }
    558561
     562        // Is the "nodes hostnames" column enabled in the config
     563        //
    559564        if( $COLUMN_NODES )
    560565        {
     
    562567        }
    563568
     569        // Is the "queued time" column enabled in the config
     570        //
    564571        if( $COLUMN_QUEUED )
    565572        {
     
    582589        }
    583590
     591        // Running / queued amount jobs graph
     592        //
    584593        if( $rjqj_host != null )
    585594        {
     
    641650                                                $hostnode       = $tempnode;
    642651
    643                                                 //if( substr( $hostnode, $domain_len ) != $jobs[$jobid][domain] )
    644                                                 //{
    645                                                 //      $hostnode = $hostnode. '.'. $jobs[$jobid][domain];
    646                                                 //}
     652                                                if( $use_fqdn == 1)
     653                                                {
     654                                                        if( substr( $hostnode, $domain_len ) != $jobs[$jobid][domain] )
     655                                                        {
     656                                                                $hostnode = $hostnode. '.'. $jobs[$jobid][domain];
     657                                                        }
     658                                                }
    647659
    648660                                                if( $hostname == $hostnode )
     
    804816                                                foreach( $jobs[$jobid][nodes] as $mynode )
    805817                                                {
    806                                                         //$myhost_href  = "./?c=".$clustername."&h=".$mynode.".".$jobs[$jobid][domain];
     818                                                        if( $use_fqdn == 1)
     819                                                        {
     820                                                                $mynode = $mynode.".".$jobs[$jobid][domain];
     821                                                        }
    807822                                                        $myhost_href    = "./?c=".$clustername."&h=".$mynode;
    808823                                                        $mynodehosts[]  = "<A HREF=\"".$myhost_href."\">".$mynode."</A>";
     
    978993                        foreach ( $hosts_up as $host )
    979994                        {
    980                                 //$domain_len           = 0 - strlen( $domain );
    981 
    982                                 //if( substr( $host, $domain_len ) != $domain )
    983                                 //{
    984                                 //      $host           = $host . '.' . $domain;
    985                                 //}
     995                                $domain_len             = 0 - strlen( $domain );
     996
     997                                if( $use_fqdn )
     998                                {
     999                                        if( substr( $host, $domain_len ) != $domain )
     1000                                        {
     1001                                                $host           = $host . '.' . $domain;
     1002                                        }
     1003                                }
    9861004
    9871005                                $cpus                   = $metrics[$host]["cpu_num"]["VAL"];
     
    10071025                                }
    10081026                        }
     1027
    10091028                        switch ( $sort )
    10101029                        {
Note: See TracChangeset for help on using the changeset viewer.