Changeset 530


Ignore:
Timestamp:
07/02/08 13:17:49 (13 years ago)
Author:
ramonb
Message:

web/addons/job_monarch/overview.php:

  • remove weighing jobs for pie chart: this is done by pChart now

web/addons/job_monarch/chart.php:

  • small layout fix
Location:
trunk/web/addons/job_monarch
Files:
2 edited

Legend:

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

    r529 r530  
    4646// Draw the pie slices and percentages text
    4747//
    48 $myChart->drawPieGraph( $DataSet->GetData(), $DataSet->GetDataDescription(), 150, 90, 110, TRUE, TRUE, 50, 20, 20 );
     48$myChart->drawPieGraph( $DataSet->GetData(), $DataSet->GetDataDescription(), 160, 100, 110, TRUE, TRUE, 50, 20, 20 );
    4949
    5050// Draw legend text
  • trunk/web/addons/job_monarch/overview.php

    r527 r530  
    274274        $used_cpus              = $nr_cpus - $empty_cpus;
    275275
    276         $empty_percentage       = ($empty_cpus / $nr_cpus) * 100;
     276        //$empty_percentage     = ($empty_cpus / $nr_cpus) * 100;
     277        $empty_percentage       = $empty_cpus;
    277278
    278279        $qcolors                = array();
     
    300301                        // - what percentage of the cpus is in use by this job
    301302                        //
    302                         $job_weight[$myjob]     = ( $job_cpu / $nr_cpus );
    303 
     303                        //$job_weight[$myjob]   = ( $job_cpu / $nr_cpus );
     304                        $job_weight[$myjob]     = $job_cpu;
    304305
    305306                        if( isset( $piefilter ) ) {
     
    382383        }
    383384
     385        //$percentage   = 0;
     386        //$slice_count  = 0;
     387
     388        // Find rounding errors: total has to be 100
     389        //
     390        //foreach( $graphvals as $name => $totalweight)
     391        //{
     392        //      $percentage     = $percentage + $totalweight;
     393        //      $slice_count    = $slice_count + 1;
     394        //}
     395
     396        //$round_offset = ( 100 - $percentage ) / $slice_count;
     397
    384398        foreach( $graphvals as $name => $totalweight)
    385399        {
    386                 $percentage     = ( $totalweight * 100 );
     400                //$percentage   = ( $totalweight * 100 ) + $round_offset;
     401                $percentage     = $totalweight;
    387402               
    388403                $color          = randomColor( $qcolors );
Note: See TracChangeset for help on using the changeset viewer.