Skip to content

Commit

Permalink
Merge pull request #208 from will-h/master
Browse files Browse the repository at this point in the history
Add Connected Capacity totals to admin interface
  • Loading branch information
barryo committed Jun 29, 2015
2 parents d059073 + a2ba79d commit a259286
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions application/views/admin/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@
{/foreach}

<th>Total</th>
<th>Connected<br>Capacity</th>
</tr>
</thead>
<tbody>
{assign var=colcount value=0}
{foreach from=$bylan key=n item=spds}

{assign var=rowcount value=0}
{assign var=rowcap value=0}

<tr>
<td>{$n}</td>
Expand All @@ -171,24 +173,29 @@
{if isset( $spds.$k )}
{$spds.$k}
{assign var=rowcount value=$rowcount+$spds.$k}
{assign var=rowcap value=$rowcap+$spds.$k*$k}
{else}
0
{/if}
</td>
{/foreach}
<td>{$rowcount}</td>
<td>{$rowcap/1000}G</td>
</tr>
{assign var=colcount value=$rowcount+$colcount}
{/foreach}

<tr>
<td><strong>Totals</strong></td>
{assign var=rowcap value=0}
{foreach from=$speeds key=k item=i}
{assign var=rowcap value=$rowcap+$i*$k}
<td>
<strong>{$i}</strong>
</td>
{/foreach}
<td><strong>{$colcount}</strong></td>
<td><strong>{$rowcap/1000}G</strong></td>
</tr>

</tbody>
Expand Down

0 comments on commit a259286

Please sign in to comment.