Projects STRLCPY opencti Commits a2034cdf
🤬
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/common/stix_domain_objects/StixDomainObjectHeader.js
    skipped 6 lines
    7 7  import Typography from '@mui/material/Typography';
    8 8  import IconButton from '@mui/material/IconButton';
    9 9  import Slide from '@mui/material/Slide';
     10 +import Tooltip from '@mui/material/Tooltip';
    10 11  import { Add, Close, Delete } from '@mui/icons-material';
    11 12  import { DotsHorizontalCircleOutline } from 'mdi-material-ui';
    12 13  import Dialog from '@mui/material/Dialog';
    skipped 19 lines
    32 33  import StixCoreObjectEnrichment from '../stix_core_objects/StixCoreObjectEnrichment';
    33 34  import CommitMessage from '../form/CommitMessage';
    34 35  import StixCoreObjectSharing from '../stix_core_objects/StixCoreObjectSharing';
     36 +import { truncate } from '../../../../utils/String';
    35 37   
    36 38  const Transition = React.forwardRef((props, ref) => (
    37 39   <Slide direction="up" ref={ref} {...props} />
    skipped 238 lines
    276 278   disablePopover,
    277 279   enableReferences,
    278 280   disableSharing,
     281 + noAliases,
    279 282   } = this.props;
    280 283   const aliases = R.propOr(
    281 284   [],
    skipped 2 lines
    284 287   );
    285 288   return (
    286 289   <div>
    287  - <Typography
    288  - variant="h1"
    289  - gutterBottom={true}
    290  - classes={{ root: classes.title }}
    291  - >
    292  - {stixDomainObject.name}
    293  - </Typography>
     290 + <Tooltip title={stixDomainObject.name}>
     291 + <Typography
     292 + variant="h1"
     293 + gutterBottom={true}
     294 + classes={{ root: classes.title }}
     295 + >
     296 + {truncate(stixDomainObject.name, 80)}
     297 + </Typography>
     298 + </Tooltip>
    294 299   <Security needs={[KNOWLEDGE_KNUPDATE]}>
    295 300   <div className={classes.popover}>
    296 301   {React.cloneElement(PopoverComponent, {
    skipped 24 lines
    321 326   </FormControl>
    322 327   </div>
    323 328   )}
    324  - <div
    325  - className={classes.aliases}
    326  - style={{ marginLeft: typeof onViewAs === 'function' ? 10 : 0 }}
    327  - >
    328  - {R.take(5, aliases).map(
    329  - (label) => label.length > 0 && (
    330  - <Security
    331  - needs={[KNOWLEDGE_KNUPDATE]}
    332  - key={label}
    333  - placeholder={
    334  - <Chip classes={{ root: classes.alias }} label={label} />
    335  - }
    336  - >
    337  - <Chip
    338  - classes={{ root: classes.alias }}
    339  - label={label}
    340  - onDelete={
    341  - enableReferences
    342  - ? this.handleOpenCommitDelete.bind(this, label)
    343  - : this.deleteAlias.bind(this, label)
     329 + {!noAliases && (
     330 + <div
     331 + className={classes.aliases}
     332 + style={{ marginLeft: typeof onViewAs === 'function' ? 10 : 0 }}
     333 + >
     334 + {R.take(5, aliases).map(
     335 + (label) => label.length > 0 && (
     336 + <Security
     337 + needs={[KNOWLEDGE_KNUPDATE]}
     338 + key={label}
     339 + placeholder={
     340 + <Chip classes={{ root: classes.alias }} label={label} />
    344 341   }
    345  - />
    346  - </Security>
    347  - ),
    348  - )}
    349  - </div>
    350  - <Slide
    351  - direction="right"
    352  - in={this.state.openAlias}
    353  - mountOnEnter={true}
    354  - unmountOnExit={true}
    355  - >
    356  - <div style={{ float: 'left', marginTop: -5 }}>
    357  - <Formik
    358  - initialValues={{ new_alias: '' }}
    359  - onSubmit={this.onSubmitCreateAlias.bind(this, 'main')}
    360  - validationSchema={enableReferences ? aliasValidation(t) : null}
    361  - >
    362  - {({
    363  - submitForm,
    364  - isSubmitting,
    365  - validateForm,
    366  - setFieldValue,
    367  - values,
    368  - }) => (
    369  - <Form style={{ float: 'right' }}>
    370  - <Field
    371  - component={TextField}
    372  - variant="standard"
    373  - name="new_alias"
    374  - autoFocus={true}
    375  - placeholder={t('New alias')}
    376  - className={classes.aliasesInput}
    377  - onChange={this.handleChangeNewAlias.bind(this)}
    378  - value={this.state.newAlias}
    379  - onKeyDown={(e) => {
    380  - if (e.keyCode === 13) {
    381  - if (enableReferences && !this.state.openCommitCreate) {
    382  - return this.handleOpenCommitCreate();
    383  - }
    384  - return submitForm();
     342 + >
     343 + <Chip
     344 + classes={{ root: classes.alias }}
     345 + label={label}
     346 + onDelete={
     347 + enableReferences
     348 + ? this.handleOpenCommitDelete.bind(this, label)
     349 + : this.deleteAlias.bind(this, label)
    385 350   }
    386  - return true;
    387  - }}
    388  - />
    389  - {enableReferences && (
    390  - <CommitMessage
    391  - handleClose={this.openCommitCreate.bind(this)}
    392  - open={this.state.openCommitCreate}
    393  - submitForm={submitForm}
    394  - disabled={isSubmitting}
    395  - validateForm={validateForm}
    396  - setFieldValue={setFieldValue}
    397  - values={values}
    398  - id={stixDomainObject.id}
    399 351   />
    400  - )}
    401  - </Form>
    402  - )}
    403  - </Formik>
     352 + </Security>
     353 + ),
     354 + )}
    404 355   </div>
    405  - </Slide>
    406  - <Security needs={[KNOWLEDGE_KNUPDATE]}>
    407  - {aliases.length > 5 ? (
    408  - <IconButton
    409  - style={{ float: 'left', marginTop: -8 }}
    410  - color="primary"
    411  - aria-label="More"
    412  - onClick={this.handleToggleOpenAliases.bind(this)}
    413  - size="large"
    414  - >
    415  - <DotsHorizontalCircleOutline fontSize="small" />
    416  - </IconButton>
    417  - ) : (
    418  - <IconButton
    419  - style={{ float: 'left', marginTop: -8 }}
    420  - color={this.state.openAlias ? 'primary' : 'secondary'}
    421  - aria-label="Alias"
    422  - onClick={this.handleToggleCreateAlias.bind(this)}
    423  - size="large"
    424  - >
    425  - {this.state.openAlias ? (
    426  - <Close fontSize="small" color="primary" />
    427  - ) : (
    428  - <Add fontSize="small" />
    429  - )}
    430  - </IconButton>
    431  - )}
    432  - </Security>
     356 + )}
     357 + {!noAliases && (
     358 + <Slide
     359 + direction="right"
     360 + in={this.state.openAlias}
     361 + mountOnEnter={true}
     362 + unmountOnExit={true}
     363 + >
     364 + <div style={{ float: 'left', marginTop: -5 }}>
     365 + <Formik
     366 + initialValues={{ new_alias: '' }}
     367 + onSubmit={this.onSubmitCreateAlias.bind(this, 'main')}
     368 + validationSchema={enableReferences ? aliasValidation(t) : null}
     369 + >
     370 + {({
     371 + submitForm,
     372 + isSubmitting,
     373 + validateForm,
     374 + setFieldValue,
     375 + values,
     376 + }) => (
     377 + <Form style={{ float: 'right' }}>
     378 + <Field
     379 + component={TextField}
     380 + variant="standard"
     381 + name="new_alias"
     382 + autoFocus={true}
     383 + placeholder={t('New alias')}
     384 + className={classes.aliasesInput}
     385 + onChange={this.handleChangeNewAlias.bind(this)}
     386 + value={this.state.newAlias}
     387 + onKeyDown={(e) => {
     388 + if (e.keyCode === 13) {
     389 + if (
     390 + enableReferences
     391 + && !this.state.openCommitCreate
     392 + ) {
     393 + return this.handleOpenCommitCreate();
     394 + }
     395 + return submitForm();
     396 + }
     397 + return true;
     398 + }}
     399 + />
     400 + {enableReferences && (
     401 + <CommitMessage
     402 + handleClose={this.openCommitCreate.bind(this)}
     403 + open={this.state.openCommitCreate}
     404 + submitForm={submitForm}
     405 + disabled={isSubmitting}
     406 + validateForm={validateForm}
     407 + setFieldValue={setFieldValue}
     408 + values={values}
     409 + id={stixDomainObject.id}
     410 + />
     411 + )}
     412 + </Form>
     413 + )}
     414 + </Formik>
     415 + </div>
     416 + </Slide>
     417 + )}
     418 + {!noAliases && (
     419 + <Security needs={[KNOWLEDGE_KNUPDATE]}>
     420 + {aliases.length > 5 ? (
     421 + <IconButton
     422 + style={{ float: 'left', marginTop: -8 }}
     423 + color="primary"
     424 + aria-label="More"
     425 + onClick={this.handleToggleOpenAliases.bind(this)}
     426 + size="large"
     427 + >
     428 + <DotsHorizontalCircleOutline fontSize="small" />
     429 + </IconButton>
     430 + ) : (
     431 + <IconButton
     432 + style={{ float: 'left', marginTop: -8 }}
     433 + color={this.state.openAlias ? 'primary' : 'secondary'}
     434 + aria-label="Alias"
     435 + onClick={this.handleToggleCreateAlias.bind(this)}
     436 + size="large"
     437 + >
     438 + {this.state.openAlias ? (
     439 + <Close fontSize="small" color="primary" />
     440 + ) : (
     441 + <Add fontSize="small" />
     442 + )}
     443 + </IconButton>
     444 + )}
     445 + </Security>
     446 + )}
    433 447   <div className={classes.actions}>
    434 448   <ToggleButtonGroup size="small" color="secondary" exclusive={true}>
    435 449   {disableSharing !== true && (
    skipped 6 lines
    442 456   </ToggleButtonGroup>
    443 457   </div>
    444 458   <div className="clearfix" />
    445  - <Dialog
    446  - PaperProps={{ elevation: 1 }}
    447  - open={this.state.openAliases}
    448  - TransitionComponent={Transition}
    449  - onClose={this.handleToggleOpenAliases.bind(this)}
    450  - fullWidth={true}
    451  - >
    452  - <DialogTitle>
    453  - {t('Entity aliases')}
    454  - <Formik
    455  - initialValues={{ new_alias: '' }}
    456  - onSubmit={this.onSubmitCreateAlias.bind(this, 'dialog')}
    457  - validationSchema={enableReferences ? aliasValidation(t) : null}
    458  - >
    459  - {({
    460  - submitForm,
    461  - isSubmitting,
    462  - validateForm,
    463  - setFieldValue,
    464  - values,
    465  - }) => (
    466  - <Form style={{ float: 'right' }}>
    467  - <Field
    468  - component={TextField}
    469  - variant="standard"
    470  - name="new_alias"
    471  - autoFocus={true}
    472  - placeholder={t('New alias')}
    473  - className={classes.aliasesInput}
    474  - onChange={this.handleChangeNewAlias.bind(this)}
    475  - value={this.state.newAlias}
    476  - onKeyDown={(e) => {
    477  - if (e.keyCode === 13) {
    478  - if (enableReferences) {
    479  - return this.handleOpenCommitCreate();
    480  - }
    481  - return submitForm();
    482  - }
    483  - return true;
    484  - }}
    485  - />
    486  - {enableReferences && (
    487  - <CommitMessage
    488  - handleClose={this.handleCloseCommitCreate.bind(this)}
    489  - open={this.state.openCommitCreate}
    490  - submitForm={submitForm}
    491  - disabled={isSubmitting}
    492  - validateForm={validateForm}
    493  - setFieldValue={setFieldValue}
    494  - values={values}
    495  - id={stixDomainObject.id}
    496  - />
    497  - )}
    498  - </Form>
    499  - )}
    500  - </Formik>
    501  - </DialogTitle>
    502  - <DialogContent dividers={true}>
    503  - <List>
    504  - {R.propOr(
    505  - [],
    506  - isOpenctiAlias ? 'x_opencti_aliases' : 'aliases',
    507  - stixDomainObject,
    508  - ).map(
    509  - (label) => label.length > 0 && (
    510  - <ListItem key={label} disableGutters={true} dense={true}>
    511  - <ListItemText primary={label} />
    512  - <ListItemSecondaryAction>
    513  - <IconButton
    514  - edge="end"
    515  - aria-label="delete"
    516  - onClick={
    517  - enableReferences
    518  - ? this.handleOpenCommitDelete.bind(this, label)
    519  - : this.deleteAlias.bind(this, label)
    520  - }
    521  - size="large"
    522  - >
    523  - <Delete />
    524  - </IconButton>
    525  - </ListItemSecondaryAction>
    526  - </ListItem>
    527  - ),
    528  - )}
    529  - </List>
    530  - <div
    531  - style={{
    532  - display: this.state.openAliasesCreate ? 'block' : 'none',
    533  - }}
    534  - >
     459 + {!noAliases && (
     460 + <Dialog
     461 + PaperProps={{ elevation: 1 }}
     462 + open={this.state.openAliases}
     463 + TransitionComponent={Transition}
     464 + onClose={this.handleToggleOpenAliases.bind(this)}
     465 + fullWidth={true}
     466 + >
     467 + <DialogTitle>
     468 + {t('Entity aliases')}
    535 469   <Formik
    536 470   initialValues={{ new_alias: '' }}
    537 471   onSubmit={this.onSubmitCreateAlias.bind(this, 'dialog')}
    skipped 6 lines
    544 478   setFieldValue,
    545 479   values,
    546 480   }) => (
    547  - <Form>
     481 + <Form style={{ float: 'right' }}>
    548 482   <Field
    549 483   component={TextField}
    550 484   variant="standard"
    551 485   name="new_alias"
    552 486   autoFocus={true}
    553  - fullWidth={true}
    554  - placeholder={t('New aliases')}
     487 + placeholder={t('New alias')}
    555 488   className={classes.aliasesInput}
    556 489   onChange={this.handleChangeNewAlias.bind(this)}
    557 490   value={this.state.newAlias}
    558 491   onKeyDown={(e) => {
    559 492   if (e.keyCode === 13) {
    560  - if (
    561  - enableReferences
    562  - && !this.state.openCommitCreate
    563  - ) {
     493 + if (enableReferences) {
    564 494   return this.handleOpenCommitCreate();
    565 495   }
    566 496   return submitForm();
    skipped 16 lines
    583 513   </Form>
    584 514   )}
    585 515   </Formik>
    586  - </div>
    587  - </DialogContent>
    588  - <DialogActions>
    589  - <Button
    590  - onClick={this.handleToggleOpenAliases.bind(this)}
    591  - color="primary"
    592  - >
    593  - {t('Close')}
    594  - </Button>
    595  - </DialogActions>
    596  - </Dialog>
     516 + </DialogTitle>
     517 + <DialogContent dividers={true}>
     518 + <List>
     519 + {R.propOr(
     520 + [],
     521 + isOpenctiAlias ? 'x_opencti_aliases' : 'aliases',
     522 + stixDomainObject,
     523 + ).map(
     524 + (label) => label.length > 0 && (
     525 + <ListItem key={label} disableGutters={true} dense={true}>
     526 + <ListItemText primary={label} />
     527 + <ListItemSecondaryAction>
     528 + <IconButton
     529 + edge="end"
     530 + aria-label="delete"
     531 + onClick={
     532 + enableReferences
     533 + ? this.handleOpenCommitDelete.bind(this, label)
     534 + : this.deleteAlias.bind(this, label)
     535 + }
     536 + size="large"
     537 + >
     538 + <Delete />
     539 + </IconButton>
     540 + </ListItemSecondaryAction>
     541 + </ListItem>
     542 + ),
     543 + )}
     544 + </List>
     545 + <div
     546 + style={{
     547 + display: this.state.openAliasesCreate ? 'block' : 'none',
     548 + }}
     549 + >
     550 + <Formik
     551 + initialValues={{ new_alias: '' }}
     552 + onSubmit={this.onSubmitCreateAlias.bind(this, 'dialog')}
     553 + validationSchema={
     554 + enableReferences ? aliasValidation(t) : null
     555 + }
     556 + >
     557 + {({
     558 + submitForm,
     559 + isSubmitting,
     560 + validateForm,
     561 + setFieldValue,
     562 + values,
     563 + }) => (
     564 + <Form>
     565 + <Field
     566 + component={TextField}
     567 + variant="standard"
     568 + name="new_alias"
     569 + autoFocus={true}
     570 + fullWidth={true}
     571 + placeholder={t('New aliases')}
     572 + className={classes.aliasesInput}
     573 + onChange={this.handleChangeNewAlias.bind(this)}
     574 + value={this.state.newAlias}
     575 + onKeyDown={(e) => {
     576 + if (e.keyCode === 13) {
     577 + if (
     578 + enableReferences
     579 + && !this.state.openCommitCreate
     580 + ) {
     581 + return this.handleOpenCommitCreate();
     582 + }
     583 + return submitForm();
     584 + }
     585 + return true;
     586 + }}
     587 + />
     588 + {enableReferences && (
     589 + <CommitMessage
     590 + handleClose={this.handleCloseCommitCreate.bind(this)}
     591 + open={this.state.openCommitCreate}
     592 + submitForm={submitForm}
     593 + disabled={isSubmitting}
     594 + validateForm={validateForm}
     595 + setFieldValue={setFieldValue}
     596 + values={values}
     597 + id={stixDomainObject.id}
     598 + />
     599 + )}
     600 + </Form>
     601 + )}
     602 + </Formik>
     603 + </div>
     604 + </DialogContent>
     605 + <DialogActions>
     606 + <Button
     607 + onClick={this.handleToggleOpenAliases.bind(this)}
     608 + color="primary"
     609 + >
     610 + {t('Close')}
     611 + </Button>
     612 + </DialogActions>
     613 + </Dialog>
     614 + )}
    597 615   {enableReferences && (
    598 616   <Formik
    599 617   initialValues={{}}
    skipped 38 lines
    638 656   onViewAs: PropTypes.func,
    639 657   disablePopover: PropTypes.bool,
    640 658   isOpenctiAlias: PropTypes.bool,
     659 + noAliases: PropTypes.bool,
    641 660   enableReferences: PropTypes.bool,
    642 661  };
    643 662   
    skipped 2 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/common/stix_domain_objects/StixDomainObjectOverview.js
    skipped 113 lines
    114 114   <Paper classes={{ root: classes.paper }} variant="outlined">
    115 115   <Grid container={true} spacing={3}>
    116 116   <Grid item={true} xs={6}>
    117  - {withPattern && (
     117 + {stixDomainObject.objectMarking && (
    118 118   <div>
    119 119   <Typography variant="h3" gutterBottom={true}>
    120  - {t('Pattern type')}
    121  - </Typography>
    122  - <ItemPatternType label={stixDomainObject.pattern_type} />
    123  - </div>
    124  - )}
    125  - {!withoutMarking && stixDomainObject.objectMarking && (
    126  - <div>
    127  - <Typography
    128  - variant="h3"
    129  - gutterBottom={true}
    130  - style={{ marginTop: withPattern ? 20 : 0 }}
    131  - >
    132 120   {t('Marking')}
    133 121   </Typography>
    134 122   <ItemMarkings
    skipped 46 lines
    181 169   {fldt(stixDomainObject.modified)}
    182 170   </Grid>
    183 171   <Grid item={true} xs={6}>
    184  - <Typography variant="h3" gutterBottom={true}>
     172 + {withPattern && (
     173 + <div>
     174 + <Typography variant="h3" gutterBottom={true}>
     175 + {t('Pattern type')}
     176 + </Typography>
     177 + <ItemPatternType label={stixDomainObject.pattern_type} />
     178 + </div>
     179 + )}
     180 + <Typography
     181 + variant="h3"
     182 + gutterBottom={true}
     183 + style={{ marginTop: withPattern ? 20 : 0 }}
     184 + >
    185 185   {t('Processing status')}
    186 186   </Typography>
    187 187   <ItemStatus
    skipped 141 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/observations/indicators/Indicator.js
    skipped 12 lines
    13 13  import StixDomainObjectOverview from '../../common/stix_domain_objects/StixDomainObjectOverview';
    14 14  import StixCoreObjectExternalReferences from '../../analysis/external_references/StixCoreObjectExternalReferences';
    15 15  import StixCoreObjectLatestHistory from '../../common/stix_core_objects/StixCoreObjectLatestHistory';
    16  -import IndicatorHeader from './IndicatorHeader';
    17 16  import SimpleStixObjectOrStixRelationshipStixCoreRelationships from '../../common/stix_core_relationships/SimpleStixObjectOrStixRelationshipStixCoreRelationships';
     17 +import StixDomainObjectHeader from '../../common/stix_domain_objects/StixDomainObjectHeader';
     18 +import IndicatorPopover from './IndicatorPopover';
    18 19   
    19 20  const styles = () => ({
    20 21   container: {
    skipped 9 lines
    30 31   const { classes, indicator } = this.props;
    31 32   return (
    32 33   <div className={classes.container}>
    33  - <IndicatorHeader indicator={indicator} />
     34 + <StixDomainObjectHeader
     35 + stixDomainObject={indicator}
     36 + PopoverComponent={<IndicatorPopover />}
     37 + noAliases={true}
     38 + />
    34 39   <Grid
    35 40   container={true}
    36 41   spacing={3}
    skipped 2 lines
    39 44   <Grid item={true} xs={6} style={{ paddingTop: 10 }}>
    40 45   <StixDomainObjectOverview
    41 46   stixDomainObject={indicator}
    42  - withoutMarking={true}
    43 47   withPattern={true}
    44 48   />
    45 49   </Grid>
    skipped 112 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/observations/indicators/IndicatorHeader.js
    1  -import React, { Component } from 'react';
    2  -import * as PropTypes from 'prop-types';
    3  -import { compose, pathOr } from 'ramda';
    4  -import { graphql, createFragmentContainer } from 'react-relay';
    5  -import withStyles from '@mui/styles/withStyles';
    6  -import Typography from '@mui/material/Typography';
    7  -import ItemMarking from '../../../../components/ItemMarking';
    8  -import IndicatorPopover from './IndicatorPopover';
    9  -import { truncate } from '../../../../utils/String';
    10  -import StixCoreObjectEnrichment from '../../common/stix_core_objects/StixCoreObjectEnrichment';
    11  - 
    12  -const styles = () => ({
    13  - title: {
    14  - float: 'left',
    15  - textTransform: 'uppercase',
    16  - },
    17  - popover: {
    18  - float: 'left',
    19  - marginTop: '-13px',
    20  - },
    21  - marking: {
    22  - float: 'right',
    23  - overflowX: 'hidden',
    24  - },
    25  -});
    26  - 
    27  -class IndicatorHeaderComponent extends Component {
    28  - render() {
    29  - const { classes, variant, indicator } = this.props;
    30  - return (
    31  - <div>
    32  - <Typography
    33  - variant="h1"
    34  - gutterBottom={true}
    35  - classes={{ root: classes.title }}
    36  - >
    37  - {truncate(indicator.name, 50)}
    38  - </Typography>
    39  - <div className={classes.popover}>
    40  - <IndicatorPopover indicatorId={indicator.id} />
    41  - </div>
    42  - <StixCoreObjectEnrichment stixCoreObjectId={indicator.id} />
    43  - {variant !== 'noMarking' && (
    44  - <div className={classes.marking}>
    45  - {pathOr([], ['objectMarking', 'edges'], indicator).map(
    46  - (markingDefinition) => (
    47  - <ItemMarking
    48  - key={markingDefinition.node.id}
    49  - label={markingDefinition.node.definition}
    50  - color={markingDefinition.node.x_opencti_color}
    51  - />
    52  - ),
    53  - )}
    54  - </div>
    55  - )}
    56  - <div className="clearfix" />
    57  - </div>
    58  - );
    59  - }
    60  -}
    61  - 
    62  -IndicatorHeaderComponent.propTypes = {
    63  - indicator: PropTypes.object,
    64  - variant: PropTypes.string,
    65  - classes: PropTypes.object,
    66  -};
    67  - 
    68  -const IndicatorHeader = createFragmentContainer(IndicatorHeaderComponent, {
    69  - indicator: graphql`
    70  - fragment IndicatorHeader_indicator on Indicator {
    71  - id
    72  - entity_type
    73  - name
    74  - objectMarking {
    75  - edges {
    76  - node {
    77  - id
    78  - definition
    79  - x_opencti_color
    80  - }
    81  - }
    82  - }
    83  - }
    84  - `,
    85  -});
    86  - 
    87  -export default compose(withStyles(styles))(IndicatorHeader);
    88  - 
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/observations/indicators/IndicatorPopover.js
    skipped 86 lines
    87 87   commitMutation({
    88 88   mutation: IndicatorPopoverDeletionMutation,
    89 89   variables: {
    90  - id: this.props.indicatorId,
     90 + id: this.props.id,
    91 91   },
    92 92   onCompleted: () => {
    93 93   this.setState({ deleting: false });
    skipped 13 lines
    107 107   }
    108 108   
    109 109   render() {
    110  - const { classes, t, indicatorId } = this.props;
     110 + const { classes, t, id } = this.props;
    111 111   return (
    112 112   <div className={classes.container}>
    113 113   <IconButton
    skipped 56 lines
    170 170   >
    171 171   <QueryRenderer
    172 172   query={indicatorEditionQuery}
    173  - variables={{ id: indicatorId }}
     173 + variables={{ id }}
    174 174   render={({ props }) => {
    175 175   if (props) {
    176 176   return (
    skipped 13 lines
    190 190  }
    191 191   
    192 192  IndicatorPopover.propTypes = {
    193  - indicatorId: PropTypes.string,
     193 + id: PropTypes.string,
    194 194   classes: PropTypes.object,
    195 195   t: PropTypes.func,
    196 196   history: PropTypes.object,
    skipped 8 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/observations/indicators/Root.js
    skipped 10 lines
    11 11  import Indicator from './Indicator';
    12 12  import Loader from '../../../../components/Loader';
    13 13  import StixCoreObjectHistory from '../../common/stix_core_objects/StixCoreObjectHistory';
    14  -import IndicatorHeader from './IndicatorHeader';
    15 14  import EntityStixSightingRelationships from '../../events/stix_sighting_relationships/EntityStixSightingRelationships';
    16 15  import IndicatorEntities from './IndicatorEntities';
    17 16  import ErrorNotFound from '../../../../components/ErrorNotFound';
    18 17  import StixSightingRelationship from '../../events/stix_sighting_relationships/StixSightingRelationship';
    19 18  import FileManager from '../../common/files/FileManager';
     19 +import StixDomainObjectHeader from '../../common/stix_domain_objects/StixDomainObjectHeader';
     20 +import IndicatorPopover from './IndicatorPopover';
    20 21   
    21 22  const subscription = graphql`
    22 23   subscription RootIndicatorSubscription($id: ID!) {
    skipped 87 lines
    110 111   path="/dashboard/observations/indicators/:indicatorId/sightings"
    111 112   render={(routeProps) => (
    112 113   <React.Fragment>
    113  - <IndicatorHeader indicator={props.indicator} />
     114 + <StixDomainObjectHeader
     115 + stixDomainObject={props.indicator}
     116 + PopoverComponent={<IndicatorPopover />}
     117 + enableReferences={props.settings.platform_enable_reference?.includes(
     118 + 'Indicator',
     119 + )}
     120 + noAliases={true}
     121 + />
    114 122   <EntityStixSightingRelationships
    115 123   {...routeProps}
    116 124   entityId={indicatorId}
    skipped 16 lines
    133 141   path="/dashboard/observations/indicators/:indicatorId/files"
    134 142   render={(routeProps) => (
    135 143   <React.Fragment>
    136  - <IndicatorHeader indicator={props.indicator} />
     144 + <StixDomainObjectHeader
     145 + stixDomainObject={props.indicator}
     146 + PopoverComponent={<IndicatorPopover />}
     147 + enableReferences={props.settings.platform_enable_reference?.includes(
     148 + 'Indicator',
     149 + )}
     150 + noAliases={true}
     151 + />
    137 152   <FileManager
    138 153   {...routeProps}
    139 154   id={indicatorId}
    skipped 9 lines
    149 164   path="/dashboard/observations/indicators/:indicatorId/history"
    150 165   render={(routeProps) => (
    151 166   <React.Fragment>
    152  - <IndicatorHeader indicator={props.indicator} />
     167 + <StixDomainObjectHeader
     168 + stixDomainObject={props.indicator}
     169 + PopoverComponent={<IndicatorPopover />}
     170 + enableReferences={props.settings.platform_enable_reference?.includes(
     171 + 'Indicator',
     172 + )}
     173 + noAliases={true}
     174 + />
    153 175   <StixCoreObjectHistory
    154 176   {...routeProps}
    155 177   stixCoreObjectId={indicatorId}
    skipped 6 lines
    162 184   path="/dashboard/observations/indicators/:indicatorId/knowledge"
    163 185   render={(routeProps) => (
    164 186   <React.Fragment>
    165  - <IndicatorHeader indicator={props.indicator} />
     187 + <StixDomainObjectHeader
     188 + stixDomainObject={props.indicator}
     189 + PopoverComponent={<IndicatorPopover />}
     190 + enableReferences={props.settings.platform_enable_reference?.includes(
     191 + 'Indicator',
     192 + )}
     193 + noAliases={true}
     194 + />
    166 195   <IndicatorEntities
    167 196   {...routeProps}
    168 197   indicatorId={indicatorId}
    skipped 6 lines
    175 204   path="/dashboard/observations/indicators/:indicatorId/knowledge/relations/:relationId"
    176 205   render={(routeProps) => (
    177 206   <React.Fragment>
    178  - <IndicatorHeader indicator={props.indicator} />
     207 + <StixDomainObjectHeader
     208 + stixDomainObject={props.indicator}
     209 + PopoverComponent={<IndicatorPopover />}
     210 + enableReferences={props.settings.platform_enable_reference?.includes(
     211 + 'Indicator',
     212 + )}
     213 + noAliases={true}
     214 + />
    179 215   <StixCoreRelationship
    180 216   entityId={indicatorId}
    181 217   {...routeProps}
    skipped 6 lines
    188 224   path="/dashboard/observations/indicators/:indicatorId/knowledge/sightings/:sightingId"
    189 225   render={(routeProps) => (
    190 226   <React.Fragment>
    191  - <IndicatorHeader indicator={props.indicator} />
     227 + <StixDomainObjectHeader
     228 + stixDomainObject={props.indicator}
     229 + PopoverComponent={<IndicatorPopover />}
     230 + enableReferences={props.settings.platform_enable_reference?.includes(
     231 + 'Indicator',
     232 + )}
     233 + noAliases={true}
     234 + />
    192 235   <StixSightingRelationship
    193 236   entityId={indicatorId}
    194 237   {...routeProps}
    skipped 25 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/schema/relay.schema.graphql
    skipped 1752 lines
    1753 1753   valid_from
    1754 1754   valid_until
    1755 1755   pattern_type
     1756 + indicator_types
    1756 1757   x_opencti_main_observable_type
    1757 1758   report_types
    1758 1759   context
    skipped 94 lines
    1853 1854   valid_from
    1854 1855   valid_until
    1855 1856   pattern_type
     1857 + indicator_types
    1856 1858   x_opencti_main_observable_type
    1857 1859   report_types
    1858 1860   context
    skipped 1586 lines
    3445 3447  enum IndicatorsFilter {
    3446 3448   name
    3447 3449   pattern_type
     3450 + indicator_types
    3448 3451   pattern_version
    3449 3452   pattern
    3450 3453   x_opencti_main_observable_type
    skipped 5070 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-graphql/src/generated/graphql.ts
    skipped 5527 lines
    5528 5528   CreatedBy = 'createdBy',
    5529 5529   CreatedAt = 'created_at',
    5530 5530   Indicates = 'indicates',
     5531 + IndicatorTypes = 'indicator_types',
    5531 5532   LabelledBy = 'labelledBy',
    5532 5533   MarkedBy = 'markedBy',
    5533 5534   Modified = 'modified',
    skipped 8919 lines
    14453 14454   EntityType = 'entity_type',
    14454 14455   HasExternalReference = 'hasExternalReference',
    14455 14456   Indicates = 'indicates',
     14457 + IndicatorTypes = 'indicator_types',
    14456 14458   LabelledBy = 'labelledBy',
    14457 14459   MarkedBy = 'markedBy',
    14458 14460   Modified = 'modified',
    skipped 886 lines
    15345 15347   EntityType = 'entity_type',
    15346 15348   HasExternalReference = 'hasExternalReference',
    15347 15349   Indicates = 'indicates',
     15350 + IndicatorTypes = 'indicator_types',
    15348 15351   LabelledBy = 'labelledBy',
    15349 15352   MarkedBy = 'markedBy',
    15350 15353   Modified = 'modified',
    skipped 10874 lines
Please wait...
Page is in error, reload to recover