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

[frontend] Align knowledge bar counters (#8115) #9304

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ const channelQuery = graphql`
name
aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Channel_channel
...ChannelKnowledge_channel
...FileImportViewer_entity
Expand Down Expand Up @@ -124,7 +121,7 @@ const RootChannel = ({ queryRef, channelId }: RootChannelProps) => {
'sightings',
'channels',
]}
stixCoreObjectsDistribution={channel.stixCoreObjectsDistribution}
data={channel}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ const malwareQuery = graphql`
name
aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Malware_malware
...MalwareKnowledge_malware
...FileImportViewer_entity
Expand Down Expand Up @@ -131,7 +128,7 @@ const RootMalware = ({ queryRef, malwareId }: RootMalwareProps) => {
'infrastructures',
'sightings',
]}
stixCoreObjectsDistribution={malware.stixCoreObjectsDistribution}
data={malware}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ const toolQuery = graphql`
name
aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Tool_tool
...ToolKnowledge_tool
...FileImportViewer_entity
Expand Down Expand Up @@ -124,7 +121,7 @@ const RootTool = ({ queryRef, toolId }: RootToolProps) => {
'observables',
'sightings',
]}
stixCoreObjectsDistribution={tool.stixCoreObjectsDistribution}
data={tool}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ const vulnerabilityQuery = graphql`
name
x_opencti_aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Vulnerability_vulnerability
...VulnerabilityKnowledge_vulnerability
...FileImportViewer_entity
Expand Down Expand Up @@ -124,9 +121,9 @@ const RootVulnerability = ({ queryRef, vulnerabilityId }: RootVulnerabilityProps
'sightings',
'infrastructures',
]}
stixCoreObjectsDistribution={vulnerability.stixCoreObjectsDistribution}
data={vulnerability}
/>
}
}
/>
</Routes>
<div style={{ paddingRight }}>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ const eventQuery = graphql`
entity_type
name
aliases
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Event_event
...EventKnowledge_event
...FileImportViewer_entity
Expand Down Expand Up @@ -121,7 +118,7 @@ const RootEvent = ({ eventId, queryRef }: RootEventProps) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={event.stixCoreObjectsDistribution}
data={event}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ const individualQuery = graphql`
entity_type
name
x_opencti_aliases
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Individual_individual
...IndividualKnowledge_individual
...FileImportViewer_entity
Expand Down Expand Up @@ -155,7 +152,7 @@ const RootIndividual = ({ individualId, queryRef }: RootIndividualProps) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={individual.stixCoreObjectsDistribution}
data={individual}
/>
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ const organizationQuery = graphql`
entity_type
name
x_opencti_aliases
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Organization_organization
...OrganizationKnowledge_organization
...FileImportViewer_entity
Expand Down Expand Up @@ -153,7 +150,7 @@ const RootOrganization = ({ organizationId, queryRef }: RootOrganizationProps) =
'vulnerabilities',
'observables',
]}
stixCoreObjectsDistribution={organization.stixCoreObjectsDistribution}
data={organization}
/>
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ const sectorQuery = graphql`
name
x_opencti_aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Sector_sector
...SectorKnowledge_sector
...FileImportViewer_entity
Expand Down Expand Up @@ -123,7 +120,7 @@ const RootSector = ({ sectorId, queryRef }: RootSectorProps) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={sector.stixCoreObjectsDistribution}
data={sector}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ const systemQuery = graphql`
entity_type
name
x_opencti_aliases
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...System_system
...SystemKnowledge_system
...FileImportViewer_entity
Expand Down Expand Up @@ -148,7 +145,7 @@ const RootSystem = ({ systemId, queryRef }: RootSystemProps) => {
'observables',
'vulnerabilities',
]}
stixCoreObjectsDistribution={system.stixCoreObjectsDistribution}
data={system}
/>
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ const incidentQuery = graphql`
name
aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Incident_incident
...IncidentKnowledge_incident
...StixCoreObjectContent_stixCoreObject
Expand Down Expand Up @@ -123,7 +120,8 @@ const RootIncidentComponent = ({ queryRef }) => {
'vulnerabilities',
'observables',
]}
stixCoreObjectsDistribution={incident.stixCoreObjectsDistribution}
data={incident}
attribution={['Threat-Actor-Individual', 'Threat-Actor-Group', 'Intrusion-Set', 'Campaign']}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ const administrativeAreaQuery = graphql`
name
x_opencti_aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...AdministrativeArea_administrativeArea
...AdministrativeAreaKnowledge_administrativeArea
...FileImportViewer_entity
Expand Down Expand Up @@ -120,7 +117,7 @@ const RootAdministrativeAreaComponent = ({ queryRef, administrativeAreaId }) =>
'tools',
'observables',
]}
stixCoreObjectsDistribution={administrativeArea.stixCoreObjectsDistribution}
data={administrativeArea}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ const cityQuery = graphql`
name
x_opencti_aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...City_city
...CityKnowledge_city
...FileImportViewer_entity
Expand Down Expand Up @@ -118,7 +115,7 @@ const RootCityComponent = ({ queryRef, cityId }) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={city.stixCoreObjectsDistribution}
data={city}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ const countryQuery = graphql`
name
x_opencti_aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Country_country
...CountryKnowledge_country
...FileImportViewer_entity
Expand Down Expand Up @@ -120,7 +117,7 @@ const RootCountryComponent = ({ queryRef, countryId }) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={country.stixCoreObjectsDistribution}
data={country}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ const positionQuery = graphql`
entity_type
name
x_opencti_aliases
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Position_position
...PositionKnowledge_position
...FileImportViewer_entity
Expand Down Expand Up @@ -125,7 +122,7 @@ const RootPosition = ({ positionId, queryRef }: RootPositionProps) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={position.stixCoreObjectsDistribution}
data={position}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ const regionQuery = graphql`
name
x_opencti_aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Region_region
...RegionKnowledge_region
...FileImportViewer_entity
Expand Down Expand Up @@ -122,7 +119,7 @@ const RootRegionComponent = ({ queryRef, regionId }) => {
'tools',
'observables',
]}
stixCoreObjectsDistribution={region.stixCoreObjectsDistribution}
data={region}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ const infrastructureKnowledgeFragment = graphql`
aliases
first_seen
last_seen
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
}
`;

Expand All @@ -39,7 +36,7 @@ const InfrastructureKnowledge = ({ infrastructure }: { infrastructure: Infrastru
<>
<StixCoreObjectKnowledgeBar
stixCoreObjectLink={link}
stixCoreObjectsDistribution={infrastructureData.stixCoreObjectsDistribution}
data={infrastructureData}
availableSections={[
'threats',
'threat_actors',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ const attackPatternQuery = graphql`
name
aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...AttackPattern_attackPattern
...AttackPatternKnowledge_attackPattern
...FileImportViewer_entity
Expand Down Expand Up @@ -122,7 +119,7 @@ const RootAttackPattern = ({ attackPatternId, queryRef }: RootAttackPatternProps
'indicators',
'observables',
]}
stixCoreObjectsDistribution={attackPattern.stixCoreObjectsDistribution}
data={attackPattern}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ const narrativeQuery = graphql`
name
aliases
x_opencti_graph_data
stixCoreObjectsDistribution(field: "entity_type", operation: count) {
label
value
}
...StixCoreObjectKnowledgeBar_stixCoreObject
...Narrative_narrative
...NarrativeKnowledge_narrative
...FileImportViewer_entity
Expand Down Expand Up @@ -118,7 +115,7 @@ const RootNarrative = ({ narrativeId, queryRef }: RootNarrativeProps) => {
'observables',
'sightings',
]}
stixCoreObjectsDistribution={narrative.stixCoreObjectsDistribution}
data={narrative}
/>
}
/>
Expand Down
Loading