mirror of
https://github.com/grafana/grafana.git
synced 2026-08-13 06:34:55 -05:00
Chore: remove team folders toggle (#126551)
This commit is contained in:
@@ -54,6 +54,13 @@ jest.mock('../../../../types/store', () => {
|
||||
};
|
||||
});
|
||||
|
||||
// The folder mutations refresh the team folders tree as a side effect. listTeamFolders would error
|
||||
// here because this test mocks the app dispatch, so stub it out.
|
||||
jest.mock('app/features/browse-dashboards/api/services', () => ({
|
||||
...jest.requireActual('app/features/browse-dashboards/api/services'),
|
||||
listTeamFolders: jest.fn(async () => []),
|
||||
}));
|
||||
|
||||
setBackendSrv(backendSrv);
|
||||
setupMockServer();
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { generatedAPI } from '@grafana/api-clients/rtkq/folder/v1beta1';
|
||||
import { invalidateQuotaUsage } from '@grafana/api-clients/rtkq/quotas/v0alpha1';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { PAGE_SIZE } from 'app/features/browse-dashboards/api/constants';
|
||||
import { TEAM_FOLDERS_UID } from 'app/features/search/constants';
|
||||
import { dispatch } from 'app/store/store';
|
||||
@@ -9,10 +8,6 @@ import { type DescendantCount } from 'app/types/folders';
|
||||
import { getParsedCounts } from './utils';
|
||||
|
||||
async function refreshTeamFolders() {
|
||||
if (!config.featureToggles.teamFolders) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Lazy-imported to avoid a circular dependency: state/actions transitively imports
|
||||
// browseDashboardsAPI, which imports this module via folder/v1beta1/hooks.
|
||||
const { refetchChildren } = await import('app/features/browse-dashboards/state/actions');
|
||||
|
||||
Reference in New Issue
Block a user