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


Ignore:
Timestamp:
2008-02-17T11:52:38+01:00 (7 years ago)
Author:
Xuefer
Message:

show free blocks as graph

File:
1 edited

Legend:

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

    r456 r517  
    5151        $pused = 100 - $pavail;
    5252
     53        $graph = freeblock_to_graph($ci['free_blocks'], $ci['size']);
     54        $w = $free_graph_width;
     55        $tdwidth = $w + 2;
     56
    5357        $ci_slots = size($ci['slots']);
    5458        $ci_size  = size($ci['size']);
     
    6266        <td title="{$ci['size']}">{$ci_size}</td>
    6367        <td title="{$ci['avail']}">{$ci_avail}</td>
    64         <td title="{$pavail} %"><div class="percent"><div style="height: {$pused}%" class="pused">&nbsp;</div><div style="height: {$pavail}%" class="pavail">&nbsp;</div></div></td>
     68        <td title="{$pavail} %" width="{$tdwidth}"
     69            ><div class="percent" style="width: {$w}px"
     70                ><div style="width: {$pavail}%" class="pavail"></div
     71                ><div style="width: {$pused}%" class="pused"></div
     72            ></div
     73            ><div class="usagegraph" style="width: {$w}px">{$graph}</div
     74        ></td>
    6575        <td>
    6676            <form method="post">
     
    8999    <?php } ?>
    90100</table>
    91 <div>
    92     <?php echo _T('Free Blocks'); ?>:
    93 </div>
    94 <?php
    95 foreach ($cacheinfos as $i => $ci) {
    96     $b->reset();
    97 ?>
    98 <table cellspacing="0" cellpadding="4" class="cycles freeblocks">
    99     <tr>
    100         <th><?php echo $ci['cache_name']; ?> <?php echo _T("size"); ?><br><?php echo _T("offset"); ?></th>
    101     <?php
    102     foreach ($ci['free_blocks'] as $block) {
    103         $size   = size($block['size']);
    104         $offset = size($block['offset']);
    105 
    106         $c = $b->next();
    107         echo "
    108         <td $c><nobr>$size<br>$offset</nobr></td>";
    109     }
    110     ?>
    111 
    112     </tr>
    113 </table>
    114 <?php
    115 }
    116 ?>
    117101<div style="clear: both">&nbsp;</div>
    118102<?php
Note: See TracChangeset for help on using the changeset viewer.