From 73ac5cc347f4ba10d3cf4c1541383cc6bfb1a126 Mon Sep 17 00:00:00 2001 From: Adrien Servel Date: Sun, 22 Sep 2024 16:05:31 +0200 Subject: [PATCH] [frontend] Alignment fixes (#8443) (#8435) --- .../src/components/Breadcrumbs.tsx | 30 +++---------------- .../dataGrid/components/DataTableLine.tsx | 17 ++++------- .../src/components/list_lines/ListLines.jsx | 1 - .../analyses/ExternalReferences.tsx | 2 +- .../private/components/analyses/Groupings.tsx | 2 +- .../components/analyses/MalwareAnalyses.tsx | 2 +- .../src/private/components/analyses/Notes.tsx | 2 +- .../private/components/analyses/Reports.tsx | 2 +- .../analyses/external_references/Root.jsx | 2 +- .../components/analyses/groupings/Root.tsx | 2 +- .../analyses/malware_analyses/Root.tsx | 2 +- .../components/analyses/notes/Root.jsx | 2 +- .../components/analyses/reports/Root.tsx | 2 +- .../private/components/arsenal/Channels.tsx | 2 +- .../private/components/arsenal/Malwares.tsx | 2 +- .../src/private/components/arsenal/Tools.tsx | 2 +- .../components/arsenal/Vulnerabilities.tsx | 2 +- .../components/arsenal/channels/Root.tsx | 2 +- .../components/arsenal/malwares/Root.tsx | 2 +- .../private/components/arsenal/tools/Root.tsx | 2 +- .../arsenal/vulnerabilities/Root.tsx | 2 +- .../components/cases/CaseIncidents.tsx | 2 +- .../src/private/components/cases/CaseRfis.tsx | 2 +- .../src/private/components/cases/CaseRfts.tsx | 2 +- .../private/components/cases/Feedbacks.tsx | 2 +- .../src/private/components/cases/Tasks.tsx | 2 +- .../components/cases/case_incidents/Root.tsx | 2 +- .../components/cases/case_rfis/Root.tsx | 2 +- .../components/cases/case_rfts/Root.tsx | 2 +- .../components/cases/feedbacks/Root.tsx | 2 +- .../private/components/cases/tasks/Root.tsx | 2 +- .../private/components/data/Connectors.jsx | 2 +- .../private/components/data/CsvMappers.tsx | 2 +- .../src/private/components/data/Entities.tsx | 2 +- .../src/private/components/data/Feed.tsx | 2 +- .../private/components/data/IngestionCsv.tsx | 2 +- .../private/components/data/IngestionRss.jsx | 2 +- .../components/data/IngestionTaxiis.jsx | 2 +- .../src/private/components/data/Playbooks.tsx | 2 +- .../private/components/data/Relationships.tsx | 2 +- .../src/private/components/data/Stream.jsx | 2 +- .../src/private/components/data/Sync.jsx | 2 +- .../src/private/components/data/Tasks.jsx | 2 +- .../src/private/components/data/Taxii.tsx | 2 +- .../components/data/connectors/Root.jsx | 2 +- .../components/data/import/ImportContent.jsx | 2 +- .../data/import/ImportFilesContent.tsx | 2 +- .../data/import/ImportWorkbenchesContent.tsx | 2 +- .../private/components/entities/Events.tsx | 2 +- .../components/entities/Individuals.tsx | 2 +- .../components/entities/Organizations.tsx | 2 +- .../private/components/entities/Sectors.jsx | 2 +- .../private/components/entities/Systems.tsx | 2 +- .../components/entities/events/Root.tsx | 2 +- .../components/entities/individuals/Root.tsx | 2 +- .../entities/organizations/Root.tsx | 2 +- .../components/entities/sectors/Root.tsx | 2 +- .../components/entities/systems/Root.tsx | 2 +- .../private/components/events/Incidents.tsx | 2 +- .../components/events/ObservedDatas.tsx | 2 +- .../events/StixSightingRelationships.tsx | 2 +- .../components/events/incidents/Root.tsx | 2 +- .../components/events/observed_data/Root.jsx | 2 +- .../StixSightingRelationship.tsx | 2 +- .../locations/AdministrativeAreas.tsx | 2 +- .../private/components/locations/Cities.tsx | 2 +- .../components/locations/Countries.tsx | 2 +- .../components/locations/Positions.tsx | 2 +- .../private/components/locations/Regions.tsx | 2 +- .../locations/administrative_areas/Root.tsx | 2 +- .../components/locations/cities/Root.tsx | 2 +- .../components/locations/countries/Root.tsx | 2 +- .../components/locations/positions/Root.tsx | 2 +- .../components/locations/regions/Root.tsx | 2 +- .../components/observations/Artifacts.tsx | 2 +- .../components/observations/Indicators.tsx | 2 +- .../observations/Infrastructures.tsx | 2 +- .../observations/StixCyberObservables.tsx | 2 +- .../observations/artifacts/Root.jsx | 2 +- .../observations/indicators/Root.tsx | 2 +- .../observations/infrastructures/Root.tsx | 2 +- .../stix_cyber_observables/Root.tsx | 2 +- .../components/profile/Notifications.tsx | 2 +- .../private/components/profile/Triggers.tsx | 2 +- .../search/SearchContainerQuery.tsx | 6 +++- .../private/components/settings/Groups.jsx | 2 +- .../components/settings/KillChainPhases.jsx | 2 +- .../private/components/settings/Labels.jsx | 2 +- .../settings/MarkingDefinitions.jsx | 2 +- .../private/components/settings/Notifiers.tsx | 2 +- .../private/components/settings/Policies.tsx | 2 +- .../private/components/settings/Retention.tsx | 2 +- .../src/private/components/settings/Roles.jsx | 2 +- .../src/private/components/settings/Rules.jsx | 2 +- .../private/components/settings/Sessions.jsx | 2 +- .../private/components/settings/Settings.jsx | 2 +- .../settings/SettingsOrganizations.tsx | 2 +- .../src/private/components/settings/Users.jsx | 2 +- .../components/settings/Vocabularies.tsx | 2 +- .../settings/VocabularyCategories.tsx | 2 +- .../settings/activity/alerting/Alerting.tsx | 2 +- .../settings/activity/audit/Audit.tsx | 2 +- .../activity/configuration/Configuration.tsx | 2 +- .../settings/case_templates/CaseTemplates.tsx | 2 +- .../components/settings/decay/DecayRule.tsx | 2 +- .../components/settings/decay/DecayRules.tsx | 2 +- .../settings/file_indexing/FileIndexing.tsx | 2 +- .../components/settings/groups/Root.tsx | 2 +- .../settings/organizations/Root.tsx | 2 +- .../components/settings/roles/Root.tsx | 2 +- .../status_templates/StatusTemplates.tsx | 2 +- .../components/settings/sub_types/Root.tsx | 2 +- .../settings/sub_types/SubTypes.tsx | 2 +- .../settings/support/SupportPackages.tsx | 2 +- .../components/settings/users/Root.jsx | 2 +- .../components/techniques/AttackPatterns.tsx | 2 +- .../components/techniques/CoursesOfAction.tsx | 2 +- .../components/techniques/DataComponents.tsx | 2 +- .../components/techniques/DataSources.tsx | 2 +- .../components/techniques/Narratives.tsx | 2 +- .../techniques/attack_patterns/Root.tsx | 2 +- .../techniques/courses_of_action/Root.jsx | 2 +- .../techniques/data_components/Root.tsx | 2 +- .../techniques/data_sources/Root.tsx | 2 +- .../components/techniques/narratives/Root.tsx | 2 +- .../private/components/threats/Campaigns.tsx | 2 +- .../components/threats/IntrusionSets.tsx | 2 +- .../components/threats/ThreatActorsGroup.tsx | 2 +- .../threats/ThreatActorsIndividual.tsx | 2 +- .../components/threats/campaigns/Root.tsx | 2 +- .../threats/intrusion_sets/Root.tsx | 2 +- .../threats/threat_actors_group/Root.tsx | 2 +- .../threats/threat_actors_individual/Root.tsx | 2 +- .../src/private/components/trash/Trash.tsx | 2 +- .../components/workspaces/Workspaces.tsx | 1 - .../public_dashboards/PublicDashboards.tsx | 1 - 136 files changed, 145 insertions(+), 171 deletions(-) diff --git a/opencti-platform/opencti-front/src/components/Breadcrumbs.tsx b/opencti-platform/opencti-front/src/components/Breadcrumbs.tsx index 4d834469ca938..0ff13036d6d3c 100644 --- a/opencti-platform/opencti-front/src/components/Breadcrumbs.tsx +++ b/opencti-platform/opencti-front/src/components/Breadcrumbs.tsx @@ -2,7 +2,7 @@ import React, { FunctionComponent } from 'react'; import MUIBreadcrumbs from '@mui/material/Breadcrumbs'; import { Link } from 'react-router-dom'; import Typography from '@mui/material/Typography'; -import makeStyles from '@mui/styles/makeStyles'; +import { useTheme } from '@mui/styles'; import { truncate } from '../utils/String'; import type { Theme } from './Theme'; @@ -13,35 +13,13 @@ interface element { } interface BreadcrumbsProps { - variant: 'standard' | 'list' | 'object', elements: element[], } -// Deprecated - https://mui.com/system/styles/basics/ -// Do not use it for new code. -const useStyles = makeStyles((theme) => ({ - breadcrumbsList: { - marginBottom: theme.spacing(2), - }, - breadcrumbsObject: { - marginTop: -5, - marginBottom: 15, - }, - breadcrumbsStandard: { - marginTop: -5, - }, -})); - -const Breadcrumbs: FunctionComponent = ({ elements, variant }) => { - const classes = useStyles(); - let className = classes.breadcrumbsStandard; - if (variant === 'list') { - className = classes.breadcrumbsList; - } else if (variant === 'object') { - className = classes.breadcrumbsObject; - } +const Breadcrumbs: FunctionComponent = ({ elements }) => { + const theme = useTheme(); return ( - + {elements.map((element) => { if (element.current) { return ( diff --git a/opencti-platform/opencti-front/src/components/dataGrid/components/DataTableLine.tsx b/opencti-platform/opencti-front/src/components/dataGrid/components/DataTableLine.tsx index b77d21b38d815..59ae79a231121 100644 --- a/opencti-platform/opencti-front/src/components/dataGrid/components/DataTableLine.tsx +++ b/opencti-platform/opencti-front/src/components/dataGrid/components/DataTableLine.tsx @@ -8,7 +8,7 @@ import { createStyles } from '@mui/styles'; import { useNavigate } from 'react-router-dom'; import { useDataTableContext } from '../dataTableUtils'; import type { DataTableCellProps, DataTableLineProps } from '../dataTableTypes'; -import { DataTableColumn, DataTableVariant } from '../dataTableTypes'; +import { DataTableColumn } from '../dataTableTypes'; import type { Theme } from '../../Theme'; import { getMainRepresentative } from '../../../utils/defaultRepresentatives'; @@ -118,7 +118,6 @@ const DataTableLine = ({ disableNavigation, onLineClick, selectOnLineClick, - variant, } = useDataTableContext(); const data = useLineData(row); @@ -143,8 +142,6 @@ const DataTableLine = ({ const endWithNavigate = effectiveColumns.at(-1)?.id === 'navigate'; const handleSelectLine = (event: React.MouseEvent) => { - event.preventDefault(); - event.stopPropagation(); if (event.shiftKey) { onToggleShiftEntity(index, data, event); } else { @@ -155,14 +152,12 @@ const DataTableLine = ({ const handleRowClick = (event: React.MouseEvent) => { event.preventDefault(); event.stopPropagation(); - if (selectOnLineClick) { - handleSelectLine(event); - } else if (onLineClick) { + if (onLineClick) { onLineClick(data); } else if (navigable) { - if (event.ctrlKey) { + if (event.ctrlKey || event.button === 1) { window.open(link, '_blank'); - } else { + } else if (event.button !== 2) { navigate(link); } } @@ -173,8 +168,8 @@ const DataTableLine = ({ key={row.id} className={classes.row} // using onMouseDown to redirect before drag and drop happens when used in dashboard widgets - onMouseDown={variant === DataTableVariant.widget ? handleRowClick : undefined} - onClick={variant !== DataTableVariant.widget ? handleRowClick : undefined} + onMouseDown={handleRowClick} + onClick={selectOnLineClick ? handleSelectLine : undefined} style={{ cursor: clickable ? 'pointer' : 'unset' }} data-testid={getMainRepresentative(data)} > diff --git a/opencti-platform/opencti-front/src/components/list_lines/ListLines.jsx b/opencti-platform/opencti-front/src/components/list_lines/ListLines.jsx index ec5e4e3679742..2ed5561754362 100644 --- a/opencti-platform/opencti-front/src/components/list_lines/ListLines.jsx +++ b/opencti-platform/opencti-front/src/components/list_lines/ListLines.jsx @@ -61,7 +61,6 @@ const styles = (theme) => ({ display: 'flex', alignItems: 'center', gap: 10, - marginTop: -10, paddingBottom: 10, flexWrap: 'wrap', }, diff --git a/opencti-platform/opencti-front/src/private/components/analyses/ExternalReferences.tsx b/opencti-platform/opencti-front/src/private/components/analyses/ExternalReferences.tsx index 7e48ecf40003d..06e6c7376edbd 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/ExternalReferences.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/ExternalReferences.tsx @@ -150,7 +150,7 @@ const ExternalReferences: FunctionComponent = () => { } as UsePreloadedPaginationFragment; return ( <> - + {queryRef && ( = () => { return ( - + {queryRef && ( { return ( - + {queryRef && (
{ return ( <> - + {queryRef && ( { }; return ( - + {queryRef && ( { if (props.externalReference && props.connectorsForImport) { return ( <> - { const currentAccessRight = useGetCurrentUserAccessRight(grouping.currentUserAccessRight); return (
- { const paddingRight = getPaddingRight(location.pathname, malwareAnalysis.id, '/dashboard/analyses/malware_analyses', false); return (
- { const { note } = props; return ( <> - { const currentAccessRight = useGetCurrentUserAccessRight(report.currentUserAccessRight); return (
- { return ( <> - + {queryRef && ( { return ( <> - + {viewStorage.view !== 'lines' ? renderCards() : renderList()} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/arsenal/Tools.tsx b/opencti-platform/opencti-front/src/private/components/arsenal/Tools.tsx index 4d6351fc845c9..c5eb54fee08ee 100644 --- a/opencti-platform/opencti-front/src/private/components/arsenal/Tools.tsx +++ b/opencti-platform/opencti-front/src/private/components/arsenal/Tools.tsx @@ -144,7 +144,7 @@ const Tools = () => { return ( <> - + {queryRef && ( { return ( <> - + {queryRef && ( { />
- { />
- { />
-
- = () => { return ( <> - + {queryRef && ( = () => { return ( <> - + {queryRef && ( = () => { return ( <> - + {queryRef && ( = () => { return ( <> - + {queryRef && ( { return ( <> - + {queryRef && ( { const currentAccessRight = useGetCurrentUserAccessRight(caseData.currentUserAccessRight); return (
- { const currentAccessRight = useGetCurrentUserAccessRight(caseData.currentUserAccessRight); return (
- { const currentAccessRight = useGetCurrentUserAccessRight(caseData.currentUserAccessRight); return (
- { const { canEdit } = useGetCurrentUserAccessRight(feedbackData.currentUserAccessRight); return (
- { <> {data ? (
- - + { schemaAttributesQueryRef={queryRefSchemaAttributes} >
- + { return (
- + {queryRef && ( { padding: '0 200px 50px 0', }} > - + {feedState.view === 'lines' ? renderLines(paginationOptions) : ''} diff --git a/opencti-platform/opencti-front/src/private/components/data/IngestionCsv.tsx b/opencti-platform/opencti-front/src/private/components/data/IngestionCsv.tsx index 6a1beee19a69d..1549427eb2ed6 100644 --- a/opencti-platform/opencti-front/src/private/components/data/IngestionCsv.tsx +++ b/opencti-platform/opencti-front/src/private/components/data/IngestionCsv.tsx @@ -123,7 +123,7 @@ const IngestionCsv = () => { return (
- + {renderLines()} diff --git a/opencti-platform/opencti-front/src/private/components/data/IngestionRss.jsx b/opencti-platform/opencti-front/src/private/components/data/IngestionRss.jsx index 965907c966bc1..9c56302b5e82f 100644 --- a/opencti-platform/opencti-front/src/private/components/data/IngestionRss.jsx +++ b/opencti-platform/opencti-front/src/private/components/data/IngestionRss.jsx @@ -72,7 +72,7 @@ const IngestionRss = () => { } return (
- + { } return (
- + { }; return (
- + {isEnterpriseEdition ? ( <> diff --git a/opencti-platform/opencti-front/src/private/components/data/Relationships.tsx b/opencti-platform/opencti-front/src/private/components/data/Relationships.tsx index 4642ea16a4cf0..97d019af7eb14 100644 --- a/opencti-platform/opencti-front/src/private/components/data/Relationships.tsx +++ b/opencti-platform/opencti-front/src/private/components/data/Relationships.tsx @@ -299,7 +299,7 @@ const Relationships = () => { return ( <> - + {queryRef && ( - + {view === 'lines' ? this.renderLines(paginationOptions) : ''} diff --git a/opencti-platform/opencti-front/src/private/components/data/Sync.jsx b/opencti-platform/opencti-front/src/private/components/data/Sync.jsx index e4fa650e16564..5cc0e29ba5fdf 100644 --- a/opencti-platform/opencti-front/src/private/components/data/Sync.jsx +++ b/opencti-platform/opencti-front/src/private/components/data/Sync.jsx @@ -79,7 +79,7 @@ const Sync = () => { } return (
- + {
- + {t_i18n('In progress tasks')} diff --git a/opencti-platform/opencti-front/src/private/components/data/Taxii.tsx b/opencti-platform/opencti-front/src/private/components/data/Taxii.tsx index d630d12ed1e10..9348399a86fc4 100644 --- a/opencti-platform/opencti-front/src/private/components/data/Taxii.tsx +++ b/opencti-platform/opencti-front/src/private/components/data/Taxii.tsx @@ -118,7 +118,7 @@ const Taxii = () => { }} aria-label="TaxiiCollections" > - + {taxiiState.view === 'lines' ? renderLines(paginationOptions) : null} diff --git a/opencti-platform/opencti-front/src/private/components/data/connectors/Root.jsx b/opencti-platform/opencti-front/src/private/components/data/connectors/Root.jsx index 41ef966cd15c9..5889d7ef92f14 100644 --- a/opencti-platform/opencti-front/src/private/components/data/connectors/Root.jsx +++ b/opencti-platform/opencti-front/src/private/components/data/connectors/Root.jsx @@ -25,7 +25,7 @@ class RootConnector extends Component { if (props.connector) { return ( <> - + - + {isNewImportScreensEnabled && } { return (
- + { return (
- + { }; return ( <> - + {renderLines()} {!isFABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/entities/Individuals.tsx b/opencti-platform/opencti-front/src/private/components/entities/Individuals.tsx index 8f9fb9f2d4222..8208a9a076382 100644 --- a/opencti-platform/opencti-front/src/private/components/entities/Individuals.tsx +++ b/opencti-platform/opencti-front/src/private/components/entities/Individuals.tsx @@ -117,7 +117,7 @@ const Individuals = () => { return ( <> - + {renderLines()} {!isFABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/entities/Organizations.tsx b/opencti-platform/opencti-front/src/private/components/entities/Organizations.tsx index d8e9f3a094247..ecde43ded40b8 100644 --- a/opencti-platform/opencti-front/src/private/components/entities/Organizations.tsx +++ b/opencti-platform/opencti-front/src/private/components/entities/Organizations.tsx @@ -125,7 +125,7 @@ const Organizations = () => { return ( <> - + {renderLines()} {!isFABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/entities/Sectors.jsx b/opencti-platform/opencti-front/src/private/components/entities/Sectors.jsx index c18247e5cff6d..e78ac4e40d8c7 100644 --- a/opencti-platform/opencti-front/src/private/components/entities/Sectors.jsx +++ b/opencti-platform/opencti-front/src/private/components/entities/Sectors.jsx @@ -50,7 +50,7 @@ class Sectors extends Component { const { t } = this.props; return ( <> - +
{ return ( <> - + {renderLines()} {!isFABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/entities/events/Root.tsx b/opencti-platform/opencti-front/src/private/components/entities/events/Root.tsx index 4495ad43524ff..fb9c7285e4739 100644 --- a/opencti-platform/opencti-front/src/private/components/entities/events/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/entities/events/Root.tsx @@ -127,7 +127,7 @@ const RootEvent = ({ eventId, queryRef }: RootEventProps) => { />
- { />
-
- { />
- { />
- { return (
- + {queryRef && ( { return ( <> - + {queryRef && ( { return ( <> - + {queryRef && ( {
- - - { }; return ( <> - + {renderLines()} {!FABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/locations/Cities.tsx b/opencti-platform/opencti-front/src/private/components/locations/Cities.tsx index b4c7237436298..67ef5a6cdfef1 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/Cities.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/Cities.tsx @@ -111,7 +111,7 @@ const Cities: FunctionComponent = () => { }; return ( <> - + {renderLines()} {!FABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/locations/Countries.tsx b/opencti-platform/opencti-front/src/private/components/locations/Countries.tsx index aa73773eb77ae..1b743b6b883d9 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/Countries.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/Countries.tsx @@ -111,7 +111,7 @@ const Countries: FunctionComponent = () => { }; return ( <> - + {renderLines()} {!FABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/locations/Positions.tsx b/opencti-platform/opencti-front/src/private/components/locations/Positions.tsx index ba92b8f76d64d..ecaa0fa56e018 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/Positions.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/Positions.tsx @@ -111,7 +111,7 @@ const Positions: FunctionComponent = () => { }; return ( <> - + {renderLines()} {!FABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/locations/Regions.tsx b/opencti-platform/opencti-front/src/private/components/locations/Regions.tsx index b7c0637dd9865..56856243c9c17 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/Regions.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/Regions.tsx @@ -111,7 +111,7 @@ const Regions: FunctionComponent = () => { }; return ( <> - + {renderLines()} {!FABReplaced && diff --git a/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/Root.tsx b/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/Root.tsx index 2f6ed2b1a86c6..51bf20ded5887 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/Root.tsx @@ -126,7 +126,7 @@ const RootAdministrativeAreaComponent = ({ queryRef, administrativeAreaId }) => />
- { />
- { />
- { />
- { />
- { return (
- + {queryRef && ( { return ( <> - + {queryRef && ( { return ( - + {queryRef && ( { return ( - + {queryRef && ( - { <> {indicator ? (
- {
- {stixCyberObservable ? (
- { }; return ( <> - + {renderLines()} ); diff --git a/opencti-platform/opencti-front/src/private/components/profile/Triggers.tsx b/opencti-platform/opencti-front/src/private/components/profile/Triggers.tsx index db77895941022..2134d60dd783c 100644 --- a/opencti-platform/opencti-front/src/private/components/profile/Triggers.tsx +++ b/opencti-platform/opencti-front/src/private/components/profile/Triggers.tsx @@ -112,7 +112,7 @@ const Triggers: FunctionComponent = () => { return ( <> - + {renderLines()} diff --git a/opencti-platform/opencti-front/src/private/components/search/SearchContainerQuery.tsx b/opencti-platform/opencti-front/src/private/components/search/SearchContainerQuery.tsx index 18a82be4cf921..c64bd78377502 100644 --- a/opencti-platform/opencti-front/src/private/components/search/SearchContainerQuery.tsx +++ b/opencti-platform/opencti-front/src/private/components/search/SearchContainerQuery.tsx @@ -6,12 +6,14 @@ import { Link, useLocation, useParams } from 'react-router-dom'; import EEChip from '@components/common/entreprise_edition/EEChip'; import { graphql, PreloadedQuery, usePreloadedQuery, useQueryLoader } from 'react-relay'; import Badge from '@mui/material/Badge'; +import { useTheme } from '@mui/styles'; import ExportContextProvider from '../../../utils/ExportContextProvider'; import { useFormatter } from '../../../components/i18n'; import { decodeSearchKeyword } from '../../../utils/SearchUtils'; import useAuth from '../../../utils/hooks/useAuth'; import { SearchContainerQueryFilesCountQuery } from './__generated__/SearchContainerQueryFilesCountQuery.graphql'; import Breadcrumbs from '../../../components/Breadcrumbs'; +import type { Theme } from '../../../components/Theme'; const searchContainerQueryFilesCountQuery = graphql` query SearchContainerQueryFilesCountQuery($search: String) { @@ -26,6 +28,7 @@ interface SearchRootComponentProps { const SearchContainer: FunctionComponent = ({ children, filesCount = 0 }) => { const { t_i18n } = useFormatter(); + const theme = useTheme(); const { keyword } = useParams() as { keyword: string }; const location = useLocation(); let searchType = 'knowledge'; @@ -34,12 +37,13 @@ const SearchContainer: FunctionComponent = ({ children } return ( - + diff --git a/opencti-platform/opencti-front/src/private/components/settings/Groups.jsx b/opencti-platform/opencti-front/src/private/components/settings/Groups.jsx index c661ec77a84e8..f1b28a00fa28f 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/Groups.jsx +++ b/opencti-platform/opencti-front/src/private/components/settings/Groups.jsx @@ -157,7 +157,7 @@ class Groups extends Component { }; return (
- + {view === 'lines' ? this.renderLines(paginationOptions) : ''} diff --git a/opencti-platform/opencti-front/src/private/components/settings/KillChainPhases.jsx b/opencti-platform/opencti-front/src/private/components/settings/KillChainPhases.jsx index 657864d207bc5..ed32c4d133c84 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/KillChainPhases.jsx +++ b/opencti-platform/opencti-front/src/private/components/settings/KillChainPhases.jsx @@ -145,7 +145,7 @@ const KillChainPhases = () => { return (
- + {queryRef && ( { return (
- + {queryRef && ( - + {view === 'lines' ? this.renderLines(paginationOptions) : ''} diff --git a/opencti-platform/opencti-front/src/private/components/settings/Notifiers.tsx b/opencti-platform/opencti-front/src/private/components/settings/Notifiers.tsx index c4fa16d5875e3..eacbf695c06ae 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/Notifiers.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/Notifiers.tsx @@ -71,7 +71,7 @@ const Notifiers = () => { return (
- + = ({ return (
- + { return (
- + - + {view === 'lines' ? this.renderLines(paginationOptions) : ''} diff --git a/opencti-platform/opencti-front/src/private/components/settings/Rules.jsx b/opencti-platform/opencti-front/src/private/components/settings/Rules.jsx index d9c5164cc0225..f2f6518625cc2 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/Rules.jsx +++ b/opencti-platform/opencti-front/src/private/components/settings/Rules.jsx @@ -43,7 +43,7 @@ const Rules = () => { return (
- + {({ platformModuleHelpers }) => { if (!platformModuleHelpers.isRuleEngineEnable()) { diff --git a/opencti-platform/opencti-front/src/private/components/settings/Sessions.jsx b/opencti-platform/opencti-front/src/private/components/settings/Sessions.jsx index bdf6993160d4a..39201b6dd6fbc 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/Sessions.jsx +++ b/opencti-platform/opencti-front/src/private/components/settings/Sessions.jsx @@ -57,7 +57,7 @@ class Sessions extends Component { return (
- +
{ ); return ( <> - + diff --git a/opencti-platform/opencti-front/src/private/components/settings/SettingsOrganizations.tsx b/opencti-platform/opencti-front/src/private/components/settings/SettingsOrganizations.tsx index 3947e82714df6..f7fd9c0167f2e 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/SettingsOrganizations.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/SettingsOrganizations.tsx @@ -77,7 +77,7 @@ const SettingsOrganizations = () => { }; return (
- + { return (
- + {isSetAccess || isEnterpriseEdition ? ( renderLines() diff --git a/opencti-platform/opencti-front/src/private/components/settings/Vocabularies.tsx b/opencti-platform/opencti-front/src/private/components/settings/Vocabularies.tsx index 0ab3f2480d609..4edeb03fc6555 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/Vocabularies.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/Vocabularies.tsx @@ -180,7 +180,7 @@ const Vocabularies = () => { return (
- { return (
- + {renderLines()}
); diff --git a/opencti-platform/opencti-front/src/private/components/settings/activity/alerting/Alerting.tsx b/opencti-platform/opencti-front/src/private/components/settings/activity/alerting/Alerting.tsx index ae2bf9afb2515..92b4edf2cf0b8 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/activity/alerting/Alerting.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/activity/alerting/Alerting.tsx @@ -217,7 +217,7 @@ const Alerting: FunctionComponent = () => { return (
- + {renderLines()}
diff --git a/opencti-platform/opencti-front/src/private/components/settings/activity/audit/Audit.tsx b/opencti-platform/opencti-front/src/private/components/settings/activity/audit/Audit.tsx index 2b7c65e8e7b15..659f9c80d812b 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/activity/audit/Audit.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/activity/audit/Audit.tsx @@ -219,7 +219,7 @@ const Audit = () => { return (
-
- + diff --git a/opencti-platform/opencti-front/src/private/components/settings/case_templates/CaseTemplates.tsx b/opencti-platform/opencti-front/src/private/components/settings/case_templates/CaseTemplates.tsx index d6055e335159c..5769864bbfe35 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/case_templates/CaseTemplates.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/case_templates/CaseTemplates.tsx @@ -105,7 +105,7 @@ const CaseTemplates = () => { return (
- + {renderLines()} { return (
- { return (
- + {renderLines()}
diff --git a/opencti-platform/opencti-front/src/private/components/settings/file_indexing/FileIndexing.tsx b/opencti-platform/opencti-front/src/private/components/settings/file_indexing/FileIndexing.tsx index 3aa4f1713669e..5ed180e89a19f 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/file_indexing/FileIndexing.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/file_indexing/FileIndexing.tsx @@ -90,7 +90,7 @@ const FileIndexingComponent: FunctionComponent = ({ }, []); return ( <> - + {!isEnterpriseEdition ? ( ) : ( diff --git a/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx b/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx index 74282dd357d5a..f5868b8ee40f9 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx @@ -65,7 +65,7 @@ const RootGroupComponent: FunctionComponent = ({ queryR {group ? ( <> - - = ({ queryRef {role ? ( <> - { return (
- + {renderLines()} { { data.subType ? ( <> - { return (
- + { return ( {t_i18n('You do not have any access to the knowledge of this OpenCTI instance.')}}>
- diff --git a/opencti-platform/opencti-front/src/private/components/settings/users/Root.jsx b/opencti-platform/opencti-front/src/private/components/settings/users/Root.jsx index b7865b01817b7..75df601e78ed1 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/users/Root.jsx +++ b/opencti-platform/opencti-front/src/private/components/settings/users/Root.jsx @@ -101,7 +101,7 @@ const RootUserComponent = ({ queryRef, userId, refetch }) => { {data ? (
- { return ( <> - + {queryRef && ( { return ( <> - + {queryRef && ( { return ( <> - + {queryRef && ( { return ( <> - + {queryRef && ( { }; return ( - + {view === 'lines' ? renderLines() : ''} {view === 'subEntityLines' ? renderSubEntityLines() : ''} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/techniques/attack_patterns/Root.tsx b/opencti-platform/opencti-front/src/private/components/techniques/attack_patterns/Root.tsx index a6427bb00981d..cdd2c8de50f9d 100644 --- a/opencti-platform/opencti-front/src/private/components/techniques/attack_patterns/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/techniques/attack_patterns/Root.tsx @@ -128,7 +128,7 @@ const RootAttackPattern = ({ attackPatternId, queryRef }: RootAttackPatternProps />
- - { const paddingRight = getPaddingRight(location.pathname, dataComponent.id, '/dashboard/techniques/data_components', false); return (
- { <> {dataSource ? (
- { />
- { return ( <> - + {viewStorage.view !== 'lines' ? renderCards() : renderList()} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/threats/IntrusionSets.tsx b/opencti-platform/opencti-front/src/private/components/threats/IntrusionSets.tsx index ebf895dbc9ef5..d02fb0adbf848 100644 --- a/opencti-platform/opencti-front/src/private/components/threats/IntrusionSets.tsx +++ b/opencti-platform/opencti-front/src/private/components/threats/IntrusionSets.tsx @@ -187,7 +187,7 @@ const IntrusionSets = () => { return ( <> - + {viewStorage.view !== 'lines' ? renderCards() : renderList()} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsGroup.tsx b/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsGroup.tsx index 26b13a571cc93..4834790826409 100644 --- a/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsGroup.tsx +++ b/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsGroup.tsx @@ -191,7 +191,7 @@ const ThreatActorsGroup = () => { return ( <> - + {viewStorage.view !== 'lines' ? renderCards() : renderList()} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsIndividual.tsx b/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsIndividual.tsx index 8bc790958ba19..db43cb66aa248 100644 --- a/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsIndividual.tsx +++ b/opencti-platform/opencti-front/src/private/components/threats/ThreatActorsIndividual.tsx @@ -194,7 +194,7 @@ const ThreatActorsIndividual = () => { return ( <> - + {viewStorage.view !== 'lines' ? renderCards() : renderList()} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/threats/campaigns/Root.tsx b/opencti-platform/opencti-front/src/private/components/threats/campaigns/Root.tsx index a0ec1dd6b5fa7..de6997f028703 100644 --- a/opencti-platform/opencti-front/src/private/components/threats/campaigns/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/threats/campaigns/Root.tsx @@ -134,7 +134,7 @@ const RootCampaign = ({ campaignId, queryRef }: RootCampaignProps) => { />
-
-
-
- { }; return ( - + {renderLines()} ); diff --git a/opencti-platform/opencti-front/src/private/components/workspaces/Workspaces.tsx b/opencti-platform/opencti-front/src/private/components/workspaces/Workspaces.tsx index b6e6c9a5d4478..6701aa34dd356 100644 --- a/opencti-platform/opencti-front/src/private/components/workspaces/Workspaces.tsx +++ b/opencti-platform/opencti-front/src/private/components/workspaces/Workspaces.tsx @@ -233,7 +233,6 @@ const Workspaces: FunctionComponent = ({ return ( <> { return ( <>