Show Custom error - Scripted Dashboard


#1

Hi,

Is it possible to show custom error messages from scripted dashboard.

$.ajax({
	method: 'GET',
	url: /
}).done(function (result) {
	//do something useful
   callback(dashboard);
}).fail(function (error) {
	**Show error on dashboard if code reaches here**
});

Thanks
Rishi


#2

got it after a little bit more searching.

services.dashboardSrv.backendSrv.alertSrv.set(“Error”, error.responseText, “Error”);