Changeset 653


Ignore:
Timestamp:
02/04/10 14:09:07 (14 years ago)
Author:
ramonb
Message:
  • more PHP4 fixes
Location:
branches/0.3/web/addons/job_monarch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.3/web/addons/job_monarch/libtoga.php

    r652 r653  
    587587        function TorqueXMLHandler( $clustername )
    588588        {
    589                 $jobs                   = array();
    590                 $clusters               = array();
     589                $this->jobs             = array();
     590                $this->clusters         = array();
    591591                $this->nodes            = array();
    592                 $heartbeat              = array();
    593                 $down_nodes             = array();
    594                 $offline_nodes          = array();
     592                $this->heartbeat        = array();
     593                $this->down_nodes       = array();
     594                $this->offline_nodes    = array();
    595595                $this->clustername      = $clustername;
    596596                $this->fqdn             = 1;
  • branches/0.3/web/addons/job_monarch/overview.php

    r652 r653  
    632632        foreach( $sorted_jobs as $jobid => $sortdec )
    633633        {
    634                 $report_time    = $jobs[$jobid][reported];
     634                $report_time    = $jobs[$jobid]['reported'];
    635635
    636636                if( $jobs[$jobid]['status'] == 'R' )
     
    643643                }
    644644
    645                 $ppn            = (int) $jobs[$jobid]['ppn'] ? $jobs[$jobid]['ppn'] : 1;
     645                $ppn            = isset( $jobs[$jobid]['ppn'] ) ? $jobs[$jobid]['ppn'] : 1;
    646646                $cpus           = $nodes * $ppn;
    647647
     
    817817                                }
    818818
    819                                 $ppn                    = (int) $jobs[$jobid]['ppn'] ? $jobs[$jobid]['ppn'] : 1;
     819                                $ppn                    = isset( $jobs[$jobid]['ppn'] ) ? $jobs[$jobid]['ppn'] : 1;
    820820                                $cpus                   = $nodes * $ppn;
    821821
     
    11191119                                        $load_color     = load_color($host_load[$host]);
    11201120                                        $graphargs      = ($reports[$metricname]) ? "g=$metricname&" : "m=$metricname&";
    1121                                         $graphargs      .= "z=small&c=$cluster_url&h=$host_url&l=$load_color" . "&v=$val['VAL']&r=job&jr=$jobrange&js=$jobstart";
     1121                                        $graphargs      .= "z=small&c=$cluster_url&h=$host_url&l=$load_color&v=".$val['VAL']."&r=job&jr=$jobrange&js=$jobstart";
    11221122                                        if( $max > 0 )
    11231123                                        {
Note: See TracChangeset for help on using the changeset viewer.