Changeset 457


Ignore:
Timestamp:
02/05/08 17:34:14 (14 years ago)
Author:
bastiaans
Message:

overview.php:

  • bugfix: ticket #39: prevent negative amount free cpus/nodes
File:
1 edited

Legend:

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

    r456 r457  
    267267        }
    268268
     269        $empty_cpus             = ( $empty_cpus >= 0 ) ? $empy_cpus : 0;
    269270        $used_cpus              = $nr_cpus - $empty_cpus;
    270271
     
    857858
    858859        $free_nodes             = $avail_nodes - $running_nodes;
     860        $free_nodes             = ( $free_nodes >= 0 ) ? $free_nodes : 0;
    859861        $free_cpus              = $avail_cpus - $running_cpus;
     862        $free_cpus              = ( $free_cpus >= 0 ) ? $free_cpus : 0;
    860863
    861864        $tpl->assignGlobal( "avail_nodes", $avail_nodes );
Note: See TracChangeset for help on using the changeset viewer.