folders: change the front end route for browsing folders

Change the front end route for folders to /dashboards/f/<uid>/<slug of folder title>.
Use new route for deleting dashboard/folder by uid.
Retrieve dashboard/folder by uid when moving or deleting dashboards/folders.
This commit is contained in:
Marcus Efraimsson
2018-01-31 17:15:00 +01:00
parent b23560ed5a
commit 92a0171a9b
14 changed files with 56 additions and 55 deletions

View File

@@ -91,10 +91,10 @@ export class ManageDashboardsCtrl {
for (const section of this.sections) {
if (section.checked && section.id !== 0) {
selectedDashboards.folders.push(section.slug);
selectedDashboards.folders.push(section.uid);
} else {
const selected = _.filter(section.items, { checked: true });
selectedDashboards.dashboards.push(..._.map(selected, 'slug'));
selectedDashboards.dashboards.push(..._.map(selected, 'uid'));
}
}
@@ -185,7 +185,7 @@ export class ManageDashboardsCtrl {
for (const section of this.sections) {
const selected = _.filter(section.items, { checked: true });
selectedDashboards.push(..._.map(selected, 'slug'));
selectedDashboards.push(..._.map(selected, 'uid'));
}
return selectedDashboards;