Skip to content

Commit

Permalink
[backend/frontend] enable custom overview layout for most entities (#…
Browse files Browse the repository at this point in the history
…6724)

Co-authored-by: Romy Alula <romy.alula@filigran.io>
  • Loading branch information
labo-flg and Goumies authored Aug 21, 2024
1 parent e0fcc48 commit e3fe53a
Show file tree
Hide file tree
Showing 91 changed files with 2,936 additions and 1,859 deletions.
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "Licht sekundär",
"Ligth logo login": "Ligth logo login",
"Likelihood": "Wahrscheinlichkeiten",
"Linked objects": "Verknüpfte Objekte",
"Linked to": "Verknüpft mit",
"List of parameters": "Liste der Parameter",
"Listen deletion": "Listenlöschung",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "Zielsetzung",
"Observable content": "Observierbarer Inhalt",
"Observable description": "Observable Beschreibung",
"Observables": "Observables",
"Opened connection": "Geöffnete Verbindung",
"Operating System": "Betriebssystem",
"Operation": "Operation",
Expand All @@ -470,7 +472,9 @@
"Organization": "Organisation",
"Organization type": "Organisationstyp",
"Organizations": "Organisationen",
"Origin of the case": "Ursprung des Falles",
"Original creation date": "Ursprüngliches Erstellungsdatum",
"Other entities": "Andere Entitäten",
"OTP mandatory": "OTP obligatorisch",
"OTP QR": "OTP QR",
"OTP secret": "OTP-Geheimnis",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "Empfangsdatum",
"Recipients": "Empfänger",
"Related creator": "Verwandter Ersteller",
"Related entities": "Verwandte Einrichtungen",
"Related entity": "Verwandte Entität",
"Related external reference": "Zugehörige externe Referenz",
"Related type": "Verwandter Typ",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "Aktualisiert am",
"Upload date": "Datum des Hochladens",
"Upload status": "Upload-Status",
"Uploaded files": "Hochgeladene Dateien",
"URI": "URI",
"Uri": "Uri",
"Uri key": "Uri-Schlüssel",
Expand Down
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "Light secondary",
"Ligth logo login": "Ligth logo login",
"Likelihood": "Likelihood",
"Linked objects": "Linked objects",
"Linked to": "Linked to",
"List of parameters": "List of parameters",
"Listen deletion": "Listen deletion",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "Objective",
"Observable content": "Observable content",
"Observable description": "Observable description",
"Observables": "Observables",
"Opened connection": "Opened connection",
"Operating System": "Operating System",
"Operation": "Operation",
Expand All @@ -470,7 +472,9 @@
"Organization": "Organization",
"Organization type": "Organization type",
"Organizations": "Organizations",
"Origin of the case": "Origin of the case",
"Original creation date": "Original creation date",
"Other entities": "Other entities",
"OTP mandatory": "OTP mandatory",
"OTP QR": "OTP QR",
"OTP secret": "OTP secret",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "Reception date",
"Recipients": "Recipients",
"Related creator": "Related creator",
"Related entities": "Related entities",
"Related entity": "Related entity",
"Related external reference": "Related external reference",
"Related type": "Related type",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "Updated at",
"Upload date": "Upload date",
"Upload status": "Upload status",
"Uploaded files": "Uploaded files",
"URI": "URI",
"Uri": "Uri",
"Uri key": "Uri key",
Expand Down
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "Luz secundaria",
"Ligth logo login": "Logo Ligth login",
"Likelihood": "Probabilidad",
"Linked objects": "Objetos vinculados",
"Linked to": "Vinculado a",
"List of parameters": "Lista de parámetros",
"Listen deletion": "Escuchar supresión",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "Objetivo",
"Observable content": "Contenido observable",
"Observable description": "Descripción observable",
"Observables": "Observables",
"Opened connection": "Conexión abierta",
"Operating System": "Sistema Operativo",
"Operation": "Operación",
Expand All @@ -470,7 +472,9 @@
"Organization": "Organización",
"Organization type": "Tipo de organización",
"Organizations": "Organizaciones",
"Origin of the case": "Origen del caso",
"Original creation date": "Fecha de creación original",
"Other entities": "Otras entidades",
"OTP mandatory": "OTP obligatorio",
"OTP QR": "OTP QR",
"OTP secret": "Secreto OTP",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "Fecha de recepción",
"Recipients": "Destinatarios",
"Related creator": "Creador relacionado",
"Related entities": "Entidades relacionadas",
"Related entity": "Entidad relacionada",
"Related external reference": "Referencia externa relacionada",
"Related type": "Tipo relacionado",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "Actualizado en",
"Upload date": "Fecha de carga",
"Upload status": "Estado de carga",
"Uploaded files": "Archivos cargados",
"URI": "URI",
"Uri": "Uri",
"Uri key": "Clave Uri",
Expand Down
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "Lumière secondaire",
"Ligth logo login": "Logo léger login",
"Likelihood": "Vraisemblance",
"Linked objects": "Objets liés",
"Linked to": "Lié à",
"List of parameters": "Liste des paramètres",
"Listen deletion": "Écouter la suppression",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "Objectif",
"Observable content": "Contenu observable",
"Observable description": "Description de l'observable",
"Observables": "Observables",
"Opened connection": "Connexion ouverte",
"Operating System": "Système d'exploitation",
"Operation": "Opération",
Expand All @@ -470,7 +472,9 @@
"Organization": "Organisation",
"Organization type": "Type d'organisation",
"Organizations": "Organisations",
"Origin of the case": "Origine du cas",
"Original creation date": "Date de création originale",
"Other entities": "Autres entités",
"OTP mandatory": "OTP obligatoire",
"OTP QR": "OTP QR",
"OTP secret": "OTP secret",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "Date de réception",
"Recipients": "Destinataires",
"Related creator": "Créateur associé",
"Related entities": "Entités apparentées",
"Related entity": "Entité apparentée",
"Related external reference": "Référence externe connexe",
"Related type": "Type apparenté",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "Mis à jour le",
"Upload date": "Date de téléchargement",
"Upload status": "Statut du téléchargement",
"Uploaded files": "Fichiers téléchargés",
"URI": "URI",
"Uri": "Uri",
"Uri key": "Clé Uri",
Expand Down
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "ライトセカンダリ",
"Ligth logo login": "ライトロゴのログイン",
"Likelihood": "コンテンツマッピング",
"Linked objects": "リンクオブジェクト",
"Linked to": "リンク先",
"List of parameters": "パラメータ一覧",
"Listen deletion": "リッスン削除",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "概要",
"Observable content": "観測可能な内容",
"Observable description": "観測可能な記述",
"Observables": "観測可能なもの",
"Opened connection": "オープン接続",
"Operating System": "インストールされているソフトウェア",
"Operation": "操作",
Expand All @@ -470,7 +472,9 @@
"Organization": "組織",
"Organization type": "権限",
"Organizations": "団体",
"Origin of the case": "ケースの由来",
"Original creation date": "オリジナル作成日",
"Other entities": "その他",
"OTP mandatory": "OTP必須",
"OTP QR": "ワンタイムパスワードQR",
"OTP secret": "OTPシークレット",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "受付日",
"Recipients": "トリガーID",
"Related creator": "関連外部参照",
"Related entities": "関連団体",
"Related entity": "関連エンティティ",
"Related external reference": "ファイルメッセージ",
"Related type": "関連タイプ",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "更新日時",
"Upload date": "ファイル識別子",
"Upload status": "ファイルのメタデータ",
"Uploaded files": "アップロードされたファイル",
"URI": "URI",
"Uri": "ウリ",
"Uri key": "Uri キー",
Expand Down
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "밝은 보조 색상",
"Ligth logo login": "밝은 로고 로그인",
"Likelihood": "가능성",
"Linked objects": "연결된 개체",
"Linked to": "연결됨",
"List of parameters": "매개변수 목록",
"Listen deletion": "삭제 청취",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "목표",
"Observable content": "관찰 가능 내용",
"Observable description": "관찰 가능 설명",
"Observables": "관찰 가능 항목",
"Opened connection": "열린 연결",
"Operating System": "운영체제",
"Operation": "작업",
Expand All @@ -470,7 +472,9 @@
"Organization": "조직",
"Organization type": "조직 유형",
"Organizations": "조직들",
"Origin of the case": "사례의 출처",
"Original creation date": "원본 생성 날짜",
"Other entities": "기타 엔티티",
"OTP mandatory": "OTP 필수",
"OTP QR": "OTP QR",
"OTP secret": "OTP 비밀키",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "수신 날짜",
"Recipients": "수신자",
"Related creator": "관련된 생성자",
"Related entities": "관련 엔터티",
"Related entity": "관련된 엔터티",
"Related external reference": "관련된 외부 참조",
"Related type": "관련된 유형",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "업데이트 날짜",
"Upload date": "업로드 날짜",
"Upload status": "업로드 상태",
"Uploaded files": "업로드된 파일",
"URI": "URI",
"Uri": "Uri",
"Uri key": "Uri 키",
Expand Down
6 changes: 6 additions & 0 deletions opencti-platform/opencti-front/lang/back/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"Light secondary": "浅色附属",
"Ligth logo login": "浅色登录标志",
"Likelihood": "可能性",
"Linked objects": "链接对象",
"Linked to": "链接到",
"List of parameters": "参数列表",
"Listen deletion": "监听删除",
Expand Down Expand Up @@ -461,6 +462,7 @@
"Objective": "目标",
"Observable content": "可观测内容",
"Observable description": "可观察描述",
"Observables": "可观测",
"Opened connection": "打开的连接",
"Operating System": "操作系统",
"Operation": "操作",
Expand All @@ -470,7 +472,9 @@
"Organization": "组织",
"Organization type": "组织类型",
"Organizations": "组织",
"Origin of the case": "案件来源",
"Original creation date": "原始创建日期",
"Other entities": "其他实体",
"OTP mandatory": "必须使用 OTP",
"OTP QR": "OTP QR",
"OTP secret": "OTP密码",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Reception date": "接收日期",
"Recipients": "收件人",
"Related creator": "相关创建者",
"Related entities": "相关实体",
"Related entity": "相关实体",
"Related external reference": "相关外部参考",
"Related type": "相关类型",
Expand Down Expand Up @@ -670,6 +675,7 @@
"Updated at": "更新于",
"Upload date": "上传日期",
"Upload status": "上传状态",
"Uploaded files": "上传的文件",
"URI": "URI",
"Uri": "Uri",
"Uri key": "Uri key",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ExternalReferenceFileImportViewer from './ExternalReferenceFileImportView
import ExternalReferenceStixCoreObjects from './ExternalReferenceStixCoreObjects';
import { ExternalReference_externalReference$data } from './__generated__/ExternalReference_externalReference.graphql';
import { KNOWLEDGE_KNUPDATE } from '../../../../utils/hooks/useGranted';
import useOverviewLayoutCustomization from '../../../../utils/hooks/useOverviewLayoutCustomization';

