Updated homepage and added incident detail page
Widened the site/service column on homepage to allow for longer site names. Added page for incident, modified link on status page to link to incident history. Signed-off-by: Nathan Booth <nath.booth@gmail.com>
This commit is contained in:
39
source/webui/pages/incident.php
Normal file
39
source/webui/pages/incident.php
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
<?php
|
||||
$main = StatusBoard_Main::instance();
|
||||
$request = $main->request();
|
||||
$auth = $main->auth();
|
||||
|
||||
$incident_id = $request->get('id', 'Sihnon_Exception_InvalidParameters');
|
||||
|
||||
try
|
||||
{
|
||||
$incident = StatusBoard_Incident::fromId($incident_id);
|
||||
$site_id = $incident->site;
|
||||
$site = StatusBoard_Site::fromId($site_id);
|
||||
$service_id = $site->service;
|
||||
$service = StatusBoard_Service::fromId($service_id);
|
||||
}
|
||||
catch (Sihnon_Exception_ResultCountMismatch $e)
|
||||
{
|
||||
throw new StatusBoard_Exception_FileNotFound();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$statuses = $incident->statusChanges();
|
||||
|
||||
|
||||
$this->smarty->assign('service', $service);
|
||||
$this->smarty->assign('site', $site);
|
||||
$this->smarty->assign('incident', $incident);
|
||||
$this->smarty->assign('statuses', $statuses);
|
||||
$this->smarty->assign('messages', $messages);
|
||||
|
||||
$display_admin_links = ($auth->isAuthenticated() && $auth->isAdministrator());
|
||||
$this->smarty->assign('display_admin_links', $display_admin_links);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user