Commit 47014ddb by Marcus Efraimsson

dashfolders: Do not allow loading a folder as a dashboard

parent 70b01658
......@@ -43,6 +43,13 @@ function (angular, moment, _, $, kbn, dateMath, impressionSrv) {
});
} else {
promise = backendSrv.getDashboard($routeParams.type, $routeParams.slug)
.then(result => {
if (result.meta.isFolder) {
$rootScope.appEvent("alert-error", ['Dashboard not found']);
throw new Error("Dashboard not found");
}
return result;
})
.catch(function() {
return self._dashboardLoadFailed("Not found");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment