Fix RSS feed where no component, add RSS discovery
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user