Projects STRLCPY opencti Commits d1aa060f
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/components/StixItemMarkings.js
    skipped 78 lines
    79 79   return (
    80 80   <div>
    81 81   {markings.map((markingDefinition) => {
    82  - let def = markingDefinition.name;
    83  - if (!def) {
    84  - if (markingDefinition.definition) {
    85  - const definition = R.toPairs(markingDefinition.definition);
    86  - if (definition[0]) {
    87  - if (definition[0][1].includes(':')) {
    88  - // eslint-disable-next-line prefer-destructuring
    89  - def = definition[0][1];
    90  - } else {
    91  - def = `${definition[0][0]}:${definition[0][1]}`;
    92  - }
    93  - } else {
    94  - def = 'Unknown';
    95  - }
    96  - }
    97  - }
    98  - const label = truncate(def, 20);
     82 + const label = truncate(
     83 + markingDefinition.name || markingDefinition.definition,
     84 + 20,
     85 + );
    99 86   if (markingDefinition.x_opencti_color) {
    100 87   let backgroundColor = markingDefinition.x_opencti_color;
    101 88   let textColor = theme.palette.text.primary;
    skipped 11 lines
    113 100   }
    114 101   return (
    115 102   <Chip
    116  - key={label}
     103 + key={markingDefinition.name || markingDefinition.definition}
    117 104   className={className}
    118 105   style={{
    119 106   backgroundColor,
    skipped 8 lines
    128 115   if (theme.palette.mode === 'light') {
    129 116   inlineStyles = inlineStylesLight;
    130 117   }
    131  - switch (def) {
     118 + switch (markingDefinition.name || markingDefinition.definition) {
    132 119   case 'CD':
    133 120   case 'CD-SF':
    134 121   case 'DR':
    skipped 1 lines
    136 123   case 'TLP:RED':
    137 124   return (
    138 125   <Chip
    139  - key={def}
     126 + key={markingDefinition.name || markingDefinition.definition}
    140 127   className={className}
    141 128   style={inlineStyles.red}
    142 129   label={label}
    skipped 2 lines
    145 132   case 'TLP:AMBER':
    146 133   return (
    147 134   <Chip
    148  - key={def}
     135 + key={markingDefinition.name || markingDefinition.definition}
    149 136   className={className}
    150 137   style={inlineStyles.orange}
    151 138   label={label}
    skipped 3 lines
    155 142   case 'TLP:GREEN':
    156 143   return (
    157 144   <Chip
    158  - key={def}
     145 + key={markingDefinition.name || markingDefinition.definition}
    159 146   className={className}
    160 147   style={inlineStyles.green}
    161 148   label={label}
    skipped 2 lines
    164 151   case 'SF':
    165 152   return (
    166 153   <Chip
    167  - key={def}
     154 + key={markingDefinition.name || markingDefinition.definition}
    168 155   className={className}
    169 156   style={inlineStyles.blue}
    170 157   label={label}
    skipped 2 lines
    173 160   default:
    174 161   return (
    175 162   <Chip
    176  - key={def}
     163 + key={markingDefinition.name || markingDefinition.definition}
    177 164   className={className}
    178 165   style={inlineStyles.white}
    179 166   label={label}
    skipped 18 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/analysis/groupings/Root.js
    skipped 107 lines
    108 108   <ContainerHeader
    109 109   container={props.grouping}
    110 110   PopoverComponent={<GroupingPopover />}
     111 + marginRight={260}
    111 112   />
    112 113   <ContainerStixDomainObjects
    113 114   {...routeProps}
    skipped 10 lines
    124 125   <ContainerHeader
    125 126   container={props.grouping}
    126 127   PopoverComponent={<GroupingPopover />}
     128 + marginRight={260}
    127 129   />
    128 130   <ContainerStixCyberObservables
    129 131   {...routeProps}
    skipped 67 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/analysis/reports/Root.js
    skipped 109 lines
    110 110   <ContainerHeader
    111 111   container={props.report}
    112 112   PopoverComponent={<ReportPopover />}
     113 + disableSharing={true}
    113 114   />
    114 115   <ContainerStixDomainObjects
    115 116   {...routeProps}
    skipped 10 lines
    126 127   <ContainerHeader
    127 128   container={props.report}
    128 129   PopoverComponent={<ReportPopover />}
     130 + disableSharing={true}
    129 131   />
    130 132   <ContainerStixCyberObservables
    131 133   {...routeProps}
    skipped 19 lines
    151 153   <ContainerHeader
    152 154   container={props.report}
    153 155   PopoverComponent={<ReportPopover />}
     156 + disableSharing={true}
    154 157   />
    155 158   <StixDomainObjectContent
    156 159   {...routeProps}
    skipped 58 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/arsenal/attack_patterns/Root.js
    skipped 168 lines
    169 169   <StixDomainObjectHeader
    170 170   stixDomainObject={props.attackPattern}
    171 171   PopoverComponent={<AttackPatternPopover />}
    172  - variant="noaliases"
    173 172   />
    174 173   <StixDomainObjectIndicators
    175 174   {...routeProps}
    skipped 72 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/arsenal/channels/Root.js
    skipped 172 lines
    173 173   <StixDomainObjectHeader
    174 174   stixDomainObject={props.channel}
    175 175   PopoverComponent={<ChannelPopover />}
    176  - variant="noaliases"
    177 176   />
    178 177   <StixDomainObjectIndicators
    179 178   {...routeProps}
    skipped 68 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/arsenal/malwares/Root.js
    skipped 174 lines
    175 175   <StixDomainObjectHeader
    176 176   stixDomainObject={props.malware}
    177 177   PopoverComponent={<MalwarePopover />}
    178  - variant="noaliases"
    179 178   />
    180 179   <StixDomainObjectIndicators
    181 180   {...routeProps}
    skipped 75 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/arsenal/narratives/Root.js
    skipped 171 lines
    172 172   <StixDomainObjectHeader
    173 173   stixDomainObject={props.narrative}
    174 174   PopoverComponent={<NarrativePopover />}
    175  - variant="noaliases"
    176 175   />
    177 176   <StixDomainObjectIndicators
    178 177   {...routeProps}
    skipped 68 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/arsenal/tools/Root.js
    skipped 165 lines
    166 166   <StixDomainObjectHeader
    167 167   stixDomainObject={props.tool}
    168 168   PopoverComponent={<ToolPopover />}
    169  - variant="noaliases"
    170 169   />
    171 170   <StixDomainObjectIndicators
    172 171   {...routeProps}
    skipped 68 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/arsenal/vulnerabilities/Root.js
    skipped 171 lines
    172 172   <StixDomainObjectHeader
    173 173   stixDomainObject={props.vulnerability}
    174 174   PopoverComponent={<VulnerabilityPopover />}
    175  - variant="noaliases"
    176 175   />
    177 176   <StixDomainObjectIndicators
    178 177   {...routeProps}
    skipped 68 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/common/files/workbench/WorkbenchFileContent.js
    skipped 376 lines
    377 377   'location',
    378 378   ].filter((n) => !typesContainers.includes(n));
    379 379   const scoTypes = observableTypes.edges.map((n) => convertToStixType(n.node.id));
    380  - const stixDomainObjects = objects.filter((n) => sdoTypes.includes(n.type));
     380 + const stixDomainObjects = objects
     381 + .filter((n) => sdoTypes.includes(n.type))
     382 + .map((n) => (typeof n.definition === 'object' && !n.name
     383 + ? { ...n, name: R.toPairs(n.definition)[0][1] }
     384 + : n));
    381 385   const stixCyberObservables = objects.filter((n) => scoTypes.includes(n.type));
    382 386   const stixCoreRelationships = objects.filter(
    383 387   (n) => n.type === 'relationship',
    skipped 113 lines
    497 501   .map((n) => {
    498 502   const marking = this.findEntityById(n);
    499 503   if (marking) {
    500  - let label = truncate(marking.name, 20);
    501  - if (!label) {
    502  - if (marking.definition) {
    503  - const definition = R.toPairs(marking.definition);
    504  - if (definition[0]) {
    505  - if (definition[0][1].includes(':')) {
    506  - label = truncate(definition[0][1], 20);
    507  - } else {
    508  - label = truncate(
    509  - `${definition[0][0]}:${definition[0][1]}`,
    510  - 20,
    511  - );
    512  - }
    513  - } else {
    514  - label = 'Unknown';
    515  - }
    516  - }
    517  - }
    518 504   return {
    519  - label,
     505 + label: marking.name || marking.definition,
    520 506   value: marking.id,
    521 507   entity: marking,
    522 508   };
    skipped 19 lines
    542 528   (n) => ({
    543 529   ...n,
    544 530   id: n.standard_id || n.id,
     531 + name: n.name || n.definition,
    545 532   type: 'marking-definition',
    546 533   }),
    547 534   );
    skipped 867 lines
    1415 1402   (n) => ({
    1416 1403   ...n,
    1417 1404   id: n.standard_id || n.id,
     1405 + name: n.name || n.definition,
    1418 1406   type: 'marking-definition',
    1419 1407   }),
    1420 1408   );
    skipped 369 lines
    1790 1778   (n) => ({
    1791 1779   ...n,
    1792 1780   id: n.standard_id || n.id,
     1781 + name: n.name || n.definition,
    1793 1782   type: 'marking-definition',
    1794 1783   }),
    1795 1784   );
    skipped 326 lines
    2122 2111   (n) => ({
    2123 2112   ...n,
    2124 2113   id: n.standard_id || n.id,
     2114 + name: n.name || n.definition,
    2125 2115   type: 'marking-definition',
    2126 2116   }),
    2127 2117   );
    skipped 572 lines
    2700 2690   (n) => ({
    2701 2691   ...n,
    2702 2692   id: n.standard_id || n.id,
     2693 + name: n.name || n.definition,
    2703 2694   type: 'marking-definition',
    2704 2695   }),
    2705 2696   );
    skipped 1375 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/common/stix_domain_objects/StixDomainObjectHeader.js
    skipped 267 lines
    268 268   const {
    269 269   t,
    270 270   classes,
    271  - variant,
    272 271   stixDomainObject,
    273 272   isOpenctiAlias,
    274 273   PopoverComponent,
    skipped 47 lines
    322 321   </FormControl>
    323 322   </div>
    324 323   )}
    325  - {variant !== 'noaliases' && (
    326  - <div
    327  - className={classes.aliases}
    328  - style={{ marginLeft: typeof onViewAs === 'function' ? 10 : 0 }}
    329  - >
    330  - {R.take(5, aliases).map(
    331  - (label) => label.length > 0 && (
    332  - <Security
    333  - needs={[KNOWLEDGE_KNUPDATE]}
    334  - key={label}
    335  - placeholder={
    336  - <Chip classes={{ root: classes.alias }} label={label} />
     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)
    337 344   }
    338  - >
    339  - <Chip
    340  - classes={{ root: classes.alias }}
    341  - label={label}
    342  - onDelete={
    343  - enableReferences
    344  - ? this.handleOpenCommitDelete.bind(this, label)
    345  - : this.deleteAlias.bind(this, label)
     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();
    346 385   }
     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}
    347 399   />
    348  - </Security>
    349  - ),
    350  - )}
     400 + )}
     401 + </Form>
     402 + )}
     403 + </Formik>
    351 404   </div>
    352  - )}
    353  - {variant !== 'noaliases' && (
    354  - <Slide
    355  - direction="right"
    356  - in={this.state.openAlias}
    357  - mountOnEnter={true}
    358  - unmountOnExit={true}
    359  - >
    360  - <div style={{ float: 'left', marginTop: -5 }}>
    361  - <Formik
    362  - initialValues={{ new_alias: '' }}
    363  - onSubmit={this.onSubmitCreateAlias.bind(this, 'main')}
    364  - validationSchema={enableReferences ? aliasValidation(t) : null}
    365  - >
    366  - {({
    367  - submitForm,
    368  - isSubmitting,
    369  - validateForm,
    370  - setFieldValue,
    371  - values,
    372  - }) => (
    373  - <Form style={{ float: 'right' }}>
    374  - <Field
    375  - component={TextField}
    376  - variant="standard"
    377  - name="new_alias"
    378  - autoFocus={true}
    379  - placeholder={t('New alias')}
    380  - className={classes.aliasesInput}
    381  - onChange={this.handleChangeNewAlias.bind(this)}
    382  - value={this.state.newAlias}
    383  - onKeyDown={(e) => {
    384  - if (e.keyCode === 13) {
    385  - if (
    386  - enableReferences
    387  - && !this.state.openCommitCreate
    388  - ) {
    389  - return this.handleOpenCommitCreate();
    390  - }
    391  - return submitForm();
    392  - }
    393  - return true;
    394  - }}
    395  - />
    396  - {enableReferences && (
    397  - <CommitMessage
    398  - handleClose={this.openCommitCreate.bind(this)}
    399  - open={this.state.openCommitCreate}
    400  - submitForm={submitForm}
    401  - disabled={isSubmitting}
    402  - validateForm={validateForm}
    403  - setFieldValue={setFieldValue}
    404  - values={values}
    405  - id={stixDomainObject.id}
    406  - />
    407  - )}
    408  - </Form>
    409  - )}
    410  - </Formik>
    411  - </div>
    412  - </Slide>
    413  - )}
    414  - {variant !== 'noaliases' && (
    415  - <Security needs={[KNOWLEDGE_KNUPDATE]}>
    416  - {aliases.length > 5 ? (
    417  - <IconButton
    418  - style={{ float: 'left', marginTop: -8 }}
    419  - color="primary"
    420  - aria-label="More"
    421  - onClick={this.handleToggleOpenAliases.bind(this)}
    422  - size="large"
    423  - >
    424  - <DotsHorizontalCircleOutline fontSize="small" />
    425  - </IconButton>
    426  - ) : (
    427  - <IconButton
    428  - style={{ float: 'left', marginTop: -8 }}
    429  - color={this.state.openAlias ? 'primary' : 'secondary'}
    430  - aria-label="Alias"
    431  - onClick={this.handleToggleCreateAlias.bind(this)}
    432  - size="large"
    433  - >
    434  - {this.state.openAlias ? (
    435  - <Close fontSize="small" color="primary" />
    436  - ) : (
    437  - <Add fontSize="small" />
    438  - )}
    439  - </IconButton>
    440  - )}
    441  - </Security>
    442  - )}
     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>
    443 433   <div className={classes.actions}>
    444 434   <ToggleButtonGroup size="small" color="secondary" exclusive={true}>
    445 435   {disableSharing !== true && (
    skipped 210 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/entities/cities/CityKnowledge.js
    skipped 29 lines
    30 30   disableSharing={true}
    31 31   stixDomainObject={city}
    32 32   PopoverComponent={<CityPopover />}
    33  - variant="noaliases"
    34 33   />
    35 34   <Switch>
    36 35   <Route
    skipped 227 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/entities/countries/CountryKnowledge.js
    skipped 29 lines
    30 30   disableSharing={true}
    31 31   stixDomainObject={country}
    32 32   PopoverComponent={<CountryPopover />}
    33  - variant="noaliases"
    34 33   />
    35 34   <Switch>
    36 35   <Route
    skipped 227 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/entities/positions/PositionKnowledge.js
    skipped 29 lines
    30 30   disableSharing={true}
    31 31   stixDomainObject={position}
    32 32   PopoverComponent={<PositionPopover />}
    33  - variant="noaliases"
    34 33   />
    35 34   <Switch>
    36 35   <Route
    skipped 213 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/entities/regions/RegionKnowledge.js
    skipped 28 lines
    29 29   disableSharing={true}
    30 30   stixDomainObject={region}
    31 31   PopoverComponent={<RegionPopover />}
    32  - variant="noaliases"
    33 32   />
    34 33   <Switch>
    35 34   <Route
    skipped 215 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/events/incidents/Root.js
    skipped 148 lines
    149 149   enableReferences={props.settings.platform_enable_reference?.includes(
    150 150   'Incident',
    151 151   )}
     152 + disableSharing={true}
    152 153   />
    153 154   <StixDomainObjectContent
    154 155   {...routeProps}
    skipped 88 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/nav/TopMenuData.tsx
    skipped 10 lines
    11 11   MODULES,
    12 12   SETTINGS,
    13 13   TAXIIAPI_SETCOLLECTIONS,
    14  - UserContext, UserContextType,
     14 + UserContext,
     15 + UserContextType,
    15 16  } from '../../../utils/Security';
    16 17   
    17 18  const useStyles = makeStyles<Theme>((theme) => ({
    skipped 19 lines
    37 38   const isConnectorReader = granted(me, [MODULES]);
    38 39   const isSettingsManager = granted(me, [SETTINGS]);
    39 40   const isSharingManager = granted(me, [TAXIIAPI_SETCOLLECTIONS]);
    40  - const getVariant = (path: string) => (location.pathname === path ? 'contained' : 'text');
    41  - const getColor = (path: string) => (location.pathname === path ? 'secondary' : 'primary');
     41 + const isCompatiblePath = (path?: string) => (path ? location.pathname.includes(path) : location.pathname === path);
     42 + const getVariant = (path: string) => (isCompatiblePath(path) ? 'contained' : 'text');
     43 + const getColor = (path: string) => (isCompatiblePath(path) ? 'secondary' : 'primary');
    42 44   return (
    43 45   <div>
    44 46   {isKnowledgeReader && (
    45  - <Button component={Link} size="small" to="/dashboard/data/entities"
    46  - variant={getVariant('/dashboard/data/entities')}
    47  - color={getColor('/dashboard/data/entities')}
    48  - classes={{ root: classes.button }}>
     47 + <Button
     48 + component={Link}
     49 + size="small"
     50 + to="/dashboard/data/entities"
     51 + variant={getVariant('/dashboard/data/entities')}
     52 + color={getColor('/dashboard/data/entities')}
     53 + classes={{ root: classes.button }}
     54 + >
    49 55   {t('Entities')}
    50 56   </Button>
    51 57   )}
    52 58   {isKnowledgeReader && (
    53  - <Button component={Link} size="small" to="/dashboard/data/relationships"
    54  - variant={getVariant('/dashboard/data/relationships')}
    55  - color={getColor('/dashboard/data/relationships')}
    56  - classes={{ root: classes.button }}>
     59 + <Button
     60 + component={Link}
     61 + size="small"
     62 + to="/dashboard/data/relationships"
     63 + variant={getVariant('/dashboard/data/relationships')}
     64 + color={getColor('/dashboard/data/relationships')}
     65 + classes={{ root: classes.button }}
     66 + >
    57 67   {t('Relationships')}
    58 68   </Button>
    59 69   )}
    60 70   {isKnowledgeEditor && (
    61  - <Button component={Link} size="small" to="/dashboard/data/tasks"
    62  - variant={getVariant('/dashboard/data/tasks')}
    63  - color={getColor('/dashboard/data/tasks')}
    64  - classes={{ root: classes.button }}>
     71 + <Button
     72 + component={Link}
     73 + size="small"
     74 + to="/dashboard/data/tasks"
     75 + variant={getVariant('/dashboard/data/tasks')}
     76 + color={getColor('/dashboard/data/tasks')}
     77 + classes={{ root: classes.button }}
     78 + >
    65 79   {t('Background tasks')}
    66 80   </Button>
    67 81   )}
    68 82   {isConnectorReader && (
    69  - <Button component={Link} size="small" to="/dashboard/data/connectors"
    70  - variant={getVariant('/dashboard/data/connectors')}
    71  - color={getColor('/dashboard/data/connectors')}
    72  - classes={{ root: classes.button }}>
     83 + <Button
     84 + component={Link}
     85 + size="small"
     86 + to="/dashboard/data/connectors"
     87 + variant={getVariant('/dashboard/data/connectors')}
     88 + color={getColor('/dashboard/data/connectors')}
     89 + classes={{ root: classes.button }}
     90 + >
    73 91   {t('Connectors')}
    74 92   </Button>
    75 93   )}
    76 94   {isSettingsManager && (
    77  - <Button component={Link} size="small" to="/dashboard/data/sync"
    78  - variant={getVariant('/dashboard/data/sync')}
    79  - color={getColor('/dashboard/data/sync')}
    80  - classes={{ root: classes.button }}>
     95 + <Button
     96 + component={Link}
     97 + size="small"
     98 + to="/dashboard/data/sync"
     99 + variant={getVariant('/dashboard/data/sync')}
     100 + color={getColor('/dashboard/data/sync')}
     101 + classes={{ root: classes.button }}
     102 + >
    81 103   {t('Synchronization')}
    82 104   </Button>
    83 105   )}
    84 106   {isSharingManager && (
    85  - <Button component={Link} size="small" to="/dashboard/data/sharing"
    86  - variant={getVariant('/dashboard/data/sharing')}
    87  - color={getColor('/dashboard/data/sharing')}
    88  - classes={{ root: classes.button }}>
     107 + <Button
     108 + component={Link}
     109 + size="small"
     110 + to="/dashboard/data/sharing"
     111 + variant={getVariant('/dashboard/data/sharing')}
     112 + color={getColor('/dashboard/data/sharing')}
     113 + classes={{ root: classes.button }}
     114 + >
    89 115   {t('Data sharing')}
    90 116   </Button>
    91 117   )}
    skipped 6 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/nav/TopMenuIncident.tsx
    skipped 5 lines
    6 6  import { ArrowForwardIosOutlined } from '@mui/icons-material';
    7 7  import { Fire } from 'mdi-material-ui';
    8 8  import { useFormatter } from '../../../components/i18n';
    9  -import { granted, KNOWLEDGE_KNGETEXPORT, KNOWLEDGE_KNUPLOAD, UserContext } from '../../../utils/Security';
     9 +import {
     10 + granted,
     11 + KNOWLEDGE_KNGETEXPORT,
     12 + KNOWLEDGE_KNUPLOAD,
     13 + UserContext,
     14 +} from '../../../utils/Security';
    10 15   
    11 16  const useStyles = makeStyles<Theme>((theme) => ({
    12 17   buttonHome: {
    skipped 24 lines
    37 42   const { incidentId } = useParams() as { incidentId: string };
    38 43   const classes = useStyles();
    39 44   const { me } = useContext(UserContext);
    40  - const isUploaderOrExporter = granted(me, [KNOWLEDGE_KNUPLOAD, KNOWLEDGE_KNGETEXPORT]);
     45 + const isUploaderOrExporter = granted(me, [
     46 + KNOWLEDGE_KNUPLOAD,
     47 + KNOWLEDGE_KNGETEXPORT,
     48 + ]);
    41 49   const computePath = (path?: string) => `/dashboard/events/incidents/${incidentId}${path ?? ''}`;
    42  - const computeVariant = (path?: string) => (location.pathname === computePath(path) ? 'contained' : 'text');
    43  - const computeColor = (path?: string) => (location.pathname === computePath(path) ? 'secondary' : 'primary');
     50 + const isCompatiblePath = (path?: string) => (path ? location.pathname.includes(computePath(path)) : location.pathname === computePath(path));
     51 + const computeVariant = (path?: string) => (isCompatiblePath(path) ? 'contained' : 'text');
     52 + const computeColor = (path?: string) => (isCompatiblePath(path) ? 'secondary' : 'primary');
    44 53   const computeLocatedButton = (title: string, basePath?: string) => {
    45  - return <Button component={Link} size="small" to={computePath(basePath)}
    46  - variant={computeVariant(basePath)} color={computeColor(basePath)}
    47  - classes={{ root: classes.button }}>
    48  - {t(title)}
    49  - </Button>;
     54 + return (
     55 + <Button
     56 + component={Link}
     57 + size="small"
     58 + to={computePath(basePath)}
     59 + variant={computeVariant(basePath)}
     60 + color={computeColor(basePath)}
     61 + classes={{ root: classes.button }}
     62 + >
     63 + {t(title)}
     64 + </Button>
     65 + );
    50 66   };
    51 67   return (
    52 68   <div>
    53  - <Button component={Link} to="/dashboard/events/incidents"
    54  - variant="contained" size="small" color="primary"
    55  - classes={{ root: classes.buttonHome }}>
     69 + <Button
     70 + component={Link}
     71 + to="/dashboard/events/incidents"
     72 + variant="contained"
     73 + size="small"
     74 + color="primary"
     75 + classes={{ root: classes.buttonHome }}
     76 + >
    56 77   <Fire className={classes.icon} fontSize="small" />
    57 78   {t('Incidents')}
    58 79   </Button>
    59  - <ArrowForwardIosOutlined color="primary" classes={{ root: classes.arrow }} />
     80 + <ArrowForwardIosOutlined
     81 + color="primary"
     82 + classes={{ root: classes.arrow }}
     83 + />
    60 84   {computeLocatedButton('Overview')}
    61 85   {computeLocatedButton('Knowledge', '/knowledge')}
    62 86   {computeLocatedButton('Content', '/content')}
    skipped 9 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/threats/campaigns/Root.js
    skipped 172 lines
    173 173   <StixDomainObjectHeader
    174 174   stixDomainObject={props.campaign}
    175 175   PopoverComponent={<CampaignPopover />}
    176  - variant="noaliases"
    177 176   />
    178 177   <StixDomainObjectIndicators
    179 178   {...routeProps}
    skipped 75 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/threats/intrusion_sets/Root.js
    skipped 174 lines
    175 175   <StixDomainObjectHeader
    176 176   stixDomainObject={props.intrusionSet}
    177 177   PopoverComponent={<IntrusionSetPopover />}
    178  - variant="noaliases"
    179 178   />
    180 179   <StixDomainObjectIndicators
    181 180   {...routeProps}
    skipped 75 lines
  • ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/threats/threat_actors/Root.js
    skipped 177 lines
    178 178   <StixDomainObjectHeader
    179 179   stixDomainObject={props.threatActor}
    180 180   PopoverComponent={<ThreatActorPopover />}
    181  - variant="noaliases"
     181 + disableSharing={true}
    182 182   />
    183 183   <StixDomainObjectIndicators
    184 184   {...routeProps}
    skipped 78 lines
  • ■ ■ ■ ■
    opencti-platform/opencti-front/src/schema/relay.schema.graphql
    skipped 3813 lines
    3814 3814  enum LocationsFilter {
    3815 3815   entity_type
    3816 3816   name
    3817  - aliases
     3817 + x_opencti_aliases
    3818 3818   confidence
    3819 3819   created
    3820 3820   modified
    skipped 4698 lines
  • ■ ■ ■ ■
    opencti-platform/opencti-graphql/config/schema/opencti.graphql
    skipped 4267 lines
    4268 4268  enum LocationsFilter {
    4269 4269   entity_type
    4270 4270   name
    4271  - aliases
     4271 + x_opencti_aliases
    4272 4272   confidence
    4273 4273   created
    4274 4274   modified
    skipped 6886 lines
  • ■ ■ ■ ■
    opencti-platform/opencti-graphql/src/generated/graphql.ts
    skipped 6895 lines
    6896 6896  }
    6897 6897   
    6898 6898  export enum LocationsFilter {
    6899  - Aliases = 'aliases',
    6900 6899   Confidence = 'confidence',
    6901 6900   Created = 'created',
    6902 6901   CreatedBy = 'createdBy',
    skipped 5 lines
    6908 6907   Name = 'name',
    6909 6908   Revoked = 'revoked',
    6910 6909   UpdatedAt = 'updated_at',
     6910 + XOpenctiAliases = 'x_opencti_aliases',
    6911 6911   XOpenctiWorkflowId = 'x_opencti_workflow_id'
    6912 6912  }
    6913 6913   
    skipped 19309 lines
Please wait...
Page is in error, reload to recover