Updates to generate last 7 days

Signed-off-by: Nathan Booth <nath.booth@gmail.com>
This commit is contained in:
Nathan Booth
2011-12-21 19:33:59 +00:00
parent a041081f3b
commit 2aa20ddb64
2 changed files with 39 additions and 20 deletions

View File

@@ -0,0 +1,6 @@
<?php
$services = StatusBoard_Service::all();
$this->smarty->assign('services', $services);
?>

View File

@@ -1,14 +1,17 @@
<div class="container">
<div class="row">
<div class="span16" name="name"><!--name content container -->
<h1>Site Status History {$service->name|escape:html}LDAP - External{$site->name|escape:html}</h1>
<h1>Site Status History {$service->name|escape:html}-{$site->name|escape:html}</h1>
<p>This page details the incident history for a Site related to a Service</p>
<div class="row" name="edit service">
<div class="span4 column"><!--New description-->
<h3>Today 21/12/11</h3>
<p>x incidents</p>
</div>
<div class="span12 column">
{foreach from=array(0,1,2,3,4,5,6) item=day}
{if $day == 0}
<div class="row" name="edit service">
<div class="span4 column"><!--New description-->
<h3 class="status">Today {mktime(0,0,0,date("n"),date("j"))|date_format:"d M Y"}</h3>
<p>x incidents</p>
</div>
<div class="span12 column">
<table class="bordered-table" name="sites_list_table"><!--Services table -->
<thead>
<th>Incident</th>
@@ -33,14 +36,16 @@
</tr>
</tbody>
</table><!--/name table -->
</div>
</div>
<div class="row" name="edit service">
<div class="span4 column"><!--New description-->
<h3>Yesterday 20/12/11</h3>
<p>x incidents</p>
</div>
<div class="span12 column">
</div>
</div>
{else}
<div class="row" name="edit service">
<div class="span4 column"><!--New description-->
<h3 class="status">{mktime(0,0,0,date("n"),date("j")-$day)|date_format:"d M Y"}</h3>
<p>x incidents</p>
</div>
<div class="span12 column">
<table class="bordered-table" name="sites_list_table"><!--Services table -->
<thead>
<th>Incident</th>
@@ -54,13 +59,21 @@
<td>123456</td>
<td>Loss of power on remote site</td>
<td>14:00</td>
<td>Resolved</td>
<td>15:00</td>
<td>Major Incident</td>
<td>-</td>
</tr><tr>
<td>123457</td>
<td>Loss of power on remote site</td>
<td>14:00</td>
<td>Major Incident</td>
<td>-</td>
</tr>
</tbody>
</table><!--/name table -->
</div>
</div>
</div>
</div>
{/if}
{/foreach}
</div>
</div>