// Deprecated - https://mui.com/system/styles/basics/
// Do not use it for new code.
Expand Down Expand Up @@ -42,6 +43,7 @@ ExternalReferenceComponentProps
const classes = useStyles();
const { isFeatureEnable } = useHelper();
const isFABReplaced = isFeatureEnable('FAB_REPLACEMENT');
const overviewLayoutCustomization = useOverviewLayoutCustomization('External-Reference');
return (
<div className={classes.container}>
<ExternalReferenceHeader
Expand All @@ -60,23 +62,43 @@ ExternalReferenceComponentProps
spacing={3}
classes={{ container: classes.gridContainer }}
>
<Grid item xs={6} >
<ExternalReferenceOverview externalReference={externalReference} />
</Grid>
<Grid item xs={6} >
<ExternalReferenceDetails externalReference={externalReference} />
</Grid>
<Grid item xs={6}>
<ExternalReferenceStixCoreObjects
externalReference={externalReference}
/>
</Grid>
<Grid item xs={6}>
<ExternalReferenceFileImportViewer
externalReference={externalReference}
connectorsImport={connectorsImport}
/>
</Grid>
{
overviewLayoutCustomization.map(({ key, width }) => {
switch (key) {
case 'basicInformation':
return (
<Grid key={key} item xs={width}>
<ExternalReferenceOverview externalReference={externalReference} />
</Grid>
);
case 'details':
return (
<Grid key={key} item xs={width}>
<ExternalReferenceDetails externalReference={externalReference} />
</Grid>
);
case 'linkedObjects':
return (
<Grid key={key} item xs={width}>
<ExternalReferenceStixCoreObjects
externalReference={externalReference}
/>
</Grid>
);
case 'uploadedFiles':
return (
<Grid key={key} item xs={width}>
<ExternalReferenceFileImportViewer
externalReference={externalReference}
connectorsImport={connectorsImport}
/>
</Grid>
);
default:
return null;
}
})
}
</Grid>
{!isFABReplaced && (
<Security needs={[KNOWLEDGE_KNUPDATE]}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ExternalReferenceStixCoreObjectsComponent = ({ externalReference }) => {
<Typography variant="h4" gutterBottom={true}>
{t_i18n('Linked objects')}
</Typography>
<Paper classes={{ root: classes.paper }} variant="outlined">
<Paper classes={{ root: classes.paper }} className={'paper-for-grid'} variant="outlined">
<List classes={{ root: classes.list }}>
{stixCoreObjects.map((stixCoreObjectOrRelationship) => (
<ListItem
Expand Down
Loading

0 comments on commit e3fe53a

Please sign in to comment.