diff --git a/opencti-platform/opencti-front/lang/front/de.json b/opencti-platform/opencti-front/lang/front/de.json index 1603a9e35fc0..cef37fecda8b 100644 --- a/opencti-platform/opencti-front/lang/front/de.json +++ b/opencti-platform/opencti-front/lang/front/de.json @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "Datei-Index-Manager", "Files": "Dateien", "Files & history": "Dateien & Geschichte", + "Files contained in": "Dateien enthalten in", "Files count": "Anzahl der Dateien", "Files search": "Suche in Dateien", "Files size": "Größe der Dateien", @@ -2203,6 +2204,7 @@ "Relationships view": "Ansicht \"Beziehungen", "Relative time": "Relative Zeit", "Reliability": "Verlässlichkeit", + "Remaining": "Verbleibende", "Remote OpenCTI configuration": "OpenCTI-Fernkonfiguration", "Remote OpenCTI stream ID": "Fern-OpenCTI-Stream-ID", "Remote OpenCTI token": "Fern-OpenCTI-Token", @@ -2480,6 +2482,7 @@ "Tactical": "Taktisch", "Tactics": "Taktiken", "Tactics matrix view": "Taktik-Matrix-Ansicht", + "Tags": "Tags", "Take deletions into account": "Berücksichtigung von Löschungen", "Takedown type": "Typ des Takedowns", "takedown_types": "takedown-Typen", @@ -2561,8 +2564,8 @@ "The password has been updated": "Das Passwort wurde aktualisiert", "The public dashboard is disabled": "Das öffentliche Dashboard ist deaktiviert", "The relations attached to selected entities will be copied to the merged entity.": "Die Beziehungen, die mit den ausgewählten Entitäten verbunden sind, werden in die zusammengeführte Entität kopiert.", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "Die Aufbewahrungsrichtlinie wird auf globale Dateien angewendet (d.h. Dateien, die in Data/Import enthalten sind)", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "Die Aufbewahrungsrichtlinie wird auf globale Werkbänke angewandt (d. h. Werkbänke, die in Data/Import enthalten sind)", + "The retention policy will be applied on global files (files contained in": "Die Aufbewahrungsrichtlinie wird auf globale Dateien angewendet (Dateien, die in", + "The retention policy will be applied on global workbenches (workbenches contained in": "Die Aufbewahrungsrichtlinie wird auf globale Werkbänke angewandt (Werkbänke, die in", "The rule has been disabled, clean-up launched...": "Die Regel wurde deaktiviert, Bereinigung eingeleitet...", "The rule has been enabled, rescan of platform data launched...": "Die Regel wurde aktiviert, erneuter Scan der Plattformdaten gestartet...", "The scenario has been correctly generated in your OpenBAS platform": "Das Szenario wurde korrekt in Ihrer OpenBAS-Plattform generiert", @@ -2937,6 +2940,7 @@ "with the value": "mit dem Wert", "Work end time": "Endzeit der Arbeit", "Work start time": "Startzeit der Arbeit", + "Workbench": "Werkbank", "Workers statistics": "Arbeiterstatistik", "Workflow": "Arbeitsablauf", "Workflow of": "Arbeitsablauf von", diff --git a/opencti-platform/opencti-front/lang/front/en.json b/opencti-platform/opencti-front/lang/front/en.json index 4db1f8c3095e..a39c1c87aea1 100644 --- a/opencti-platform/opencti-front/lang/front/en.json +++ b/opencti-platform/opencti-front/lang/front/en.json @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "File index manager", "Files": "Files", "Files & history": "Files & history", + "Files contained in": "Files contained in", "Files count": "Files count", "Files search": "Files search", "Files size": "Files size", @@ -2203,6 +2204,7 @@ "Relationships view": "Relationships view", "Relative time": "Relative time", "Reliability": "Reliability", + "Remaining": "Remaining", "Remote OpenCTI configuration": "Remote OpenCTI configuration", "Remote OpenCTI stream ID": "Remote OpenCTI stream ID", "Remote OpenCTI token": "Remote OpenCTI token", @@ -2480,6 +2482,7 @@ "Tactical": "Tactical", "Tactics": "Tactics", "Tactics matrix view": "Tactics matrix view", + "Tags": "Tags", "Take deletions into account": "Take deletions into account", "Takedown type": "Takedown type", "Takedown_types": "Takedown Types", @@ -2561,8 +2564,8 @@ "The password has been updated": "The password has been updated", "The public dashboard is disabled": "The public dashboard is disabled", "The relations attached to selected entities will be copied to the merged entity.": "The relations attached to selected entities will be copied to the merged entity.", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "The retention policy will be applied on global files (i.e. files contained in Data/Import)", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)", + "The retention policy will be applied on global files (files contained in": "The retention policy will be applied on global files (files contained in", + "The retention policy will be applied on global workbenches (workbenches contained in": "The retention policy will be applied on global workbenches (workbenches contained in", "The rule has been disabled, clean-up launched...": "The rule has been disabled, clean-up launched...", "The rule has been enabled, rescan of platform data launched...": "The rule has been enabled, rescan of platform data launched...", "The scenario has been correctly generated in your OpenBAS platform": "The scenario has been correctly generated in your OpenBAS platform", @@ -2937,6 +2940,7 @@ "with the value": "with the value", "Work end time": "Work end time", "Work start time": "Work start time", + "Workbench": "Workbench", "Workers statistics": "Workers statistics", "Workflow": "Workflow", "Workflow of": "Workflow of", diff --git a/opencti-platform/opencti-front/lang/front/es.json b/opencti-platform/opencti-front/lang/front/es.json index 4c27dce841a9..d0781f55e9dd 100644 --- a/opencti-platform/opencti-front/lang/front/es.json +++ b/opencti-platform/opencti-front/lang/front/es.json @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "Gestor de índice de archivos", "Files": "Ficheros", "Files & history": "Ficheros y actividad", + "Files contained in": "Archivos contenidos en", "Files count": "Recuento de archivos", "Files search": "Búsqueda de archivos", "Files size": "Tamaño de archivos", @@ -2203,6 +2204,7 @@ "Relationships view": "Vista de relaciones", "Relative time": "Tiempo relativo", "Reliability": "Fiabilidad", + "Remaining": "Resto", "Remote OpenCTI configuration": "Configuración remota de OpenCTI", "Remote OpenCTI stream ID": "ID de la instancia de OpenCTI remota", "Remote OpenCTI token": "Token de autenticación de la instancia de OpenCTI remota", @@ -2480,6 +2482,7 @@ "Tactical": "Táctico", "Tactics": "Tácticas", "Tactics matrix view": "Vista de la matriz de tácticas", + "Tags": "Etiquetas", "Take deletions into account": "Tener en cuenta los borrados", "Takedown type": "Tipo de eliminación", "takedown_types": "tipos derribados", @@ -2561,8 +2564,8 @@ "The password has been updated": "La contraseña se ha modificado", "The public dashboard is disabled": "El panel público está desactivado", "The relations attached to selected entities will be copied to the merged entity.": "Las relaciones adjuntadas a las entidades seleccionadas serán copiadas a la entidad fusionada.", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "La política de conservación se aplicará sobre los ficheros globales (es decir, los ficheros contenidos en Datos/Importación)", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "La política de retención se aplicará a los bancos de trabajo globales (es decir, los bancos de trabajo contenidos en Datos/Importar)", + "The retention policy will be applied on global files (files contained in": "La política de retención se aplicará a los ficheros globales (ficheros contenidos en", + "The retention policy will be applied on global workbenches (workbenches contained in": "La política de retención se aplicará a los bancos de trabajo globales (bancos de trabajo contenidos en", "The rule has been disabled, clean-up launched...": "La regla ha sido desactivada, limpieza lanzada...", "The rule has been enabled, rescan of platform data launched...": "La regla ha sido activada, reescaneo de los datos de la plataforma lanzado...", "The scenario has been correctly generated in your OpenBAS platform": "El escenario se ha generado correctamente en su plataforma OpenBAS", @@ -2937,6 +2940,7 @@ "with the value": "con el valor", "Work end time": "Hora de fin de la ejecución", "Work start time": "Hora de inicio de la ejecución", + "Workbench": "Banco de trabajo", "Workers statistics": "Estadísticas de los trabajadores", "Workflow": "Flujo de trabajo", "Workflow of": "Flujo de trabajo de", diff --git a/opencti-platform/opencti-front/lang/front/fr.json b/opencti-platform/opencti-front/lang/front/fr.json index 49956dc4b068..6341c22d2b47 100644 --- a/opencti-platform/opencti-front/lang/front/fr.json +++ b/opencti-platform/opencti-front/lang/front/fr.json @@ -258,7 +258,7 @@ "Be careful, you are about to delete the selected entities (not the relationships)": "Attention, vous êtes sur le point de supprimer les entités sélectionnées (pas les relations)", "Be careful, you are about to delete the selected observables (not the relationships)": "Attention, vous êtes sur le point de supprimer les observables sélectionnés (pas les relations)", "Bearer token": "Jeton d'authentification", - "Because by default the workbench won't include the updates made on the entity after the creation of the workbench.": "Car par défaut, l'atelier n'inclura pas les mises à jour effectuées sur l'entité après la création de l'atelier.", + "Because by default the workbench won't include the updates made on the entity after the creation of the workbench.": "Car par défaut, l'espace de travail n'inclura pas les mises à jour effectuées sur l'entité après la création de l'atelier.", "Before creating a ticket with your support package takes some time to check if you can safely share the content depending of your security policy.": "Avant de créer un ticket avec votre dossier d'assistance, prenez le temps de vérifier si vous pouvez partager le contenu en toute sécurité en fonction de votre politique de sécurité.", "Belonging to this organization": "Appartenant à cette organisa.", "Biographic Information": "Informations biographiques", @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "Manager d'indexation des fichiers", "Files": "Fichiers", "Files & history": "Fichiers & activité", + "Files contained in": "Fichiers contenus dans", "Files count": "Nombre de fichiers", "Files search": "Recherche de fichiers", "Files size": "Taille des fichiers", @@ -1216,7 +1217,7 @@ "Global parameters": "Paramètres généraux", "Global search": "Recherche globale", "Global streams are available for granted users. Live at /stream/live and raw at /stream": "Les flux globaux sont disponibles pour les utilisateurs autorisés. Live à /stream/live et raw à /stream", - "Global workbenches": "Établis globaux", + "Global workbenches": "Espaces de travail globaux", "Go to dashboard": "Aller au tableau de bord", "Go to investigation": "Aller à l'enquête", "Go to Original dashboard": "Aller au tableau de bord original", @@ -1257,7 +1258,7 @@ "hash_sha-256": "SHA256", "hash_sha-512": "SHA512", "have been found.": "ont été trouvés.", - "Having this checked means the last version of the entity linked to the workbench will be fetched from database before executing the workbench.": "Le fait de cocher cette case signifie que la dernière version de l'entité liée à l'atelier sera extraite de la base de données avant l'exécution de l'atelier.", + "Having this checked means the last version of the entity linked to the workbench will be fetched from database before executing the workbench.": "Le fait de cocher cette case signifie que la dernière version de l'entité liée à l'espace de travail sera extraite de la base de données avant l'exécution de l'espace de travail.", "Heatmap": "Carte de chaleur", "Height": "Hauteur", "here": "ici", @@ -1324,7 +1325,7 @@ "In progress tasks": "Tâches en cours", "In progress works": "Exécutions en cours", "In this report, ": "Dans ce rapport, ", - "In workbench": "Dans l'établi", + "In workbench": "Dans l'espace de travail", "Inactive": "Inactif", "Incident": "Incident", "Incident Date": "Date de l'incident", @@ -2203,6 +2204,7 @@ "Relationships view": "Vue relations", "Relative time": "Temps relatif", "Reliability": "Fiabilité", + "Remaining": "Restant", "Remote OpenCTI configuration": "Configuration de la plateforme OpenCTI distante", "Remote OpenCTI stream ID": "ID du stream de la plateforme distante", "Remote OpenCTI token": "Token de la plateforme distante", @@ -2480,6 +2482,7 @@ "Tactical": "Tactique", "Tactics": "Tactiques", "Tactics matrix view": "Vue matrice de tactiques", + "Tags": "Tags", "Take deletions into account": "Prendre en compte les suppressions", "Takedown type": "Type de retrait", "takedown_types": "types de retraits", @@ -2561,8 +2564,8 @@ "The password has been updated": "Le mot de passe a été modifié", "The public dashboard is disabled": "Le tableau de bord public est désactivé", "The relations attached to selected entities will be copied to the merged entity.": "Les relations attachées aux entités sélectionnées seront copiées sur l'entité fusionnée.", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "La politique de conservation sera appliquée aux fichiers globaux (c.-à-d. les fichiers contenus dans Data/Import)", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "La politique de conservation sera appliquée sur les établis globaux (c'est-à-dire les établis contenus dans Data/Import)", + "The retention policy will be applied on global files (files contained in": "La politique de conservation sera appliquée aux fichiers globaux (fichiers contenus dans", + "The retention policy will be applied on global workbenches (workbenches contained in": "La politique de conservation sera appliquée sur les postes de travail globaux (postes de travail contenus dans", "The rule has been disabled, clean-up launched...": "La règle a été déséactivée, purge lancée...", "The rule has been enabled, rescan of platform data launched...": "La règle a été activée, re-scan des données de la plateforme lancé...", "The scenario has been correctly generated in your OpenBAS platform": "Le scénario a été correctement généré dans votre plateforme OpenBAS", @@ -2937,6 +2940,7 @@ "with the value": "avec la valeur", "Work end time": "Fin de l'éxécution", "Work start time": "Début de l'exécution", + "Workbench": "Espace de travail", "Workers statistics": "Statistiques des workers", "Workflow": "Flux de travail", "Workflow of": "Flux de travail de", diff --git a/opencti-platform/opencti-front/lang/front/ja.json b/opencti-platform/opencti-front/lang/front/ja.json index bd36d533e8c3..4aae1ae8ff7b 100644 --- a/opencti-platform/opencti-front/lang/front/ja.json +++ b/opencti-platform/opencti-front/lang/front/ja.json @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "ファイル索引マネージャー", "Files": "ファイル", "Files & history": "ファイルと履歴", + "Files contained in": "に含まれるファイル", "Files count": "ファイル数", "Files search": "ファイル検索", "Files size": "ファイルサイズ", @@ -2203,6 +2204,7 @@ "Relationships view": "関係ビュー", "Relative time": "相対時間", "Reliability": "信頼性", + "Remaining": "残り", "Remote OpenCTI configuration": "リモート OpenCTI 構成", "Remote OpenCTI stream ID": "リモートOpenCTI ストリームID", "Remote OpenCTI token": "リモートOpenCTI トークン", @@ -2480,6 +2482,7 @@ "Tactical": "戦術的", "Tactics": "戦術", "Tactics matrix view": "戦術マトリックスの表示", + "Tags": "タグ", "Take deletions into account": "削除されたものを考慮する", "Takedown type": "テイクダウンの種類", "takedown_types": "テイクダウンの種類", @@ -2561,8 +2564,8 @@ "The password has been updated": "パスワードを変更しました", "The public dashboard is disabled": "公開ダッシュボードは無効", "The relations attached to selected entities will be copied to the merged entity.": "選択されたエンティティに付属するリレーションは、マージされたエンティティにコピーされます。", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "保存ポリシーはグローバルファイル(データ/インポートに含まれるファイル)に適用されます。", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "保存ポリシーはグローバルワークベンチ(Data/Import に含まれるワークベンチ)に適用されます。", + "The retention policy will be applied on global files (files contained in": "に含まれるファイル)に適用されます。", + "The retention policy will be applied on global workbenches (workbenches contained in": "に含まれるワークベンチ)に適用されます。", "The rule has been disabled, clean-up launched...": "ルールは無効化され、クリーンアップが開始されました...", "The rule has been enabled, rescan of platform data launched...": "ルールが有効化され、プラットフォームデータの再スキャンが開始されました...", "The scenario has been correctly generated in your OpenBAS platform": "シナリオはOpenBASプラットフォームで正しく生成されました。", @@ -2937,6 +2940,7 @@ "with the value": "値", "Work end time": "作業終了時刻", "Work start time": "作業開始時刻", + "Workbench": "ワークベンチ", "Workers statistics": "ワーカーの統計", "Workflow": "ワークフロー", "Workflow of": "ワークフロー", diff --git a/opencti-platform/opencti-front/lang/front/ko.json b/opencti-platform/opencti-front/lang/front/ko.json index 070d276d9f1b..424b98b084f0 100644 --- a/opencti-platform/opencti-front/lang/front/ko.json +++ b/opencti-platform/opencti-front/lang/front/ko.json @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "파일 인덱스 관리자", "Files": "파일", "Files & history": "파일 및 기록", + "Files contained in": "에 포함된 파일", "Files count": "파일 수", "Files search": "파일 검색", "Files size": "파일 크기", @@ -2203,6 +2204,7 @@ "Relationships view": "관계 보기", "Relative time": "상대 시간", "Reliability": "신뢰성", + "Remaining": "남아있음", "Remote OpenCTI configuration": "원격 OpenCTI 구성", "Remote OpenCTI stream ID": "원격 OpenCTI 스트림 ID", "Remote OpenCTI token": "원격 OpenCTI 토큰", @@ -2480,6 +2482,7 @@ "Tactical": "전술적", "Tactics": "전술", "Tactics matrix view": "전술 매트릭스 보기", + "Tags": "태그", "Take deletions into account": "삭제 고려", "Takedown type": "삭제 유형", "Takedown_types": "삭제 유형", @@ -2561,8 +2564,8 @@ "The password has been updated": "비밀번호가 업데이트되었습니다", "The public dashboard is disabled": "공용 대시보드가 비활성화되었습니다", "The relations attached to selected entities will be copied to the merged entity.": "선택된 엔터티에 연결된 관계가 병합된 엔터티로 복사됩니다.", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "보존 정책은 글로벌 파일(즉, 데이터/가져오기에 포함된 파일)에 적용됩니다", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "보존 정책이 글로벌 워크벤치(즉, 데이터/가져오기에 포함된 워크벤치)에 적용됩니다", + "The retention policy will be applied on global files (files contained in": "보존 정책은 글로벌 파일(", + "The retention policy will be applied on global workbenches (workbenches contained in": "에 포함된 파일)에 적용됩니다", "The rule has been disabled, clean-up launched...": "규칙이 비활성화되었습니다, 정리 시작...", "The rule has been enabled, rescan of platform data launched...": "규칙이 활성화되었습니다, 플랫폼 데이터 다시 스캔 시작...", "The scenario has been correctly generated in your OpenBAS platform": "시나리오가 OpenBAS 플랫폼에서 올바르게 생성되었습니다", @@ -2937,6 +2940,7 @@ "with the value": "값과 함께", "Work end time": "작업 종료 시간", "Work start time": "작업 시작 시간", + "Workbench": "워크벤치", "Workers statistics": "작업자 통계", "Workflow": "워크플로우", "Workflow of": "의 워크플로우", diff --git a/opencti-platform/opencti-front/lang/front/zh.json b/opencti-platform/opencti-front/lang/front/zh.json index ed90223b2474..9d794061d8e4 100644 --- a/opencti-platform/opencti-front/lang/front/zh.json +++ b/opencti-platform/opencti-front/lang/front/zh.json @@ -1156,6 +1156,7 @@ "FILE_INDEX_MANAGER": "文件索引管理器", "Files": "文件", "Files & history": "文件 & 历史", + "Files contained in": "文件包含在", "Files count": "文件数", "Files search": "文件搜索", "Files size": "文件大小", @@ -2203,6 +2204,7 @@ "Relationships view": "关系视图", "Relative time": "相对时间", "Reliability": "可靠性", + "Remaining": "剩余", "Remote OpenCTI configuration": "远程 OpenCTI 配置", "Remote OpenCTI stream ID": "远程OpenCTI流ID", "Remote OpenCTI token": "远程OpenCTI token", @@ -2480,6 +2482,7 @@ "Tactical": "战术", "Tactics": "战术", "Tactics matrix view": "战术矩阵视图", + "Tags": "标签", "Take deletions into account": "考虑删除", "Takedown type": "删除类型", "takedown_types": "删除类型", @@ -2561,8 +2564,8 @@ "The password has been updated": "密码已更新", "The public dashboard is disabled": "公共仪表板已禁用", "The relations attached to selected entities will be copied to the merged entity.": "附加到选定实体的关系将复制到归并的实体中。", - "The retention policy will be applied on global files (i.e. files contained in Data/Import)": "保留策略将应用于全局文件(即数据/导入中包含的文件)", - "The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)": "保留策略将应用于全局工作台(即数据/导入中包含的工作台)", + "The retention policy will be applied on global files (files contained in": "保留策略将应用于全局文件(包含在", + "The retention policy will be applied on global workbenches (workbenches contained in": "保留策略将应用于全局工作台(工作台包含在", "The rule has been disabled, clean-up launched...": "该规则已禁用,清理已启动", "The rule has been enabled, rescan of platform data launched...": "该规则已启用,平台数据的重新扫描已启动", "The scenario has been correctly generated in your OpenBAS platform": "场景已在 OpenBAS 平台正确生成", @@ -2937,6 +2940,7 @@ "with the value": "与值", "Work end time": "工作结束时间", "Work start time": "工作开始时间", + "Workbench": "工作台", "Workers statistics": "工作器统计", "Workflow": "工作流程", "Workflow of": "的工作流程", diff --git a/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionCreation.tsx b/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionCreation.tsx index b32b86aaab93..7a35e8dec372 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionCreation.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionCreation.tsx @@ -209,9 +209,9 @@ const RetentionCreation = ({ paginationOptions }: { paginationOptions: Retention fullWidth={true} onChange={setFieldValue} options={[ - { value: 'knowledge', label: 'Knowledge' }, - { value: 'file', label: 'File' }, - { value: 'workbench', label: 'Workbench' }, + { value: 'knowledge', label: t_i18n('Knowledge') }, + { value: 'file', label: t_i18n('File') }, + { value: 'workbench', label: t_i18n('Workbench') }, ]} renderOption={(prop: Record, option: Option) => (
  • @@ -224,12 +224,12 @@ const RetentionCreation = ({ paginationOptions }: { paginationOptions: Retention /> {formValues.scope?.value === 'file' && - {t_i18n('The retention policy will be applied on global files (i.e. files contained in Data/Import)')} + {`${t_i18n('The retention policy will be applied on global files (files contained in')} ${t_i18n('Data')}/${t_i18n('Import')})`} } {formValues.scope?.value === 'workbench' && - {t_i18n('The retention policy will be applied on global workbenches (i.e. workbenches contained in Data/Import)')} + {`${t_i18n('The retention policy will be applied on global workbenches (workbenches contained in')} ${t_i18n('Data')}/${t_i18n('Import')})`} } {formValues.scope?.value === 'knowledge' && <> diff --git a/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionLine.tsx b/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionLine.tsx index 9194120c9b3a..fce86758630f 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionLine.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/retention/RetentionLine.tsx @@ -140,9 +140,7 @@ export const RetentionLine: FunctionComponent = ({ dataColum {appliedOnContent} {data.scope !== 'knowledge' && { const { filters, max_retention: maxDays, scope, retention_unit: unit } = input; - const jsonFilters = filters ? JSON.parse(filters) : null; const before = utcDate().subtract(maxDays, unit ?? 'days'); - const queryOptions = await convertFiltersToQueryOptions(jsonFilters, { before }); let result = []; + // knowledge rule if (scope === 'knowledge') { + const jsonFilters = filters ? JSON.parse(filters) : null; + const queryOptions = await convertFiltersToQueryOptions(jsonFilters, { before }); result = await elPaginate(context, RETENTION_MANAGER_USER, READ_DATA_INDICES_WITHOUT_INFERRED, queryOptions); - } else if (scope === 'file') { + return result.pageInfo.globalCount; + } + // file and workbench rules + if (scope === 'file') { result = await paginatedForPathWithEnrichment( context, RETENTION_MANAGER_USER, @@ -39,7 +43,12 @@ export const checkRetentionRule = async (context, input) => { } else { logApp.error(`[Retention manager] Scope ${scope} not existing for Retention Rule.`); } - return result.pageInfo.globalCount; + if (scope === 'file' || scope === 'workbench') { // don't delete progress files or files with works in progress + const resultEdges = result.edges.filter((e) => DELETABLE_FILE_STATUSES.includes(e.node.uploadStatus) + && (e.node.works ?? []).every((work) => !work || DELETABLE_FILE_STATUSES.includes(work?.status))); + result.edges = resultEdges; + } + return result.edges.length; }; // input { name, filters } diff --git a/opencti-platform/opencti-graphql/src/generated/graphql.ts b/opencti-platform/opencti-graphql/src/generated/graphql.ts index 6fcd53b83e90..a22eba655df1 100644 --- a/opencti-platform/opencti-graphql/src/generated/graphql.ts +++ b/opencti-platform/opencti-graphql/src/generated/graphql.ts @@ -22277,6 +22277,7 @@ export type RetentionRuleEditMutationsFieldPatchArgs = { }; export enum RetentionRuleOrdering { + Score = '_score', LastExecutionDate = 'last_execution_date', MaxRetention = 'max_retention', Name = 'name', diff --git a/opencti-platform/opencti-graphql/src/manager/retentionManager.ts b/opencti-platform/opencti-graphql/src/manager/retentionManager.ts index 466025ead2dc..fe6e7f149eec 100644 --- a/opencti-platform/opencti-graphql/src/manager/retentionManager.ts +++ b/opencti-platform/opencti-graphql/src/manager/retentionManager.ts @@ -13,7 +13,7 @@ import { registerManager } from './managerModule'; import type { AuthContext } from '../types/user'; import type { FileEdge, RetentionRule } from '../generated/graphql'; import { deleteFile } from '../database/file-storage'; -import { paginatedForPathWithEnrichment } from '../modules/internal/document/document-domain'; +import { DELETABLE_FILE_STATUSES, paginatedForPathWithEnrichment } from '../modules/internal/document/document-domain'; const RETENTION_MANAGER_ENABLED = booleanConf('retention_manager:enabled', false); const RETENTION_MANAGER_START_ENABLED = booleanConf('retention_manager:enabled', true); @@ -59,9 +59,9 @@ export const getElementsToDelete = async (context: AuthContext, scope: string, b } else { throw Error(`[Retention manager] Scope ${scope} not existing for Retention Rule.`); } - if (scope === 'file' || scope === 'workbench') { // don't delete files with ongoing works or incomplete status - const resultEdges = result.edges.filter((e: FileEdge) => e.node.uploadStatus === 'complete' - && (e.node.works ?? []).every((work) => work?.status === 'complete')); + if (scope === 'file' || scope === 'workbench') { // don't delete progress files or files with works in progress + const resultEdges = result.edges.filter((e: FileEdge) => DELETABLE_FILE_STATUSES.includes(e.node.uploadStatus) + && (e.node.works ?? []).every((work) => !work || DELETABLE_FILE_STATUSES.includes(work?.status))); result.edges = resultEdges; } return result; diff --git a/opencti-platform/opencti-graphql/src/modules/internal/document/document-domain.ts b/opencti-platform/opencti-graphql/src/modules/internal/document/document-domain.ts index aeb7c934892e..d07bc9a391b2 100644 --- a/opencti-platform/opencti-graphql/src/modules/internal/document/document-domain.ts +++ b/opencti-platform/opencti-graphql/src/modules/internal/document/document-domain.ts @@ -21,6 +21,7 @@ import { ForbiddenAccess } from '../../../config/errors'; import { RELATION_OBJECT_MARKING } from '../../../schema/stixRefRelationship'; import { buildRefRelationKey } from '../../../schema/general'; +export const DELETABLE_FILE_STATUSES = ['complete', 'timeout']; export const getIndexFromDate = async (context: AuthContext) => { const searchOptions = { first: 1, diff --git a/opencti-platform/opencti-graphql/tests/02-integration/04-manager/retentionManager-test.ts b/opencti-platform/opencti-graphql/tests/02-integration/04-manager/retentionManager-test.ts index 565105854127..590ac7df4aea 100644 --- a/opencti-platform/opencti-graphql/tests/02-integration/04-manager/retentionManager-test.ts +++ b/opencti-platform/opencti-graphql/tests/02-integration/04-manager/retentionManager-test.ts @@ -102,7 +102,7 @@ describe('Retention Manager tests ', () => { expect(file?.lastModified).toEqual(lastModified); expect(file?.uploadStatus).toEqual('complete'); expect(file?.id).toEqual(fileId); - // create a file not modified since '2023-01-01T00:00:00.000Z' and with uploadStatus = 'pending' + // create a file not modified since '2023-01-01T00:00:00.000Z' and with uploadStatus = 'progress' const progressFileToUpload = { createReadStream: () => Readable.from('This is a file content.'), filename: progressFileName,