-
Notifications
You must be signed in to change notification settings - Fork 800
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
[backend/frontend] Be able to add images in overview of some entity types (#issue/2540) #3998
Conversation
Here are some feedbacks we can talk about tomorrow: |
opencti-platform/opencti-front/src/private/components/common/files/PictureManagementEdition.tsx
Show resolved
Hide resolved
opencti-platform/opencti-front/src/private/components/common/files/PictureManagementViewer.tsx
Show resolved
Hide resolved
...ont/src/private/components/threats/threat_actors_individual/ThreatActorIndividualDetails.tsx
Outdated
Show resolved
Hide resolved
a64daee
to
0deafeb
Compare
When we click in the overview of a threat actor individual, the image displayed is the first one, but the points at the bottom don't correspond (the second point is highlighted in the capture below whereas the image is the first one): @SarahBocognano Yes I know, it's how the carousel library choosed to display the selected image. It's weird to not highlight it, but they choose to shadow the selected one instead |
2db78f5
to
c202eea
Compare
@@ -4230,6 +4222,217 @@ input IndividualAddInput { | |||
file: Upload | |||
} | |||
|
|||
################ Organizations | |||
enum OrganizationsOrdering { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this organizations part is in organization.graphql, maybe a merge issue ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes It's a merge issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's still a duplicate no? you don't need to remove it ?
57f6c3e
to
2cd8517
Compare
What about making the boxes clickable ? (avoid to open the edition form) @SarahBocognano As discussed with Julien, we choose to make the boxes clickable inline disabled to keep the consistency of the platform. We plan to make editable "lines" in the future, so that way we can avoid forms sometimes, but for now it was asked to be disabled |
@@ -145,6 +160,7 @@ GenericAttackCardProps | |||
addBookmark(cardData.id, entityType); | |||
} | |||
}; | |||
const image = cardData.images?.edges ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
images
in plural since it's an array.
Also, maybe it could be useful to have directly the avatarImage here, like this :
const images = cardData.images?.edges ?? [];
const avatarImage = (images.length > 0 && images[0]) ? images[0].node : null;
And then you could directly use avatarImage, and only test if it's defined or not. What do you think ?
/> | ||
) : ( | ||
<ItemIcon type={entityType} size="large" /> | ||
) | ||
} | ||
title={cardData.name} | ||
title={renderThreatActorIndividual(cardData)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component is generic and used for Malware, Campaign, Intrusion Sets, ... not only Threat Actors individuals. How does it work for them ?
@@ -162,7 +165,7 @@ class StixDomainObjectBookmarkComponent extends Component { | |||
/> | |||
</Avatar> | |||
)} | |||
title={node.name} | |||
title={renderThreatActorIndividual(node)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here as for GenericAttackCard : is this method generic or specific for Threat Actors Individuals ? StixDomainObjectBookmark is a shared component.
@@ -86,6 +89,34 @@ export const computeDuplicates = (fields, data) => R.groupWith(R.allPass(R.map(R | |||
|
|||
export const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1); | |||
|
|||
export const renderThreatActorIndividual = (threatActorIndividual) => { | |||
if ((threatActorIndividual.locatedAtCountries?.edges ?? []).length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need more than one country ? If we need only one, maybe it could be handled by ThreatActorIndividual resolver to return the country ?
…actorgroups (#issue/2540)
a47f831
to
c721140
Compare
This issue is the following of Threat Actor Individual Image Carousel. Now we can manage the pictures uploaded in the Data Section, select their order in the carousel, add a description and choose if we want it to be in the carousel or not.
Proposed changes
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...