mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
folders: changes needed due to merge
This commit is contained in:
@@ -34,7 +34,7 @@ export class ManageDashboardsCtrl {
|
||||
|
||||
// used when managing dashboards for a specific folder
|
||||
folderId?: number;
|
||||
folderSlug?: string;
|
||||
folderUid?: string;
|
||||
|
||||
// if user can add new folders and/or add new dashboards
|
||||
canSave: boolean;
|
||||
@@ -74,11 +74,11 @@ export class ManageDashboardsCtrl {
|
||||
return this.initDashboardList(result);
|
||||
})
|
||||
.then(() => {
|
||||
if (!this.folderSlug) {
|
||||
if (!this.folderUid) {
|
||||
return;
|
||||
}
|
||||
|
||||
return this.backendSrv.getDashboard('db', this.folderSlug).then(dash => {
|
||||
return this.backendSrv.getDashboardByUid(this.folderUid).then(dash => {
|
||||
this.canSave = dash.meta.canSave;
|
||||
});
|
||||
});
|
||||
@@ -179,8 +179,8 @@ export class ManageDashboardsCtrl {
|
||||
});
|
||||
}
|
||||
|
||||
private deleteFoldersAndDashboards(slugs) {
|
||||
this.backendSrv.deleteDashboards(slugs).then(result => {
|
||||
private deleteFoldersAndDashboards(uids) {
|
||||
this.backendSrv.deleteDashboards(uids).then(result => {
|
||||
const folders = _.filter(result, dash => dash.meta.isFolder);
|
||||
const folderCount = folders.length;
|
||||
const dashboards = _.filter(result, dash => !dash.meta.isFolder);
|
||||
@@ -334,7 +334,7 @@ export function manageDashboardsDirective() {
|
||||
controllerAs: 'ctrl',
|
||||
scope: {
|
||||
folderId: '=',
|
||||
folderSlug: '=',
|
||||
folderUid: '=',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ export class BackendSrv {
|
||||
});
|
||||
}
|
||||
|
||||
updateDashboardFolder(dash, options) {
|
||||
saveFolder(dash, options) {
|
||||
options = options || {};
|
||||
|
||||
return this.post('/api/dashboards/db/', {
|
||||
|
||||
Reference in New Issue
Block a user