diff --git a/opencti-platform/opencti-front/src/private/components/analyses/groupings/Root.tsx b/opencti-platform/opencti-front/src/private/components/analyses/groupings/Root.tsx index 798c82a931a1..caab1e55b484 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/groupings/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/groupings/Root.tsx @@ -128,6 +128,9 @@ const RootGrouping = () => { borderBottom: 1, borderColor: 'divider', marginBottom: 4, + display: 'flex', + justifyContent: 'space-between', + alignItem: 'center', }} > { borderBottom: 1, borderColor: 'divider', marginBottom: 4, + display: 'flex', + justifyContent: 'space-between', + alignItem: 'center', }} > { borderBottom: 1, borderColor: 'divider', marginBottom: 4, + display: 'flex', + justifyContent: 'space-between', + alignItem: 'center', }} > { borderBottom: 1, borderColor: 'divider', marginBottom: 4, + display: 'flex', + justifyContent: 'space-between', + alignItem: 'center', }} > ({ simulationResults: { display: 'flex', - margin: '-45px 20px 0 0', - float: 'right', alignItems: 'center', }, charts: { - display: 'flex', + display: 'grid', + gridAutoFlow: 'column', + gridAutoColumns: '40px 40px 40px', }, chartContainer: { - width: 40, + marginLeft: -27, position: 'relative', }, iconOverlay: { + fontSize: 18, position: 'absolute', top: 17, - left: 30, - fontSize: 18, + left: 39, }, buttons: { marginTop: 20, @@ -67,43 +67,43 @@ const useStyles = makeStyles((theme) => ({ })); const stixCoreObjectSimulationResultObasStixCoreObjectSimulationsResultQuery = graphql` - query StixCoreObjectSimulationResultObasStixCoreObjectSimulationsResultQuery($id: ID!) { - obasStixCoreObjectSimulationsResult(id: $id) { - prevention { - unknown - success - failure - } - detection { - unknown - success - failure - } - human { - unknown - success - failure - } - } + query StixCoreObjectSimulationResultObasStixCoreObjectSimulationsResultQuery($id: ID!) { + obasStixCoreObjectSimulationsResult(id: $id) { + prevention { + unknown + success + failure + } + detection { + unknown + success + failure + } + human { + unknown + success + failure + } } + } `; const stixCoreObjectSimulationResultObasContainerGenerateScenarioMutation = graphql` - mutation StixCoreObjectSimulationResultObasContainerGenerateScenarioMutation($id: ID!, $interval: Int, $selection: Selection, $simulationType: SimulationType, $useAI: Boolean, $filters: FilterGroup) { - obasContainerGenerateScenario(id: $id, interval: $interval, selection: $selection, simulationType: $simulationType, useAI: $useAI, filters: $filters) - } + mutation StixCoreObjectSimulationResultObasContainerGenerateScenarioMutation($id: ID!, $interval: Int, $selection: Selection, $simulationType: SimulationType, $useAI: Boolean, $filters: FilterGroup) { + obasContainerGenerateScenario(id: $id, interval: $interval, selection: $selection, simulationType: $simulationType, useAI: $useAI, filters: $filters) + } `; const stixCoreObjectSimulationResultObasThreatGenerateScenarioMutation = graphql` - mutation StixCoreObjectSimulationResultObasThreatGenerateScenarioMutation($id: ID!, $interval: Int, $selection: Selection, $simulationType: SimulationType, $useAI: Boolean, $filters: FilterGroup) { - obasThreatGenerateScenario(id: $id, interval: $interval, selection: $selection, simulationType: $simulationType, useAI: $useAI, filters: $filters) - } + mutation StixCoreObjectSimulationResultObasThreatGenerateScenarioMutation($id: ID!, $interval: Int, $selection: Selection, $simulationType: SimulationType, $useAI: Boolean, $filters: FilterGroup) { + obasThreatGenerateScenario(id: $id, interval: $interval, selection: $selection, simulationType: $simulationType, useAI: $useAI, filters: $filters) + } `; const stixCoreObjectSimulationResultObasVictimGenerateScenarioMutation = graphql` - mutation StixCoreObjectSimulationResultObasVictimGenerateScenarioMutation($id: ID!, $interval: Int, $selection: Selection, $simulationType: SimulationType, $useAI: Boolean, $filters: FilterGroup) { - obasVictimGenerateScenario(id: $id, interval: $interval, selection: $selection, simulationType: $simulationType, useAI: $useAI, filters: $filters) - } + mutation StixCoreObjectSimulationResultObasVictimGenerateScenarioMutation($id: ID!, $interval: Int, $selection: Selection, $simulationType: SimulationType, $useAI: Boolean, $filters: FilterGroup) { + obasVictimGenerateScenario(id: $id, interval: $interval, selection: $selection, simulationType: $simulationType, useAI: $useAI, filters: $filters) + } `; const StixCoreObjectSimulationResult = ({ id, type }) => { @@ -214,7 +214,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { }); break; default: - // do nothing + // do nothing } }; const renderCharts = () => { @@ -225,77 +225,56 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { render={({ props }) => { const labels = [t_i18n('Unknown'), t_i18n('Success'), t_i18n('Failure')]; const chartColors = [theme.palette.action.disabled, theme.palette.success.main, theme.palette.error.main]; + const options = donutChartOptions( + theme, + labels, + 'bottom', + false, + chartColors, + false, + false, + true, + false, + 65, + ); if (props && props.obasStixCoreObjectSimulationsResult) { const { prevention, detection, human } = props.obasStixCoreObjectSimulationsResult; return (
- +
- +
- +
@@ -306,71 +285,38 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
- +
- +
- +
@@ -407,7 +353,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { label={t_i18n('Use AI')} control={ setUseGenAI(event.target.checked)} /> - } + } /> {t_i18n('Simulation type')} @@ -500,24 +446,24 @@ const StixCoreObjectSimulationResult = ({ id, type }) => { return ( <> {!oBasDisableDisplay && ( -
- - - - {renderCharts()} -
+
+ + + + {renderCharts()} +
)} { enableQuickSubscription={true} /> { replace={true} to={`/dashboard/events/incidents/${incidentId}/knowledge/overview`} /> - )} + )} /> { - } + } /> { - )} + )} /> { connectorsExport={connectorsForExport} entity={incident} /> - )} + )} /> { - )} + )} /> 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 343d42a97912..002456809fe9 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 @@ -143,6 +143,9 @@ const RootCampaign = ({ campaignId, queryRef }: RootCampaignProps) => { borderBottom: 1, borderColor: 'divider', marginBottom: 4, + display: 'flex', + justifyContent: 'space-between', + alignItem: 'center', }} >