Skip to content

Commit d36ef85

Browse files
committed
remove unused code
1 parent a799dea commit d36ef85

2 files changed

Lines changed: 0 additions & 52 deletions

File tree

x-pack/plugins/observability/public/hooks/slo/use_fetch_index_pattern_fields.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { buildSlo } from '../../data/slo/slo';
1616
import { useCapabilities } from '../../hooks/slo/use_capabilities';
1717
import { useCreateSlo } from '../../hooks/slo/use_create_slo';
1818
import { useFetchApmSuggestions } from '../../hooks/slo/use_fetch_apm_suggestions';
19-
import { useFetchIndexPatternFields } from '../../hooks/slo/use_fetch_index_pattern_fields';
2019
import { useFetchSloDetails } from '../../hooks/slo/use_fetch_slo_details';
2120
import { useUpdateSlo } from '../../hooks/slo/use_update_slo';
2221
import { useFetchDataViews } from '../../hooks/use_fetch_data_views';
@@ -43,7 +42,6 @@ jest.mock('../../hooks/slo/use_create_slo');
4342
jest.mock('../../hooks/slo/use_update_slo');
4443
jest.mock('../../hooks/slo/use_fetch_apm_suggestions');
4544
jest.mock('../../hooks/slo/use_capabilities');
46-
jest.mock('../../hooks/slo/use_fetch_index_pattern_fields');
4745

4846
const mockUseKibanaReturnValue = kibanaStartMock.startContract();
4947

@@ -58,7 +56,6 @@ const useFetchSloMock = useFetchSloDetails as jest.Mock;
5856
const useCreateSloMock = useCreateSlo as jest.Mock;
5957
const useUpdateSloMock = useUpdateSlo as jest.Mock;
6058
const useFetchApmSuggestionsMock = useFetchApmSuggestions as jest.Mock;
61-
const useFetchIndexPatternFieldsMock = useFetchIndexPatternFields as jest.Mock;
6259
const useCapabilitiesMock = useCapabilities as jest.Mock;
6360

6461
const mockAddSuccess = jest.fn();
@@ -159,13 +156,6 @@ describe('SLO Edit Page', () => {
159156
isLoading: false,
160157
data: ['some-index', 'index-2'],
161158
});
162-
useFetchIndexPatternFieldsMock.mockReturnValue({
163-
isLoading: false,
164-
data: [
165-
{ name: 'field', type: 'date', aggregatable: false, searchable: false },
166-
{ name: 'field_text', type: 'text', aggregatable: true, searchable: true },
167-
],
168-
});
169159

170160
useCreateSloMock.mockReturnValue({
171161
isLoading: false,

0 commit comments

Comments
 (0)