mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Frontend changes for library panels feature (#30653)
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user