Frontend changes for library panels feature (#30653)

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
kay delaney
2021-02-25 10:26:28 +00:00
committed by GitHub
parent 0bb4cbdb68
commit 47d2a8085b
27 changed files with 1326 additions and 362 deletions

View File

@@ -9,12 +9,13 @@ import { updateLocation } from 'app/core/reducers/location';
import { DashboardModel } from 'app/features/dashboard/state';
import { saveDashboard as saveDashboardApiCall } from 'app/features/manage-dashboards/state/actions';
const saveDashboard = async (saveModel: any, options: SaveDashboardOptions, dashboard: DashboardModel) => {
const saveDashboard = (saveModel: any, options: SaveDashboardOptions, dashboard: DashboardModel) => {
let folderId = options.folderId;
if (folderId === undefined) {
folderId = dashboard.meta.folderId || saveModel.folderId;
folderId = dashboard.meta.folderId ?? saveModel.folderId;
}
return await saveDashboardApiCall({ ...options, folderId, dashboard: saveModel });
return saveDashboardApiCall({ ...options, folderId, dashboard: saveModel });
};
export const useDashboardSave = (dashboard: DashboardModel) => {