diff --git a/public/app/core/components/FolderFilter/FolderFilter.tsx b/public/app/core/components/FolderFilter/FolderFilter.tsx index b23e6765af2..ee1379085fc 100644 --- a/public/app/core/components/FolderFilter/FolderFilter.tsx +++ b/public/app/core/components/FolderFilter/FolderFilter.tsx @@ -74,8 +74,8 @@ async function getFoldersAsOptions( // FIXME: stop using id from search and use UID instead const searchHits = await getBackendSrv().search(params); const options = searchHits.map((d) => ({ label: d.title, value: { uid: d.uid, title: d.title } })); - if (!searchString || 'general'.includes(searchString.toLowerCase())) { - options.unshift({ label: 'General', value: { uid: 'general', title: 'General' } }); + if (!searchString || 'dashboards'.includes(searchString.toLowerCase())) { + options.unshift({ label: 'Dashboards', value: { uid: 'general', title: 'Dashboards' } }); } setLoading(false); diff --git a/public/app/core/components/Select/DashboardPicker.tsx b/public/app/core/components/Select/DashboardPicker.tsx index 7f89920b43a..047e0e59b14 100644 --- a/public/app/core/components/Select/DashboardPicker.tsx +++ b/public/app/core/components/Select/DashboardPicker.tsx @@ -16,7 +16,7 @@ interface Props extends Omit, 'value' | 'on export type DashboardPickerDTO = Pick & Pick; -const formatLabel = (folderTitle = 'General', dashboardTitle: string) => `${folderTitle}/${dashboardTitle}`; +const formatLabel = (folderTitle = 'Dashboards', dashboardTitle: string) => `${folderTitle}/${dashboardTitle}`; async function findDashboards(query = '') { return backendSrv.search({ type: 'dash-db', query, limit: 100 }).then((result: DashboardSearchItem[]) => { diff --git a/public/app/core/components/Select/ReadonlyFolderPicker/ReadonlyFolderPicker.test.tsx b/public/app/core/components/Select/ReadonlyFolderPicker/ReadonlyFolderPicker.test.tsx index 55b268e19f9..9ccd2f3468f 100644 --- a/public/app/core/components/Select/ReadonlyFolderPicker/ReadonlyFolderPicker.test.tsx +++ b/public/app/core/components/Select/ReadonlyFolderPicker/ReadonlyFolderPicker.test.tsx @@ -93,7 +93,7 @@ describe('ReadonlyFolderPicker', () => { it('then the first folder in all folders should be selected', async () => { const { selectors } = await getTestContext({}, FOLDERS); - expect(await within(selectors.container.get()).findByText('General')).toBeInTheDocument(); + expect(await within(selectors.container.get()).findByText('Dashboards')).toBeInTheDocument(); }); describe('and initialFolderId is passed in props and it matches an existing folder', () => { @@ -130,7 +130,7 @@ describe('ReadonlyFolderPicker', () => { undefined ); - expect(await within(selectors.container.get()).findByText('General')).toBeInTheDocument(); + expect(await within(selectors.container.get()).findByText('Dashboards')).toBeInTheDocument(); expect(getFolderAsOptionSpy).toHaveBeenCalledTimes(1); expect(getFolderAsOptionSpy).toHaveBeenCalledWith(50000); }); diff --git a/public/app/core/components/Select/ReadonlyFolderPicker/api.test.ts b/public/app/core/components/Select/ReadonlyFolderPicker/api.test.ts index 77ed9b7a26d..57259113c62 100644 --- a/public/app/core/components/Select/ReadonlyFolderPicker/api.test.ts +++ b/public/app/core/components/Select/ReadonlyFolderPicker/api.test.ts @@ -37,7 +37,7 @@ describe('getFoldersAsOptions', () => { const result = await getFoldersAsOptions(args); expect(result).toEqual([ { value: { id: undefined, title: 'All' }, label: 'All' }, - { value: { id: 0, title: 'General' }, label: 'General' }, + { value: { id: 0, title: 'Dashboards' }, label: 'Dashboards' }, { value: { id: 1, title: 'Folder 1' }, label: 'Folder 1' }, ]); }); @@ -56,13 +56,13 @@ describe('getFoldersAsOptions', () => { describe('and extra folders are passed and extra folders contain query', () => { it('then correct extra folders should all appear first in the result', async () => { - const args = { query: 'er', extraFolders: [ALL_FOLDER, GENERAL_FOLDER] }; + const args = { query: 'o', extraFolders: [ALL_FOLDER, GENERAL_FOLDER] }; const searchHits = [{ id: 1, title: 'Folder 1' }] as DashboardSearchHit[]; getTestContext(searchHits); const result = await getFoldersAsOptions(args); expect(result).toEqual([ - { value: { id: 0, title: 'General' }, label: 'General' }, + { value: { id: 0, title: 'Dashboards' }, label: 'Dashboards' }, { value: { id: 1, title: 'Folder 1' }, label: 'Folder 1' }, ]); }); diff --git a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx index 765ad9ade06..bbba23164d3 100644 --- a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx @@ -124,7 +124,7 @@ export const DashboardPicker = ({ dashboardUid, panelId, isOpen, onChange, onDis >
{dashboard.title}
- {dashboard.folderTitle ?? 'General'} + {dashboard.folderTitle ?? 'Dashboards'}
); @@ -179,7 +179,7 @@ export const DashboardPicker = ({ dashboardUid, panelId, isOpen, onChange, onDis
Dashboard: {dashboardModel.title} ({dashboardModel.uid}) in folder{' '} - {dashboardModel.meta?.folderTitle ?? 'General'} + {dashboardModel.meta?.folderTitle ?? 'Dashboards'}
{currentPanel && (
diff --git a/public/app/features/browse-dashboards/components/BrowseActions/MoveModal.test.tsx b/public/app/features/browse-dashboards/components/BrowseActions/MoveModal.test.tsx index 0691ad44206..3c049270947 100644 --- a/public/app/features/browse-dashboards/components/BrowseActions/MoveModal.test.tsx +++ b/public/app/features/browse-dashboards/components/BrowseActions/MoveModal.test.tsx @@ -20,7 +20,7 @@ describe('browse-dashboards MoveModal', () => { const mockOnDismiss = jest.fn(); const mockOnConfirm = jest.fn(); const mockFolders = [ - { title: 'General', uid: '' } as DashboardSearchHit, + { title: 'Dashboards', uid: '' } as DashboardSearchHit, { title: 'Folder 1', uid: 'wfTJJL5Wz' } as DashboardSearchHit, ]; let props: Props; diff --git a/public/app/features/dashboard-scene/scene/LibraryVizPanel.test.ts b/public/app/features/dashboard-scene/scene/LibraryVizPanel.test.ts index 198c88c8709..5bb05548356 100644 --- a/public/app/features/dashboard-scene/scene/LibraryVizPanel.test.ts +++ b/public/app/features/dashboard-scene/scene/LibraryVizPanel.test.ts @@ -112,7 +112,7 @@ function setUpApiMock( }, version: 6, meta: { - folderName: 'General', + folderName: 'Dashboards', folderUid: '', connectedDashboards: 1, created: '2024-02-15T15:26:46Z', diff --git a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx index 15d0a9699fa..44ddccac466 100644 --- a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx +++ b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx @@ -31,7 +31,7 @@ jest.mock('debounce-promise', () => { const debounce = () => { const debounced = () => Promise.resolve([ - { label: 'General', value: { uid: '', title: 'General' } }, + { label: 'Dashboards', value: { uid: '', title: 'Dashboards' } }, { label: 'Folder1', value: { id: 'xMsQdBfWz', title: 'Folder1' } }, { label: 'Folder2', value: { id: 'wfTJJL5Wz', title: 'Folder2' } }, ]); @@ -207,7 +207,7 @@ describe('LibraryPanelsSearch', () => { type: 'timeseries', version: 1, meta: { - folderName: 'General', + folderName: 'Dashboards', folderUid: '', connectedDashboards: 0, created: '2021-01-01 12:00:00', @@ -259,7 +259,7 @@ describe('LibraryPanelsSearch', () => { type: 'timeseries', version: 1, meta: { - folderName: 'General', + folderName: 'Dashboards', folderUid: '', connectedDashboards: 0, created: '2021-01-01 12:00:00', @@ -300,7 +300,7 @@ describe('LibraryPanelsSearch', () => { type: 'timeseries', version: 1, meta: { - folderName: 'General', + folderName: 'Dashboards', folderUid: '', connectedDashboards: 0, created: '2021-01-01 12:00:00', @@ -339,7 +339,7 @@ describe('LibraryPanelsSearch', () => { type: 'timeseries', version: 1, meta: { - folderName: 'General', + folderName: 'Dashboards', folderUid: '', connectedDashboards: 0, created: '2021-01-01 12:00:00', diff --git a/public/app/features/library-panels/components/LibraryPanelsView/reducer.test.ts b/public/app/features/library-panels/components/LibraryPanelsView/reducer.test.ts index ec96cc842d2..cf63a74ad90 100644 --- a/public/app/features/library-panels/components/LibraryPanelsView/reducer.test.ts +++ b/public/app/features/library-panels/components/LibraryPanelsView/reducer.test.ts @@ -108,7 +108,7 @@ function mockLibraryPanel({ name = 'Test Panel', model = { type: 'text', title: 'Test Panel' } as Panel, meta = { - folderName: 'General', + folderName: 'Dashboards', folderUid: '', connectedDashboards: 0, created: '2021-01-01T00:00:00', diff --git a/public/app/features/manage-dashboards/components/ImportDashboardLibraryPanelsList.tsx b/public/app/features/manage-dashboards/components/ImportDashboardLibraryPanelsList.tsx index 3228e8107ff..f48b12eca14 100644 --- a/public/app/features/manage-dashboards/components/ImportDashboardLibraryPanelsList.tsx +++ b/public/app/features/manage-dashboards/components/ImportDashboardLibraryPanelsList.tsx @@ -35,7 +35,7 @@ export function ImportDashboardLibraryPanelsList({ const libraryPanelIndex = `elements[${index}]`; const libraryPanel = input.state === LibraryPanelInputState.New - ? { ...input.model, meta: { ...input.model.meta, folderName: folderName ?? 'General' } } + ? { ...input.model, meta: { ...input.model.meta, folderName: folderName ?? 'Dashboards' } } : { ...input.model }; return ( diff --git a/public/app/features/search/constants.ts b/public/app/features/search/constants.ts index 8b66939e15d..89adc4bb82f 100644 --- a/public/app/features/search/constants.ts +++ b/public/app/features/search/constants.ts @@ -9,7 +9,7 @@ export const SECTION_STORAGE_KEY = 'search.sections'; export const SEARCH_EXPANDED_FOLDER_STORAGE_KEY = 'grafana.search.expanded-folder'; export const GENERAL_FOLDER_ID = 0; export const GENERAL_FOLDER_UID = 'general'; -export const GENERAL_FOLDER_TITLE = 'General'; +export const GENERAL_FOLDER_TITLE = 'Dashboards'; export const SEARCH_PANELS_LOCAL_STORAGE_KEY = 'grafana.search.include.panels'; export const SEARCH_SELECTED_LAYOUT = 'grafana.search.layout'; export const SEARCH_SELECTED_SORT = 'grafana.search.sort'; diff --git a/public/app/features/search/page/components/columns.tsx b/public/app/features/search/page/components/columns.tsx index 912b02fe029..61d3d0beb8f 100644 --- a/public/app/features/search/page/components/columns.tsx +++ b/public/app/features/search/page/components/columns.tsx @@ -173,7 +173,7 @@ export const generateColumns = ( {parts.map((p) => { let info = meta.locationInfo[p]; if (!info && p === 'general') { - info = { kind: 'folder', url: '/dashboards', name: 'General' }; + info = { kind: 'folder', url: '/dashboards', name: 'Dashboards' }; } return info ? ( diff --git a/public/app/features/search/service/sql.ts b/public/app/features/search/service/sql.ts index c5d9d7ce49d..15f4bff23b8 100644 --- a/public/app/features/search/service/sql.ts +++ b/public/app/features/search/service/sql.ts @@ -35,7 +35,7 @@ export class SQLSearcher implements GrafanaSearcher { locationInfo: Record = { general: { kind: 'folder', - name: 'General', + name: 'Dashboards', url: '/dashboards', }, }; // share location info with everyone