Projects STRLCPY opencti Commits 0af97f4b
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/common/lists/Filters.js
    skipped 8 lines
    9 9  import Popover from '@mui/material/Popover';
    10 10  import IconButton from '@mui/material/IconButton';
    11 11  import InputAdornment from '@mui/material/InputAdornment';
    12  -import { BiotechOutlined, FilterListOutlined, PaletteOutlined } from '@mui/icons-material';
     12 +import {
     13 + BiotechOutlined,
     14 + FilterListOutlined,
     15 + PaletteOutlined,
     16 +} from '@mui/icons-material';
    13 17  import * as PropTypes from 'prop-types';
    14 18  import Tooltip from '@mui/material/Tooltip';
    15 19  import DialogTitle from '@mui/material/DialogTitle';
    skipped 10 lines
    26 30  import MenuItem from '@mui/material/MenuItem';
    27 31  import { fetchQuery } from '../../../../relay/environment';
    28 32  import inject18n from '../../../../components/i18n';
    29  -import { identitySearchCreatorsSearchQuery, identitySearchIdentitiesSearchQuery } from '../identities/IdentitySearch';
     33 +import {
     34 + identitySearchCreatorsSearchQuery,
     35 + identitySearchIdentitiesSearchQuery,
     36 +} from '../identities/IdentitySearch';
    30 37  import { labelsSearchQuery } from '../../settings/LabelsQuery';
    31 38  import { attributesSearchQuery } from '../../settings/AttributesQuery';
    32 39  import { markingDefinitionsLinesSearchQuery } from '../../settings/marking_definitions/MarkingDefinitionsLines';
    skipped 2 lines
    35 42  import { stixDomainObjectsLinesSearchQuery } from '../stix_domain_objects/StixDomainObjectsLines';
    36 43  import { statusFieldStatusesSearchQuery } from '../form/StatusField';
    37 44  import { defaultValue } from '../../../../utils/Graph';
     45 +import { openVocabularies } from '../../../../utils/Entity';
    38 46   
    39 47  export const filtersAllTypesQuery = graphql`
    40 48   query FiltersAllTypesQuery {
    skipped 309 lines
    350 358   searchEntities(filterKey, event) {
    351 359   const { searchScope } = this.state;
    352 360   const baseScores = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
    353  - const scores = ['0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100'];
     361 + const scores = [
     362 + '0',
     363 + '10',
     364 + '20',
     365 + '30',
     366 + '40',
     367 + '50',
     368 + '60',
     369 + '70',
     370 + '80',
     371 + '90',
     372 + '100',
     373 + ];
    354 374   const confidences = ['0', '15', '50', '75', '85'];
    355 375   const { t, theme, availableEntityTypes, availableRelationshipTypes } = this.props;
    356 376   if (!event) {
    skipped 428 lines
    785 805   'tanium-signal',
    786 806   'spl',
    787 807   'eql',
     808 + 'shodan',
    788 809   ]);
    789 810   this.setState({
    790 811   entities: {
    skipped 5 lines
    796 817   },
    797 818   });
    798 819   break;
     820 + case 'indicator_types':
     821 + // eslint-disable-next-line no-case-declarations
     822 + const indicatorTypesEntities = R.pipe(
     823 + R.map((n) => ({
     824 + label: t(n.description),
     825 + value: n.key,
     826 + type: 'attribute',
     827 + })),
     828 + )(openVocabularies['indicator-type-ov']);
     829 + this.setState({
     830 + entities: {
     831 + ...this.state.entities,
     832 + indicator_types: R.union(
     833 + indicatorTypesEntities,
     834 + this.state.entities.indicator_types,
     835 + ),
     836 + },
     837 + });
     838 + break;
     839 + case 'incident_type':
     840 + // eslint-disable-next-line no-case-declarations
     841 + const incidentTypeEntities = R.pipe(
     842 + R.map((n) => ({
     843 + label: t(n.key),
     844 + value: n.key,
     845 + type: 'attribute',
     846 + })),
     847 + )(openVocabularies['incident-type-ov']);
     848 + this.setState({
     849 + entities: {
     850 + ...this.state.entities,
     851 + incident_type: R.union(
     852 + incidentTypeEntities,
     853 + this.state.entities.incident_type,
     854 + ),
     855 + },
     856 + });
     857 + break;
    799 858   case 'x_opencti_base_severity':
    800 859   fetchQuery(attributesSearchQuery, {
    801 860   attributeName: 'x_opencti_base_severity',
    skipped 555 lines
    1357 1416   
    1358 1417   handleChange(filterKey, event, value) {
    1359 1418   if (value) {
    1360  - const group = !onlyGroupOrganization.includes(filterKey) ? value.group : undefined;
     1419 + const group = !onlyGroupOrganization.includes(filterKey)
     1420 + ? value.group
     1421 + : undefined;
    1361 1422   const filterAdd = `${filterKey}${group ? `_${group}` : ''}`;
    1362 1423   if (this.props.variant === 'dialog') {
    1363 1424   this.handleAddFilter(filterAdd, value.value, value.label, event);
    skipped 116 lines
    1480 1541   ? (option) => option.type
    1481 1542   : (option) => t(option.group ? option.group : `filter_${filterKey}`)
    1482 1543   }
    1483  - isOptionEqualToValue={(option, value) => option.value === value.value}
     1544 + isOptionEqualToValue={(option, value) => option.value === value.value
     1545 + }
    1484 1546   renderInput={(params) => (
    1485 1547   <TextField
    1486 1548   {...R.dissoc('InputProps', params)}
    skipped 405 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/data/stream/StreamCollectionCreation.js
    skipped 241 lines
    242 242   'x_opencti_workflow_id',
    243 243   'revoked',
    244 244   'confidence',
     245 + 'indicator_types',
    245 246   'pattern_type',
    246 247   ]}
    247 248   handleAddFilter={handleAddFilter}
    skipped 89 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/data/stream/StreamCollectionEdition.js
    skipped 252 lines
    253 253   'x_opencti_workflow_id',
    254 254   'revoked',
    255 255   'confidence',
     256 + 'indicator_types',
    256 257   'pattern_type',
    257 258   ]}
    258 259   handleAddFilter={handleAddFilter}
    skipped 87 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/data/taxii/TaxiiCollectionCreation.js
    skipped 229 lines
    230 230   'x_opencti_detection',
    231 231   'revoked',
    232 232   'confidence',
     233 + 'indicator_types',
    233 234   'pattern_type',
    234 235   ]}
    235 236   handleAddFilter={handleAddFilter}
    skipped 89 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/data/taxii/TaxiiCollectionEdition.js
    skipped 184 lines
    185 185   'x_opencti_detection',
    186 186   'revoked',
    187 187   'confidence',
     188 + 'indicator_types',
    188 189   'pattern_type',
    189 190   ]}
    190 191   handleAddFilter={handleAddFilter}
    skipped 84 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/private/components/observations/indicators/IndicatorCreation.js
    skipped 13 lines
    14 14  import { ConnectionHandler } from 'relay-runtime';
    15 15  import MenuItem from '@mui/material/MenuItem';
    16 16  import inject18n from '../../../../components/i18n';
    17  -import { commitMutation, handleErrorInForm } from '../../../../relay/environment';
     17 +import {
     18 + commitMutation,
     19 + handleErrorInForm,
     20 +} from '../../../../relay/environment';
    18 21  import TextField from '../../../../components/TextField';
    19 22  import SelectField from '../../../../components/SelectField';
    20 23  import CreatedByField from '../../common/form/CreatedByField';
    skipped 7 lines
    28 31  import ExternalReferencesField from '../../common/form/ExternalReferencesField';
    29 32  import DateTimePickerField from '../../../../components/DateTimePickerField';
    30 33  import { fieldSpacingContainerStyle } from '../../../../utils/field';
     34 +import OpenVocabField from '../../common/form/OpenVocabField';
    31 35   
    32 36  const styles = (theme) => ({
    33 37   drawerPaper: {
    skipped 61 lines
    95 99   
    96 100  const indicatorValidation = (t) => Yup.object().shape({
    97 101   name: Yup.string().required(t('This field is required')),
     102 + indicator_types: Yup.array(),
    98 103   confidence: Yup.number(),
    99 104   description: Yup.string().nullable(),
    100 105   pattern: Yup.string().required(t('This field is required')),
    skipped 120 lines
    221 226   initialValues={{
    222 227   name: '',
    223 228   confidence: 75,
     229 + indicator_types: [],
    224 230   pattern: '',
    225 231   pattern_type: '',
    226 232   x_opencti_main_observable_type: '',
    skipped 26 lines
    253 259   name="name"
    254 260   label={t('Name')}
    255 261   fullWidth={true}
     262 + />
     263 + <OpenVocabField
     264 + label={t('Indicator types')}
     265 + type="indicator-type-ov"
     266 + name="indicator_types"
     267 + multiple={true}
     268 + containerStyle={fieldSpacingContainerStyle}
    256 269   />
    257 270   <ConfidenceField
    258 271   name="confidence"
    skipped 163 lines
  • ■ ■ ■ ■ ■
    opencti-platform/opencti-front/src/utils/Localization.js
    skipped 1500 lines
    1501 1501   filter_sightedBy: 'Detectado por/en',
    1502 1502   filter_entity_type: 'Tipo de entidad',
    1503 1503   filter_relationship_type: 'Tipo de relación',
    1504  - filter_pattern_type: 'Tipo de indicador',
     1504 + filter_indicator_types: 'Tipo de indicador',
     1505 + filter_pattern_type: 'Tipo de patrón',
     1506 + filter_incident_type: 'Tipo de incidente',
    1505 1507   filter_x_opencti_main_observable_type: 'Tipo de observable',
    1506 1508   filter_labelledBy: 'Etiqueta',
    1507 1509   filter_createdBy: 'Autor',
    skipped 1576 lines
    3084 3086   filter_sightedBy: 'Détecté par/dans',
    3085 3087   filter_entity_type: "Type d'entité",
    3086 3088   filter_relationship_type: 'Type de relation',
    3087  - filter_pattern_type: "Type d'indicateur",
     3089 + filter_indicator_types: "Type d'indicateur",
     3090 + filter_pattern_type: 'Type de motif',
     3091 + filter_incident_type: "Type d'incident",
    3088 3092   filter_x_opencti_main_observable_type: "Type d'observable",
    3089 3093   filter_labelledBy: 'Label',
    3090 3094   filter_createdBy: 'Auteur',
    skipped 1548 lines
    4639 4643   filter_sightedBy: '目撃情報',
    4640 4644   filter_entity_type: 'エンティティ種別',
    4641 4645   filter_relationship_type: 'リレーションシップ種別',
    4642  - filter_pattern_type: 'インジケータ種別',
     4646 + filter_indicator_types: 'インジケータ種別',
     4647 + filter_pattern_type: 'パターンタイプ',
     4648 + filter_incident_type: 'インシデントの種類',
    4643 4649   filter_x_opencti_main_observable_type: '観測結果の種別',
    4644 4650   filter_labelledBy: 'ラベル',
    4645 4651   filter_createdBy: '作成者',
    skipped 1455 lines
    6101 6107   filter_sightedBy: '目击',
    6102 6108   filter_entity_type: '实体类型',
    6103 6109   filter_relationship_type: '关系类型',
    6104  - filter_pattern_type: '模式类型',
     6110 + filter_indicator_types: '指标类型',
     6111 + filter_pattern_type: '图案类型',
     6112 + filter_incident_type: '事件类型',
    6105 6113   filter_x_opencti_main_observable_type: '可观测数据类型',
    6106 6114   filter_labelledBy: '标签',
    6107 6115   filter_createdBy: '作者',
    skipped 316 lines
    6424 6432   filter_sightedBy: 'Sighted by/in',
    6425 6433   filter_entity_type: 'Entity type',
    6426 6434   filter_relationship_type: 'Relationship type',
    6427  - filter_pattern_type: 'Indicator type',
     6435 + filter_indicator_types: 'Indicator type',
     6436 + filter_pattern_type: 'Pattern type',
     6437 + filter_incident_type: 'Incident type',
    6428 6438   filter_x_opencti_main_observable_type: 'Observable type',
    6429 6439   filter_labelledBy: 'Label',
    6430 6440   filter_createdBy: 'Author',
    skipped 75 lines
  • ■ ■ ■ ■ ■ ■
    opencti-platform/opencti-graphql/config/schema/opencti.graphql
    skipped 1694 lines
    1695 1695   valid_from
    1696 1696   valid_until
    1697 1697   pattern_type
     1698 + indicator_types
    1698 1699   x_opencti_main_observable_type
    1699 1700   report_types
    1700 1701   context
    skipped 115 lines
    1816 1817   valid_from
    1817 1818   valid_until
    1818 1819   pattern_type
     1820 + indicator_types
    1819 1821   x_opencti_main_observable_type
    1820 1822   report_types
    1821 1823   context
    skipped 2008 lines
    3830 3832  enum IndicatorsFilter {
    3831 3833   name
    3832 3834   pattern_type
     3835 + indicator_types
    3833 3836   pattern_version
    3834 3837   pattern
    3835 3838   x_opencti_main_observable_type
    skipped 7327 lines
Please wait...
Page is in error, reload to recover