Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SIEM migrations][Onboarding] Add support for topics in the onboarding page #201411

Merged
merged 11 commits into from
Nov 29, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,7 @@ export type UpsertRuleMigrationResourcesRequestParamsInput = z.input<
export type UpsertRuleMigrationResourcesRequestBody = z.infer<
typeof UpsertRuleMigrationResourcesRequestBody
>;
export const UpsertRuleMigrationResourcesRequestBody = z.array(
RuleMigrationResourceData.merge(
z.object({
/**
* The rule resource migration id
*/
id: NonEmptyString,
})
)
);
export const UpsertRuleMigrationResourcesRequestBody = z.array(RuleMigrationResourceData);
export type UpsertRuleMigrationResourcesRequestBodyInput = z.input<
typeof UpsertRuleMigrationResourcesRequestBody
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,7 @@ paths:
schema:
type: array
items:
allOf:
- $ref: '../../rule_migration.schema.yaml#/components/schemas/RuleMigrationResourceData'
- type: object
required:
- id
properties:
id:
description: The rule resource migration id
$ref: '../../common.schema.yaml#/components/schemas/NonEmptyString'
$ref: '../../rule_migration.schema.yaml#/components/schemas/RuleMigrationResourceData'
responses:
200:
description: Indicates migration resources have been created or updated correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@
export const mockReportCardOpen = jest.fn();
export const mockReportCardComplete = jest.fn();
export const mockReportCardLinkClicked = jest.fn();

export const telemetry = {
reportCardOpen: mockReportCardOpen,
reportCardComplete: mockReportCardComplete,
reportCardLinkClicked: mockReportCardLinkClicked,
};
export const mockTelemetry = jest.fn(() => telemetry);

export const onboardingContext = {
spaceId: 'default',
telemetry: mockTelemetry(),
config: new Map(),
};
export const mockOnboardingContext = jest.fn(() => onboardingContext);
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,8 @@
*/

import type { OnboardingContextValue } from '../onboarding_context';
import {
mockReportCardOpen,
mockReportCardComplete,
mockReportCardLinkClicked,
} from './onboarding_context_mocks';
import { mockOnboardingContext } from './mocks';

export const useOnboardingContext = (): OnboardingContextValue => {
return {
spaceId: 'default',
reportCardOpen: mockReportCardOpen,
reportCardComplete: mockReportCardComplete,
reportCardLinkClicked: mockReportCardLinkClicked,
};
return mockOnboardingContext();
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* 2.0.
*/

import { useKibana } from '../../common/lib/kibana/kibana_react';
import { useKibana } from '../../../common/lib/kibana/kibana_react';

export const useOnboardingService = () => useKibana().services.onboarding;
Loading