mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashfolder: refactor breadcrumbs in PageHeader
Combines title and breadcrumbs in PageHeader instead of having to set title to empty and add it as a breadcrumb.
This commit is contained in:
@@ -25,11 +25,13 @@ export const FolderStore = types
|
||||
});
|
||||
return res;
|
||||
}),
|
||||
|
||||
setTitle: function(originalTitle: string, title: string) {
|
||||
self.folder.title = title;
|
||||
self.folder.hasChanged = originalTitle.toLowerCase() !== title.trim().toLowerCase() && title.trim().length > 0;
|
||||
},
|
||||
saveDashboard: flow(function* saveDashboard(dashboard: any, options: any) {
|
||||
|
||||
saveFolder: flow(function* saveFolder(dashboard: any, options: any) {
|
||||
const backendSrv = getEnv(self).backendSrv;
|
||||
dashboard.title = self.folder.title.trim();
|
||||
|
||||
@@ -37,6 +39,7 @@ export const FolderStore = types
|
||||
self.folder.slug = res.slug;
|
||||
return `dashboards/folder/${self.folder.id}/${res.slug}/settings`;
|
||||
}),
|
||||
|
||||
deleteFolder: flow(function* deleteFolder() {
|
||||
const backendSrv = getEnv(self).backendSrv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user