Skip to content

Commit

Permalink
[backend/frontend] Global refactor of filters management/usage (#5370)
Browse files Browse the repository at this point in the history
Co-authored-by: Cathia Archidoit <cathia.archidoit@filigran.io>
Co-authored-by: Laurent Bonnet <laurent.bonnet@filigran.io>
Co-authored-by: Jean-Philippe Kha <jean-philippe.kha@filigran.io>
  • Loading branch information
4 people committed Jan 12, 2024
1 parent 8295a54 commit b42d752
Show file tree
Hide file tree
Showing 252 changed files with 4,037 additions and 8,906 deletions.
9 changes: 7 additions & 2 deletions opencti-platform/opencti-front/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@
"info_authorizedmembers_knowledge_on": "Wenn Sie die Zugriffsbeschränkung aktivieren, wird der Zugriff auf dieses Objekt für alle Benutzer verweigert, unabhängig von ihren globalen Fähigkeiten und Markierungsdefinitionen. Anschließend können Sie weiteren Benutzern, Gruppen oder Organisationen Zugriff gewähren. Diese spezifischen Zugriffe stellen eine zusätzliche Ebene der Zugriffskontrolle dar, d.h. die Benutzer benötigen weiterhin die richtigen Fähigkeiten und Markierungsdefinitionen, um auf das Objekt zugreifen zu können.",
"info_authorizedmembers_knowledge_off": "Wenn Sie die Zugriffsbeschränkung deaktivieren, werden die von Ihnen erstellten spezifischen Zugriffe entfernt und die Zugriffsbeschränkung für dieses Objekt aufgehoben. Das Objekt unterliegt jedoch weiterhin den Zugriffskontrollen der Markierungsdefinition und der Organisation.",
"I would like to use a EE feature ...": "Ich würde gerne eine EE-Funktion ({feature}) verwenden, habe aber keine EE aktiviert.\nIch würde gerne mit Ihnen über die Aktivierung von EE diskutieren.",
"elementTargetTypes": "Zieltypen",
"elementWithTargetTypes": "Zieltypen",
"starts_with": "beginnt mit",
"ends_with": "endet mit",
"not_contains": "enthält nicht",
Expand Down Expand Up @@ -2436,5 +2436,10 @@
"Do you want to unlink this task ?": "Möchten Sie die Verknüpfung dieser Aufgabe aufheben?",
"CREATE": "CREATE",
"entity_Analyses": "entity_Analyses",
"workflow_id": "Status"
"workflow_id": "Status",
"regardingOf": "In Bezug auf",
"WITH": "MIT",
"Pre-query to get data to be used as source entity of the relationship (limited to 5000)": "Pre-Query, um Daten zu erhalten, die als Quell-Entität der Beziehung verwendet werden sollen (begrenzt auf 5000)",
"Pre-query to get data to be used as target entity of the relationship (limited to 5000)": "Pre-Query, um Daten zu erhalten, die als Ziel-Entität der Beziehung verwendet werden sollen (begrenzt auf 5000)",
"Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:": "Ergebnis: die Beziehungen, bei denen die Quelle die Quell-Pre-Query und das Ziel die Ziel-Pre-Query beachtet und übereinstimmt:"
}
15 changes: 10 additions & 5 deletions opencti-platform/opencti-front/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"CSV data.": "CSV data.",
"Do you want to browse this external link?": "Do you want to browse this external link?",
"Browse the link": "Browse the link",
"deleted": "deleted",
"AND": "AND",
"Filters are not fully displayed": "Filters are not fully displayed",
"Close": "Close",
"No available options": "No available options",
"WITH": "WITH",
"deleted": "deleted",
"Unknown": "Unknown",
"No description": "No description",
"Sort by": "Sort by",
Expand Down Expand Up @@ -371,7 +371,6 @@
"Regular digest": "Regular digest",
"Live trigger": "Live trigger",
"Filters": "Filters",
"Add filter": "Add filter",
"Clear filters": "Clear filters",
"Add a location": "Add a location",
"Mini map": "Mini map",
Expand Down Expand Up @@ -673,6 +672,7 @@
"Do you want to stop this synchronizer?": "Do you want to stop this synchronizer?",
"No task": "No task",
"Targeted entities": "Targeted entities",
"AND": "AND",
"List of entities": "List of entities",
"All rule targets": "All rule targets",
"Actions": "Actions",
Expand Down Expand Up @@ -1250,6 +1250,9 @@
"Import a widget": "Import a widget",
"Visualization": "Visualization",
"Perspective": "Perspective",
"Pre-query to get data to be used as source entity of the relationship (limited to 5000)": "Pre-query to get data to be used as source entity of the relationship (limited to 5000)",
"Pre-query to get data to be used as target entity of the relationship (limited to 5000)": "Pre-query to get data to be used as target entity of the relationship (limited to 5000)",
"Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:": "Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:",
"Duplicate": "Duplicate",
"Do you want to delete this widget?": "Do you want to delete this widget?",
"Do you want to duplicate this widget?": "Do you want to duplicate this widget?",
Expand Down Expand Up @@ -1290,6 +1293,7 @@
"of": "of",
"External References": "External References",
"Target": "Target",
"Add filter": "Add filter",
"gt": "Greater than",
"lte": "Lower than or equals",
"progress": "In progress",
Expand Down Expand Up @@ -1721,7 +1725,7 @@
"info_authorizedmembers_knowledge_on": "By activating Access Restriction, access to this object will be denied for all users, regardless of their global capabilities and marking definitions. Then, you are able to grant access to more users, groups or organizations. Those specific accesses are an additional layer of access control, this means that users still need the proper capabilities and marking definitions to access the object.",
"info_authorizedmembers_knowledge_off": "By deactivating Access Restriction, specific accesses you created will be removed and Access Restriction will be lift off for this object. But the object will still be covered by Marking Definition and Organization access controls.",
"I would like to use a EE feature ...": "I would like to use a EE feature ({feature}) but I don't have EE activated.\nI would like to discuss with you about activating EE.",
"elementTargetTypes": "Target Types",
"elementWithTargetTypes": "Target Types",
"starts_with": "starts with",
"ends_with": "ends with",
"not_contains": "not contains",
Expand Down Expand Up @@ -2436,5 +2440,6 @@
"Do you want to unlink this task ?": "Do you want to unlink this task ?",
"CREATE": "CREATE",
"entity_Analyses": "entity_Analyses",
"workflow_id": "Status"
"workflow_id": "Status",
"regardingOf": "In regards of"
}
9 changes: 7 additions & 2 deletions opencti-platform/opencti-front/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@
"Ends with": "Termina con",
"Not ends with": "No termina con",
"Add filter": "Agregar filtro",
"elementTargetTypes": "Tipos de objetivo",
"elementWithTargetTypes": "Tipos de objetivo",
"The operators and modes are restricted for these filters.": "Los operadores y modos están restringidos para estos filtros.",
"contains": "contiene",
"starts_with": "comienza con",
Expand Down Expand Up @@ -2436,5 +2436,10 @@
"CREATE": "CREAR",
"entity_Analyses": "entity_Analyses",
"There are no opinions. You should create some before.": "No hay opiniones. Deberías crear algunas antes.",
"workflow_id": "Estado"
"workflow_id": "Estado",
"regardingOf": "En cuanto a",
"WITH": "CON",
"Pre-query to get data to be used as source entity of the relationship (limited to 5000)": "Consulta previa para obtener los datos que se utilizarán como entidad fuente de la relación (limitada a 5000)",
"Pre-query to get data to be used as target entity of the relationship (limited to 5000)": "Consulta previa para obtener los datos que se utilizarán como entidad de destino de la relación (limitada a 5000)",
"Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:": "Resultado: las relaciones con origen respetando la preconsulta de origen, destino respetando la preconsulta de destino, y coincidencia:"
}
9 changes: 7 additions & 2 deletions opencti-platform/opencti-front/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@
"Ends with": "Se termine par",
"Not ends with": "Ne se termine pas par",
"Add filter": "Ajouter un filtre",
"elementTargetTypes": "Types de cible",
"elementWithTargetTypes": "Types de cible",
"The operators and modes are restricted for these filters.": "Les opérateurs et les modes sont restreints pour ces filtres.",
"contains": "contient",
"starts_with": "commence par",
Expand Down Expand Up @@ -2436,5 +2436,10 @@
"sponsor": "sponsor",
"valid": "valide",
"There are no opinions. You should create some before.": "Il n'y a pas d'd’opinions. Vous devriez en créer avant.",
"workflow_id": "Statut"
"workflow_id": "Statut",
"regardingOf": "Concernant",
"WITH": "AVEC",
"Pre-query to get data to be used as source entity of the relationship (limited to 5000)": "Pré-requête pour obtenir les données à utiliser comme entité source de la relation (limité à 5000)",
"Pre-query to get data to be used as target entity of the relationship (limited to 5000)": "Pré-requête pour obtenir les données à utiliser comme entité cible de la relation (limité à 5000)",
"Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:": "Résultat : les relations avec la source respectant la pré-requête de la source, la cible respectant la pré-requête de la cible, et les filtres courants :"
}
9 changes: 7 additions & 2 deletions opencti-platform/opencti-front/lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,7 @@
"Ends with": "で終わる",
"Not ends with": "で終わらない",
"Add filter": "フィルターを追加",
"elementTargetTypes": "ターゲットタイプ",
"elementWithTargetTypes": "ターゲットタイプ",
"The operators and modes are restricted for these filters.": "これらのフィルタには演算子とモードの制限があります。",
"contains": "を含む",
"starts_with": "で始まる",
Expand Down Expand Up @@ -2436,5 +2436,10 @@
"CREATE": "作成",
"entity_Analyses": "エンティティ_分析",
"There are no opinions. You should create some before.": "意見がない。事前にいくつか作っておくべきだ。",
"workflow_id": "ステータス"
"workflow_id": "ステータス",
"regardingOf": "に関しては",
"WITH": "WITH",
"Pre-query to get data to be used as source entity of the relationship (limited to 5000)": "リレーションシップのソース・エンティティとして使用されるデータを取得するための事前クエリ(5000個まで)",
"Pre-query to get data to be used as target entity of the relationship (limited to 5000)": "リレーションシップのターゲット・エンティティとして使用されるデータを取得するための事前クエリ(5000個限定)",
"Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:": "結果:ソースがソースの事前クエリを尊重し、ターゲットがターゲットの事前クエリを尊重し、一致するリレーションシップ:"
}
9 changes: 7 additions & 2 deletions opencti-platform/opencti-front/lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@
"Ends with": "以...结尾",
"Not ends with": "不以...结尾",
"Add filter": "添加过滤器",
"elementTargetTypes": "目标类型",
"elementWithTargetTypes": "目标类型",
"The operators and modes are restricted for these filters.": "这些过滤器的运算符和模式受到限制。",
"contains": "包含",
"starts_with": "以...开头",
Expand Down Expand Up @@ -2436,5 +2436,10 @@
"CREATE": "创建",
"entity_Analyses": "实体_分析",
"There are no opinions. You should create some before.": "没有意见。你应该先提出一些意见。",
"workflow_id": "状态"
"workflow_id": "状态",
"regardingOf": "关于",
"WITH": "",
"Pre-query to get data to be used as source entity of the relationship (limited to 5000)": "预查询,获取用作关系源实体的数据(限制为 5000)",
"Pre-query to get data to be used as target entity of the relationship (limited to 5000)": "用于获取作为关系目标实体的数据的预查询(最多 5000 条)",
"Result: the relationships with source respecting the source pre-query, target respecting the target pre-query, and matching:": "结果:源尊重源预查询,目标尊重目标预查询并匹配的关系:"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, { FunctionComponent, useEffect, useRef } from 'react';
import { ChipOwnProps } from '@mui/material/Chip/Chip';
import { DataColumns } from './list_lines';
import { Filter, FilterGroup, GqlFilterGroup, isFilterGroupNotEmpty, removeIdFromFilterGroupObject } from '../utils/filters/filtersUtils';
import { filterIconButtonContentQuery } from './FilterIconButtonContent';
import useQueryLoading from '../utils/hooks/useQueryLoading';
import { FilterIconButtonContentQuery } from './__generated__/FilterIconButtonContentQuery.graphql';
import FilterIconButtonContainer from './FilterIconButtonContainer';
import { UseLocalStorageHelpers } from '../utils/hooks/useLocalStorage';
import { handleFilterHelpers } from '../utils/hooks/useLocalStorage';
import { filterValuesContentQuery } from './FilterValuesContent';
import { FilterValuesContentQuery } from './__generated__/FilterValuesContentQuery.graphql';

interface FilterIconButtonProps {
availableFilterKeys?: string[];
Expand All @@ -19,7 +19,7 @@ interface FilterIconButtonProps {
dataColumns?: DataColumns;
disabledPossible?: boolean;
redirection?: boolean;
helpers?: UseLocalStorageHelpers;
helpers?: handleFilterHelpers;
availableRelationFilterTypes?: Record<string, string[]>;
}

Expand All @@ -42,8 +42,8 @@ const FilterIconButtonWithRepresentativesQuery: FunctionComponent<FilterIconButt
hasRenderedRef,
setHasRenderedRef,
}) => {
const filtersRepresentativesQueryRef = useQueryLoading<FilterIconButtonContentQuery>(
filterIconButtonContentQuery,
const filtersRepresentativesQueryRef = useQueryLoading<FilterValuesContentQuery>(
filterValuesContentQuery,
{
filters: removeIdFromFilterGroupObject(filters) as unknown as GqlFilterGroup,
},
Expand Down
Loading

0 comments on commit b42d752

Please sign in to comment.