Invoking "alert-success" toaster from Text html Panel

Dear all
I created a Text “html” Panel with a button and use it as a control panel to invoke a REST API call.
I’d like to the Grafana toaster “alert-success” to display a status info (right now I’m using aller(‘my allert’) function which looks not so nice :face_with_raised_eyebrow:).

I saw in the plugin guide that this toaster can be used in plugins by calling

appEvents.emit('alert-success', ['Test notification sent', '']);

How can I invoke a notification by a javascript call out of the Text “html” Panel?

1 Like

var msg = angular.element(‘grafana-app’).injector().get(‘utilSrv’).$rootScope.appEvent(‘alert-success’, [‘Test notification sent’, ‘’]);