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] In Observable / Indicators composed with this observable view, fix the css(#9279) #9391

Merged
merged 5 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import ListItemText from '@mui/material/ListItemText';
import { graphql } from 'react-relay';
import Skeleton from '@mui/material/Skeleton';
import * as R from 'ramda';
import { truncate } from '../../../../utils/String';
import ItemIcon from '../../../../components/ItemIcon';
import { deleteNodeFromEdge } from '../../../../utils/store';
import { useFormatter } from '../../../../components/i18n';
Expand Down Expand Up @@ -333,13 +332,9 @@ const StixCoreRelationshipCreationFromEntityList = ({
.filter((edge) => edge.node.id !== entity.id)
.map((edge) => edge.node);

const defaultDescription = (data) => truncate(
// eslint-disable-next-line no-nested-ternary
data.parent_types.includes('Stix-Cyber-Observable')
? data.x_opencti_description
: data.description,
120,
);
const defaultDescription = (data) => (data.parent_types.includes('Stix-Cyber-Observable')
? data.x_opencti_description
: data.description);

return (
<>
Expand Down Expand Up @@ -393,6 +388,14 @@ const StixCoreRelationshipCreationFromEntityList = ({
<ListItemText
primary={node.name}
secondary={defaultDescription(node)}
sx={{
'.MuiListItemText-primary, .MuiListItemText-secondary': {
overflowX: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
marginRight: '20px',
},
}}
/>
</ListItem>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const useStyles = makeStyles<Theme>((theme) => ({
createButtonContextual: {
position: 'fixed',
bottom: 30,
right: 100,
right: 30,
transition: theme.transitions.create('right', {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class StixCyberObservableAddIndicators extends Component {
size="large"
color="primary"
>
<Close fontSize="small" color="primary" />
<Close fontSize="small" color="primary"/>
</IconButton>
<Typography variant="h6" classes={{ root: classes.title }}>
{t('Add indicators')}
Expand Down Expand Up @@ -134,8 +134,14 @@ class StixCyberObservableAddIndicators extends Component {
}}
/>
</div>
<div className={classes.createButton}>
<IndicatorCreation
display={open}
contextual
paginationOptions={paginationOptions}
/>
</div>
</Drawer>
<IndicatorCreation display={open} contextual paginationOptions={paginationOptions} />
</>
);
}
Expand Down
Loading