File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
web/src/components/alerting Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,14 @@ const AlertsDetailsPage_: React.FC = () => {
140140
141141 const AlertsChart = alertsChart ?. [ 0 ] ;
142142
143+ // Keep the default name for the admin perspective while providing specific
144+ // entrypoints for all other perspectives as wel
145+ const alertActionContextName = `alert-detail-toolbar-actions${
146+ perspective === 'admin' ? '' : '-' + perspective
147+ } `;
148+ const alertActionContext = { } ;
149+ alertActionContext [ alertActionContextName ] = { alert } ;
150+
143151 return (
144152 < >
145153 < Helmet >
@@ -200,7 +208,7 @@ const AlertsDetailsPage_: React.FC = () => {
200208 < Title headingLevel = "h2" > { t ( 'Alert details' ) } </ Title >
201209 </ ToolbarItem >
202210 < ToolbarGroup align = { { default : 'alignEnd' } } >
203- < ActionServiceProvider context = { { 'alert-detail-toolbar-actions' : { alert } } } >
211+ < ActionServiceProvider context = { alertActionContext } >
204212 { ( { actions, loaded } ) =>
205213 loaded
206214 ? actions . map ( ( action ) => {
@@ -219,7 +227,6 @@ const AlertsDetailsPage_: React.FC = () => {
219227 </ ToolbarItem >
220228 ) ;
221229 }
222-
223230 return null ;
224231 } )
225232 : null
You can’t perform that action at this time.
0 commit comments