mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
NestedFolders: Rename 'General' to 'Dashboards' in FolderPicker (#67113)
This commit is contained in:
parent
93348c2a17
commit
bb66f14c1d
@ -5,6 +5,7 @@ import { useAsync } from 'react-use';
|
|||||||
|
|
||||||
import { AppEvents, SelectableValue, GrafanaTheme2 } from '@grafana/data';
|
import { AppEvents, SelectableValue, GrafanaTheme2 } from '@grafana/data';
|
||||||
import { selectors } from '@grafana/e2e-selectors';
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
|
import { config } from '@grafana/runtime';
|
||||||
import { useStyles2, ActionMeta, Input, InputActionMeta, AsyncVirtualizedSelect } from '@grafana/ui';
|
import { useStyles2, ActionMeta, Input, InputActionMeta, AsyncVirtualizedSelect } from '@grafana/ui';
|
||||||
import appEvents from 'app/core/app_events';
|
import appEvents from 'app/core/app_events';
|
||||||
import { t } from 'app/core/internationalization';
|
import { t } from 'app/core/internationalization';
|
||||||
@ -70,7 +71,7 @@ export function FolderPicker(props: Props) {
|
|||||||
initialFolderUid,
|
initialFolderUid,
|
||||||
initialTitle = '',
|
initialTitle = '',
|
||||||
permissionLevel = PermissionLevelString.Edit,
|
permissionLevel = PermissionLevelString.Edit,
|
||||||
rootName = 'General',
|
rootName: rootNameProp,
|
||||||
showRoot = true,
|
showRoot = true,
|
||||||
skipInitialLoad,
|
skipInitialLoad,
|
||||||
searchQueryType,
|
searchQueryType,
|
||||||
@ -78,6 +79,8 @@ export function FolderPicker(props: Props) {
|
|||||||
folderWarning,
|
folderWarning,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
|
const rootName = rootNameProp ?? config.featureToggles.nestedFolders ? 'Dashboards' : 'General';
|
||||||
|
|
||||||
const [folder, setFolder] = useState<SelectedFolder | null>(null);
|
const [folder, setFolder] = useState<SelectedFolder | null>(null);
|
||||||
const [isCreatingNew, setIsCreatingNew] = useState(false);
|
const [isCreatingNew, setIsCreatingNew] = useState(false);
|
||||||
const [inputValue, setInputValue] = useState('');
|
const [inputValue, setInputValue] = useState('');
|
||||||
|
Loading…
Reference in New Issue
Block a user