Changeset 521 in svn for trunk/admin/xcache.tpl.php


Ignore:
Timestamp:
2008-02-17T15:27:05+01:00 (7 years ago)
Author:
Xuefer
Message:

add "total" stat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/xcache.tpl.php

    r519 r521  
    5151        $pused = 100 - $pavail;
    5252
    53         $graph = freeblock_to_graph($ci['free_blocks'], $ci['size']);
    5453        $w = $free_graph_width;
    5554        $tdwidth = $w + 2;
     55        if (empty($ci['istotal'])) {
     56            $graph = freeblock_to_graph($ci['free_blocks'], $ci['size']);
     57            $freeblockgraph = "<div class=\"freeblockgraph\" style=\"width: {$w}px\">{$graph}</div>";
     58        }
     59        else {
     60            $freeblockgraph = '';
     61        }
    5662
    5763        $ci_slots = size($ci['slots']);
     
    5965        $ci_avail = size($ci['avail']);
    6066        $ci = number_formats($ci, $numkeys);
    61         $ci['compiling']    = $ci['type'] == $type_php ? ($ci['compiling'] ? 'yes' : 'no') : '-';
    62         $ci['can_readonly'] = $ci['can_readonly'] ? 'yes' : 'no';
     67        if (!empty($ci['istotal'])) {
     68            $ci['compiling']    = '-';
     69            $ci['can_readonly'] = '-';
     70        }
     71        else {
     72            $ci['compiling']    = $ci['type'] == $type_php ? ($ci['compiling'] ? 'yes' : 'no') : '-';
     73            $ci['can_readonly'] = $ci['can_readonly'] ? 'yes' : 'no';
     74        }
    6375        echo <<<EOS
    6476        <th>{$ci['cache_name']}</th>
     
    7183                ><div style="width: {$pused}%" class="pused"></div
    7284            ></div
    73             ><div class="usagegraph" style="width: {$w}px">{$graph}</div
    74         ></td>
     85        >{$freeblockgraph}</td>
    7586        <td
    7687            ><form method="post"
Note: See TracChangeset for help on using the changeset viewer.