dashboards: add new default frontend route for rendering a dashboard panel

New default route /d-solo/<uid>/<slug of dashboard title> where dashboard
panel are rendered by unique identifier and panel identifier.
If old route /dashboard-solo/db/<slug of dashboard tile> are used,
try to lookup dashboard by slug and redirect to new default route.
Change url logic for sharing a panel so that the new default route
for rendering a dashboard panel are used.
 #7883
This commit is contained in:
Marcus Efraimsson
2018-01-31 11:01:23 +01:00
parent 7734df1d18
commit 3efb3d8efa
4 changed files with 22 additions and 9 deletions
+6
View File
@@ -26,6 +26,12 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
reloadOnSearch: false,
pageClass: 'page-dashboard',
})
.when('/d-solo/:uid/:slug', {
templateUrl: 'public/app/features/panel/partials/soloPanel.html',
controller: 'SoloPanelCtrl',
reloadOnSearch: false,
pageClass: 'page-dashboard',
})
.when('/dashboard-solo/:type/:slug', {
templateUrl: 'public/app/features/panel/partials/soloPanel.html',
controller: 'SoloPanelCtrl',