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


Ignore:
Timestamp:
2006-08-27T12:54:34+02:00 (9 years ago)
Author:
Xuefer
Message:

update percent bar to vertical/avail

File:
1 edited

Legend:

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

    r107 r108  
    4444        <th>Size</th>
    4545        <th>Avail</th>
    46         <th>Used</th>
     46        <th>%</th>
    4747        <th>Clear</th>
    4848        <th>Compiling</th>
     
    5959    foreach ($cacheinfos as $i => $ci) {
    6060        echo "
    61         <tr ", $a->next(), ">";
     61        <tr ", $a->next(), " height=\"20\">";
     62        $pavail = (int) ($ci['avail'] / $ci['size'] * 100);
     63        $pused = 100 - $pavail;
     64
    6265        $ci = number_formats($ci, $numkeys);
    6366        $ci['compiling']    = $ci['type'] == $type_php ? ($ci['compiling'] ? 'yes' : 'no') : '-';
    6467        $ci['can_readonly'] = $ci['can_readonly'] ? 'yes' : 'no';
    65 
    66         $percent = (int) (($ci['size'] - $ci['avail']) / $ci['size'] * 100);
    6768        echo <<<EOS
    6869        <th>{$ci['cache_name']}</th>
     
    7071        <td>{$ci['size']}</td>
    7172        <td>{$ci['avail']}</td>
    72         <td><div class="percent"><div style="width: $percent%" class="v">&nbsp;</div></div></td>
     73        <td title="{$pavail} %"><div class="percent"><div style="height: {$pused}%" class="pused">&nbsp;</div><div style="height: {$pavail}%" class="pavail">&nbsp;</div></div></td>
    7374        <td>
    7475            <form method="post">
Note: See TracChangeset for help on using the changeset viewer.