New design.

This commit is contained in:
James Brooks
2014-11-19 16:26:42 +00:00
parent 189890154e
commit 4ab353c954
11 changed files with 1248 additions and 118 deletions
+9
View File
@@ -9,4 +9,13 @@
case 4: return 'Major Outage';
}
}
public function getColorAttribute() {
switch ($this->status) {
case 1: return 'text-success';
case 2: return 'text-info';
case 3: return 'text-alert';
case 4: return 'text-danger';
}
}
}
+2 -1
View File
@@ -15,6 +15,7 @@
case 1:
return 'warning';
case 2:
return 'alert';
case 3:
return 'info';
case 4:
@@ -27,7 +28,7 @@
case 1:
return 'glyphicon-flag';
case 2:
return 'glyphicon-certificate';
return 'glyphicon-warning-sign';
case 3:
return 'glyphicon-eye-open';
case 4:
+12 -11
View File
@@ -1,22 +1,23 @@
<li class='list-group-item'>
<ul class='list-group'>
<?php
$incidentDate = Carbon::now()->subDays($i);
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
?>
<h3 class='list-group-item-heading'>{{ $incidentDate->format('jS M, Y') }}</h3>
<hr />
<li class='list-group-item active'>
<h3 class='list-group-item-heading'>{{ $incidentDate->format('jS M Y') }}</h3>
</li>
@unless($incidents->count() > 0)
<p>No incidents reported.</p>
<li class='list-group-item'>No incidents reported.</li>
@endunless
@foreach($incidents as $incidentID => $incident)
<span class='badge badge-{{ $incident->color }}'><i class='glyphicon {{ $incident->icon }}'></i></span>
<h4>{{ $incident->name }}</h4>
<time>{{ $incident->created_at->format('H:i:s A') }} {{ Config::get('app.timezone') }}</time>
<p>{{ $incident->message }}</p>
@if($incidentID < ($incident->count() - 1))
<hr />
<li class='list-group-item'>
<span class='badge badge-{{ $incident->color }}'><i class='glyphicon {{ $incident->icon }}'></i></span>
<h4>{{ $incident->name }} <small><time>{{ $incident->created_at->format('H:i:s A') }}</time></small></h4>
{{ $incident->message }}
@if($incidentID < ($incident->count() - 1))
</li>
@endif
@endforeach
</li>
</ul>
+11 -22
View File
@@ -1,32 +1,21 @@
@extends('layout.master')
@section('content')
<div class='alert alert-{{ $systemStatus }}'>{{ $systemMessage }}</div>
<div class='page-header'>
<div class='alert alert-{{ $systemStatus }}'>{{ $systemMessage }}</div>
<ul class='list-group components'>
@foreach(Component::get() as $component)
<li class='list-group-item component '>
<!-- <span class='badge badge-{{ $component->color }}'><i class='glyphicon glyphicon-stop'></i></span> -->
<h4>{{ $component->name }} <small class='{{ $component->color }}'>{{ $component->humanStatus }}</small></h4>
<p>{{ $component->description }}</p>
</li>
@endforeach
</ul>
</div>
<ul class='list-group'>
@foreach(Component::get() as $component)
<li class='list-group-item'>
<div class='row'>
<div class='col-md-8'>
<h4>{{ $component->name }}</h4>
@if($component->description)
<p>{{ $component->description }}</p>
@endif
</div>
<div class='col-md-4'>
<p class='text-right'>{{ $component->humanStatus }}</p>
</div>
</div>
</li>
@endforeach
</ul>
<h1>Past Incidents</h1>
<ul class='list-group'>
@for($i=0; $i <= 7; $i++)
@include('incident', array('i', $i))
@endfor
</ul>
@stop