dashboards: make scripted dashboards work using the old legacy urls

Scripted dashboards are still requested from /dashboard/script/scripted.js
#7883
This commit is contained in:
Marcus Efraimsson
2018-01-31 14:07:49 +01:00
parent a99331cdb9
commit 57edf89033
5 changed files with 22 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ export class LoadDashboardCtrl {
}
// if no uid, redirect to new route based on slug
if (!$routeParams.uid) {
if (!($routeParams.type === 'script' || $routeParams.type === 'snapshot') && !$routeParams.uid) {
backendSrv.get(`/api/dashboards/db/${$routeParams.slug}`).then(res => {
if (res) {
$location.path(res.meta.url);