diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts b/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts index 9ac53f9be609f..cfd8313338c1a 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts @@ -42,6 +42,10 @@ export const generatePolicy = (): PolicyConfig => { mac: { events: { process: true, + // TODO, is this right? + file: true, + // TODO, is this right? + network: true, }, malware: { mode: ProtectionModes.detect, @@ -67,6 +71,10 @@ export const generatePolicy = (): PolicyConfig => { linux: { events: { process: true, + // TODO, is this right? + file: true, + // TODO, is this right? + network: true, }, logging: { stdout: 'debug', diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts index 9d901232d66e5..5caab1450b2b6 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts @@ -195,7 +195,6 @@ export interface UIPolicyConfig { mac: MacPolicyConfig; linux: LinuxPolicyConfig; } -export type nerds = keyof UIPolicyConfig[t]['events']; /** OS used in Policy */ export enum OS { diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx index abb1dd53a290b..cd46af222d076 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx @@ -10,7 +10,7 @@ import { useDispatch } from 'react-redux'; import { usePolicyDetailsSelector } from '../../policy_hooks'; import { policyConfig, windowsEventing } from '../../../../store/policy_details/selectors'; import { PolicyDetailsAction } from '../../../../store/policy_details'; -import { OS, UIPolicyConfig, nerds } from '../../../../types'; +import { UIPolicyConfig } from '../../../../types'; import { clone } from '../../../../models/policy_details_config'; export const EventingCheckbox = React.memo(function({ @@ -22,7 +22,7 @@ export const EventingCheckbox = React.memo(function; + protectionField: keyof UIPolicyConfig[T]['events']; }) { const policyDetailsConfig = usePolicyDetailsSelector(policyConfig); const eventing = usePolicyDetailsSelector(windowsEventing); @@ -31,7 +31,7 @@ export const EventingCheckbox = React.memo(function) => { if (policyDetailsConfig) { - const newPayload = clone(policyDetailsConfig); + const newPayload: UIPolicyConfig = clone(policyDetailsConfig); newPayload[os].events[protectionField] = event.target.checked; dispatch({