diff --git a/public/styles/normal.css b/public/styles/normal.css index c96b9d5..930743f 100644 --- a/public/styles/normal.css +++ b/public/styles/normal.css @@ -112,7 +112,6 @@ div.incident { table{ background:#fff; - table-layout:fixed; } table th, table td { diff --git a/source/webui/pages/incident.php b/source/webui/pages/incident.php new file mode 100644 index 0000000..657d368 --- /dev/null +++ b/source/webui/pages/incident.php @@ -0,0 +1,39 @@ + +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); + + + +?> \ No newline at end of file diff --git a/source/webui/templates/admin.tpl b/source/webui/templates/admin.tpl index 349051f..8555eb1 100644 --- a/source/webui/templates/admin.tpl +++ b/source/webui/templates/admin.tpl @@ -144,7 +144,7 @@
-

Add New Service

+

New Service

Use this form to define a new service

diff --git a/source/webui/templates/home.tpl b/source/webui/templates/home.tpl index c4014a3..af8efde 100644 --- a/source/webui/templates/home.tpl +++ b/source/webui/templates/home.tpl @@ -4,19 +4,19 @@

{$site_title}

-Add Incident +{if $display_admin_links}Add Incident{/if}
- - + + {foreach from=array(0,1,2,3,4,5,6) item=day} {if $day == 0} - + {else} - + {/if} {/foreach} diff --git a/source/webui/templates/incident.tpl b/source/webui/templates/incident.tpl new file mode 100644 index 0000000..ef05ce4 --- /dev/null +++ b/source/webui/templates/incident.tpl @@ -0,0 +1,56 @@ + +
+
+
+

Incident History: {$incident->reference|escape:html}

+
+
+
+

This page details the history of incident: {$incident->reference|escape:html}

+
+
+ {if $display_admin_links}{/if} +
+
+
+
+

Incident Details

+

+
+
+

Service: {$service->name|escape:html}

+

Site: {$site->name|escape:html}

+

Opened: {$incident->start_time|date_format:'h:i:s y-m-d'}

+

Estimated End: {$incident->estimated_end_time|date_format:'h:i:s y-m-d'}

+ +
+
+
+
+

Status Changes

+

The table display an audit log of changes to this incident

+
+
+
ServiceNowService / SiteNowTodayToday{mktime(0,0,0,date("n"),date("j")-$day)|date_format:"M j"}{mktime(0,0,0,date("n"),date("j")-$day)|date_format:"M j"}
+ + + + + + + {foreach from=$statuses item=status} + + + + + + {/foreach} + +
Date/TimeStatusDescription
+ {StatusBoard_DateTime::fuzzyTime($status->ctime)}
+ {$status->ctime|date_format:'y-m-d h:i:s'} +
{StatusBoard_Status::name($status->status)}{$status->description|escape:html}
+ + + + \ No newline at end of file diff --git a/source/webui/templates/status.tpl b/source/webui/templates/status.tpl index 6ad3f9f..2f75f92 100644 --- a/source/webui/templates/status.tpl +++ b/source/webui/templates/status.tpl @@ -73,11 +73,7 @@ {foreach from=$incidentsDuring item=incident} - {if $display_admin_links && $incident->currentStatus() != StatusBoard_Status::STATUS_Resolved} - {$incident->reference|escape:html} - {else} - {$incident->reference|escape:html} - {/if} + {$incident->reference|escape:html} {$incident->description|truncate|escape:html} {date('d-M H:i', $incident->start_time)}