Skip to content

Commit 457893e

Browse files
committed
Add "New Incident" link to dashboard nav
1 parent c5c747c commit 457893e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

resources/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"Major Outage": "Major Outage",
2424
"Metric Type": "Metric Type",
2525
"Month": "Month",
26+
"New Incident": "New Incident",
2627
"Newer Incidents": "Newer Incidents",
2728
"No incidents reported.": "No incidents reported.",
2829
"No incidents reported between :from and :to": "No incidents reported between :from and :to",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<x-filament::link href="{{ \Cachet\Filament\Resources\IncidentResource::getUrl('create') }}">{{ __('New Incident') }}</x-filament::link>

src/CachetDashboardServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Filament\Panel;
1111
use Filament\PanelProvider;
1212
use Filament\Support\Colors\Color;
13+
use Filament\View\PanelsRenderHook;
1314
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
1415
use Illuminate\Cookie\Middleware\EncryptCookies;
1516
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
@@ -54,10 +55,11 @@ public function panel(Panel $panel): Panel
5455
->icon('cachet-component-performance-issues'),
5556
NavigationItem::make('Documentation')
5657
->label(__('Documentation'))
57-
->url('https://docs.cachethq.io')
58+
->url('https://docs.cachethq.io/?ref=cachet-dashboard')
5859
->group(__('Resources'))
5960
->icon('heroicon-o-book-open'),
6061
])
62+
->renderHook(PanelsRenderHook::GLOBAL_SEARCH_AFTER, fn () => view('cachet::filament.widgets.add-incident-button'))
6163
->middleware([
6264
EncryptCookies::class,
6365
AddQueuedCookiesToResponse::class,

0 commit comments

Comments
 (0)