File tree Expand file tree Collapse file tree 5 files changed +34
-3
lines changed Expand file tree Collapse file tree 5 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 14
14
"Custom Footer HTML" : " Custom Footer HTML" ,
15
15
"Custom Header HTML" : " Custom Header HTML" ,
16
16
"Dashboard" : " Dashboard" ,
17
+ "Edit Incident" : " Edit Incident" ,
17
18
"Fixed" : " Fixed" ,
18
19
"Guests" : " Guests" ,
19
20
"Identified" : " Identified" ,
Original file line number Diff line number Diff line change 15
15
<div class =" text-xs font-medium" >{{ $incident -> components -> pluck (' name' )-> join (' , ' ) } } </div >
16
16
<div class =" flex flex-col sm:flex-row justify-between gap-2 flex-col-reverse items-center" >
17
17
<div class =" flex flex-col flex-1" >
18
- <h3 class =" max-w-full text-base font-semibold break-words sm:text-xl" >
19
- <a href =" {{ route (' cachet.status-page.incident' , $incident ) } }" >{{ $incident -> name } } </a >
20
- </h3 >
18
+ <div class =" flex gap-2 items-center" >
19
+ <h3 class =" max-w-full text-base font-semibold break-words sm:text-xl" >
20
+ <a href =" {{ route (' cachet.status-page.incident' , $incident ) } }" >{{ $incident -> name } } </a >
21
+ </h3 >
22
+ @auth
23
+ <a href =" {{ $incident -> filamentDashboardEditUrl () } }" class =" underline text-right text-sm text-zinc-500 hover:text-zinc-400 dark:text-zinc-400 dark:hover:text-zinc-300" title =" {{ __ (' Edit Incident' ) } }" >
24
+ <x-heroicon-m-pencil-square class =" size-4" />
25
+ </a >
26
+ @endauth
27
+ </div >
21
28
<span class =" text-xs text-zinc-500 dark:text-zinc-400" >
22
29
{{ $incident -> timestamp -> diffForHumans () } } — <time datetime =" {{ $incident -> timestamp -> toW3cString () } }" x-text =" timestamp.toLocaleString()" ></time >
23
30
</span >
Original file line number Diff line number Diff line change 9
9
<x-cachet::incident :date =" $incident->timestamp" :incidents =" [$incident]" />
10
10
</div >
11
11
</div >
12
+
13
+ <p class =" text-xs text-right" >
14
+ Incident UUID: {{ $incident -> guid } }
15
+ </p >
12
16
</div >
13
17
14
18
<x-cachet::footer />
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ public static function form(Form $form): Form
68
68
Forms \Components \Toggle::make ('stickied ' )
69
69
->label (__ ('Sticky Incident? ' ))
70
70
->required (),
71
+ Forms \Components \TextInput::make ('guid ' )
72
+ ->label ('Incident UUID ' )
73
+ ->visibleOn (['edit ' ])
74
+ ->disabled ()
75
+ ->readonly ()
76
+ ->columnSpanFull (),
71
77
])
72
78
->columnSpan (1 ),
73
79
])
@@ -135,6 +141,10 @@ public static function table(Table $table): Table
135
141
->inline ()
136
142
->required (),
137
143
]),
144
+ Action::make ('view-incident ' )
145
+ ->icon ('heroicon-o-eye ' )
146
+ ->url (fn (Incident $ record ): string => route ('cachet.status-page.incident ' , $ record ))
147
+ ->label (__ ('View Incident ' )),
138
148
Tables \Actions \EditAction::make (),
139
149
Tables \Actions \DeleteAction::make (),
140
150
])
Original file line number Diff line number Diff line change 8
8
use Cachet \Events \Incidents \IncidentCreated ;
9
9
use Cachet \Events \Incidents \IncidentDeleted ;
10
10
use Cachet \Events \Incidents \IncidentUpdated ;
11
+ use Cachet \Filament \Resources \IncidentResource ;
11
12
use Illuminate \Database \Eloquent \Builder ;
12
13
use Illuminate \Database \Eloquent \Casts \Attribute ;
13
14
use Illuminate \Database \Eloquent \Factories \HasFactory ;
@@ -119,4 +120,12 @@ public function formattedMessage(): string
119
120
{
120
121
return Str::of ($ this ->message )->markdown ();
121
122
}
123
+
124
+ /**
125
+ * Get the URL to the incident page within the dashboard.
126
+ */
127
+ public function filamentDashboardEditUrl (): string
128
+ {
129
+ return IncidentResource::getUrl (name: 'edit ' , parameters: ['record ' => $ this ->id ]);
130
+ }
122
131
}
You can’t perform that action at this time.
0 commit comments