mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 04:04:00 -06:00
Storage: fix creating a new dashboard with dashboardsFromStorage feature flag enabled
This commit is contained in:
parent
3f0636083d
commit
5c0bf2ba39
@ -19,7 +19,7 @@ import { useDashboardSave } from './useDashboardSave';
|
|||||||
export const SaveDashboardDrawer = ({ dashboard, onDismiss, onSaveSuccess, isCopy }: SaveDashboardModalProps) => {
|
export const SaveDashboardDrawer = ({ dashboard, onDismiss, onSaveSuccess, isCopy }: SaveDashboardModalProps) => {
|
||||||
const [options, setOptions] = useState<SaveDashboardOptions>({});
|
const [options, setOptions] = useState<SaveDashboardOptions>({});
|
||||||
|
|
||||||
const isFromStorage = config.featureToggles.dashboardsFromStorage && dashboard.uid.indexOf('/') > 0;
|
const isFromStorage = config.featureToggles.dashboardsFromStorage && dashboard.uid?.indexOf('/') > 0;
|
||||||
const isProvisioned = dashboard.meta.provisioned && !isFromStorage;
|
const isProvisioned = dashboard.meta.provisioned && !isFromStorage;
|
||||||
const isNew = dashboard.version === 0 && !isFromStorage;
|
const isNew = dashboard.version === 0 && !isFromStorage;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user