diff --git a/opencti-platform/opencti-front/src/components/FieldOrEmpty.tsx b/opencti-platform/opencti-front/src/components/FieldOrEmpty.tsx index 632009c9481f..1dd899f96659 100644 --- a/opencti-platform/opencti-front/src/components/FieldOrEmpty.tsx +++ b/opencti-platform/opencti-front/src/components/FieldOrEmpty.tsx @@ -6,7 +6,7 @@ interface FieldOrEmptyProps { children: React.ReactNode; } -const FieldOrEmpty = ({ source, children }: FieldOrEmptyProps) => { +const FieldOrEmpty = ({ source, children }: FieldOrEmptyProps) => { return <>{isNotEmptyField(source) ? children : '-'}; // render the children if source is defined }; export default FieldOrEmpty; diff --git a/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx b/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx index 0cd3e0f90e58..c4c84bbc9f9c 100644 --- a/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx +++ b/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx @@ -270,6 +270,7 @@ const StixCyberObservableCreation = ({ inputValue, paginationKey, paginationOptions, + controlledDialStyles = {}, defaultCreatedBy = null, defaultMarkingDefinitions = null, isFromBulkRelation, @@ -901,6 +902,7 @@ const StixCyberObservableCreation = ({ entityType={type ?? 'Observable'} onOpen={handleOpen} onClose={() => {}} + style={controlledDialStyles} /> :
- - {threatActorGroup.locations.edges.length === 0 && ( - - - - )} - {threatActorGroup.locations.edges.map((locationEdge) => { - const { types } = locationEdge; - const location = locationEdge.node; - const link = resolveLink(location.entity_type); - const flag = location.entity_type === 'Country' + + + {threatActorGroup.locations.edges.map((locationEdge) => { + const { types } = locationEdge; + const location = locationEdge.node; + const link = resolveLink(location.entity_type); + const flag = location.entity_type === 'Country' && R.head( (location.x_opencti_aliases ?? []).filter( (n) => n?.length === 2, ), ); - return ( - - + return ( + - {flag ? ( - {location.name} - ) : ( - - )} + + {flag ? ( + {location.name} + ) : ( + + )} + - - - {types.includes('manual') ? ( - - - this.removeLocation(locationEdge)} - size="large" - > - - - - - ) : } - - ); - })} - + + {types.includes('manual') ? ( + + + this.removeLocation(locationEdge)} + size="large" + > + + + + + ) : } + + ); + })} + + ); } diff --git a/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/AddIndividualsThreatActorIndividual.tsx b/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/AddIndividualsThreatActorIndividual.tsx index 77f3ad2c63b2..d61fe4c1d24c 100644 --- a/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/AddIndividualsThreatActorIndividual.tsx +++ b/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/AddIndividualsThreatActorIndividual.tsx @@ -35,25 +35,15 @@ AddIndividualsThreatActorIndividualProps count: 50, }, ); - const getRelationships = () => { - const relations = []; - for (const { node } of threatActorIndividual.stixCoreRelationships?.edges ?? []) { - const { relationship_type } = node ?? {}; - if (relationship_type === 'impersonates') relations.push(node); - } - return relations; - }; return (
- {(getRelationships().length > 0) && ( - - - - )} + + + { - const relations = []; - for (const { node } of threatActorIndividual.stixCoreRelationships?.edges ?? []) { - const { relationship_type } = node ?? {}; - if (relationship_type === 'known-as') relations.push(node); - } - return relations; - }; - return (
- {(getRelationships().length > 0) && ( - - - - )} + + + 0 ? { marginBottom: '20px' } : {}}> -
- {(nodes.length > 0) && ( - - {title} - )} - } + return ( +
+
- - -
-
- {(nodes.length > 0) && ( - nodes.map(({ id, to }) => ( - - )) - )} -
); + + +
+
+ + { + nodes.map(({ id, to }) => ( + + )) + } + +
+ ); }; export default ThreatActorIndividualDetailsChips; diff --git a/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/ThreatActorIndividualLocation.jsx b/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/ThreatActorIndividualLocation.jsx index 38841e9587a8..563ef891864b 100644 --- a/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/ThreatActorIndividualLocation.jsx +++ b/opencti-platform/opencti-front/src/private/components/threats/threat_actors_individual/ThreatActorIndividualLocation.jsx @@ -63,7 +63,7 @@ class ThreatActorIndividualLocationsComponent extends Component { />
- + {threatActorIndividual.locations.edges.map((locationEdge) => { const { types } = locationEdge;