diff --git a/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectSimulationResult.jsx b/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectSimulationResult.jsx index a42af0170f22e..d81dd13a92164 100644 --- a/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectSimulationResult.jsx +++ b/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectSimulationResult.jsx @@ -184,7 +184,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { const { enabled, configured } = useAI(); const isSimulatedEmailsAvailable = enabled && configured && isEnterpriseEdition; const [simulationType, setSimulationType] = useState('technical'); - const [platforms, setPlatforms] = useState(['Windows']); + const [platforms, setPlatforms] = useState([{ label: 'Windows', value: 'Windows' }]); const [architecture, setArchitecture] = useState('x86_64'); const [selection, setSelection] = useState('random'); const [interval, setInterval] = useState(2); @@ -242,6 +242,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { const handleGenerate = () => { setIsSubmitting(true); setOpen(false); + const selectedPlatforms = platforms.map((option) => option.value); switch (type) { case 'container': commitMutationGenerateContainer({ @@ -251,7 +252,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { interval, selection, simulationType, - platforms, + platforms: selectedPlatforms, architecture, }, filters, @@ -276,7 +277,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { interval, selection, simulationType, - platforms, + platforms: selectedPlatforms, architecture, }, filters, @@ -301,7 +302,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { interval, selection, simulationType, - platforms, + platforms: selectedPlatforms, architecture, }, filters, @@ -405,7 +406,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { }} multiple options={platformOptions} - onChange={(_event, newValue) => setPlatforms(newValue.map((option) => option.value || option))} + onChange={(_event, newValue) => setPlatforms(newValue)} renderOption={(props, option) => (
  • {option.label ?? ''}