Fix RSS feed where no component, add RSS discovery

This commit is contained in:
James Brooks
2014-12-20 17:28:36 +00:00
parent db78fe9341
commit c9b4bd51c4
2 changed files with 8 additions and 1 deletions

View File

@@ -14,10 +14,16 @@ class RSSController extends Controller {
]);
Incident::get()->map(function($incident) use ($feed) {
$componentName = null;
$component = $incident->component;
if ($component) {
$componentName = $component->name;
}
$feed->item([
'title' => $incident->name,
'message' => $incident->message,
'component' => $incident->component->name,
'component' => $componentName,
'status' => $incident->humanStatus,
'created_at' => $incident->created_at,
'updated_at' => $incident->updated_at

View File

@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="http://james-brooks.uk">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="alternate" type="application/rss+xml" href="/rss" />
<title>{{ isset($pageTitle) ? $pageTitle : Setting::get('app_name') }} | Cachet</title>