Skip to content

Commit

Permalink
[backend/frontend] Adding support package feature + copy/paste of UI …
Browse files Browse the repository at this point in the history
…errors (#5548)

Co-authored-by: BocognanoSarah <sarah.bocognano@filigran.io>
  • Loading branch information
aHenryJard and SarahBocognano committed May 2, 2024
1 parent cc8be5f commit d6fc1aa
Show file tree
Hide file tree
Showing 63 changed files with 2,207 additions and 130 deletions.
18 changes: 18 additions & 0 deletions opencti-platform/opencti-dev/1 - Backend start.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="1 - Backend start" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/opencti-platform/opencti-graphql/package.json" />
<command value="run" />
<scripts>
<script value="start" />
</scripts>
<node-interpreter value="project" />
<package-manager value="yarn" />
<envs>
<env name="APP__PORT" value="4000" />
<env name="ENV" value="development" />
<env name="NODE_ENV" value="dev" />
<env name="APP__NODE_IDENTIFIER" value="dev-node-1" />
</envs>
<method v="2" />
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Frontend start" type="js.build_tools.npm">
<configuration default="false" name="1 - Frontend start" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/opencti-platform/opencti-front/package.json" />
<command value="start" />
<node-interpreter value="project" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="2 - Backend start cluster (second platform)" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/opencti-platform/opencti-graphql/package.json" />
<command value="run" />
<scripts>
<script value="start:light" />
</scripts>
<node-interpreter value="project" />
<package-manager value="yarn" />
<envs>
<env name="APP__PORT" value="4001" />
<env name="ENV" value="development" />
<env name="NODE_ENV" value="dev" />
<env name="APP__NODE_IDENTIFIER" value="dev-node-2" />
</envs>
<method v="2" />
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="2 - Frontend start cluster (second platform)" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/opencti-platform/opencti-front/package.json" />
<command value="start" />
<node-interpreter value="project" />
<package-manager value="yarn" />
<envs>
<env name="BACK_END_URL" value="http://localhost:4001" />
<env name="FRONT_END_PORT" value="3001" />
</envs>
<method v="2" />
</configuration>
</component>
10 changes: 0 additions & 10 deletions opencti-platform/opencti-dev/Backend start.run.xml

This file was deleted.

5 changes: 3 additions & 2 deletions opencti-platform/opencti-front/builder/dev/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const fsExtra = require("fs-extra");
const basePath = "";
const clients = [];
const buildPath = "./builder/dev/build/";
const frontPort = process.env.FRONT_END_PORT ?? 3000;
const debounce = (func, timeout = 500) => {
let timer;
return (...args) => {
Expand All @@ -34,7 +35,7 @@ esbuild.context({
publicPath: "/",
bundle: true,
banner: {
js: ' (() => new EventSource("http://localhost:3000/dev").onmessage = () => location.reload())();',
js: ` (() => new EventSource("http://localhost:${frontPort}/dev").onmessage = () => location.reload())();`,
},
loader: {
".js": "jsx",
Expand Down Expand Up @@ -132,6 +133,6 @@ esbuild.context({
}
return res.send(withOptionValued);
});
app.listen(3000);
app.listen(frontPort);
// endregion
});
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 @@ -181,6 +181,7 @@
"Disabled": "Deaktiviert",
"Display name": "Name anzeigen",
"DLL service": "DLL-Dienst",
"Do you want to delete this support package?": "Möchten Sie dieses Support-Paket löschen?",
"DST": "DST",
"DST byte count": "DST-Byte-Anzahl",
"DST packets": "DST-Pakete",
Expand Down Expand Up @@ -419,6 +420,7 @@
"Notifiers": "Melder",
"Number": "Nummer",
"Number observed": "Anzahl beobachtet",
"Number of nodes in cluster": "Anzahl der Knoten im Cluster",
"Number of sub-keys": "Anzahl von Unterschlüsseln",
"Object markings": "Objektmarkierungen",
"Objective": "Zielsetzung",
Expand All @@ -441,6 +443,10 @@
"Outcomes": "Ergebnisse",
"Overrides": "Überschreibt",
"Owner sid": "Eigentümer sid",
"Package status": "Paketstatus",
"Package upload directory": "Paket-Upload-Verzeichnis",
"Package upload status on each node": "Paket-Upload-Status auf jedem Knoten",
"Package url": "Paket url",
"Parent": "Übergeordnetes",
"Parent directory": "Übergeordnetes Verzeichnis",
"Parent types": "Übergeordnete Typen",
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 @@ -181,6 +181,7 @@
"Disabled": "Disabled",
"Display name": "Display name",
"DLL service": "DLL service",
"Do you want to delete this support package?": "Do you want to delete this support package?",
"DST": "DST",
"DST byte count": "DST byte count",
"DST packets": "DST packets",
Expand Down Expand Up @@ -419,6 +420,7 @@
"Notifiers": "Notifiers",
"Number": "Number",
"Number observed": "Number observed",
"Number of nodes in cluster": "Number of nodes in cluster",
"Number of sub-keys": "Number of sub-keys",
"Object markings": "Object markings",
"Objective": "Objective",
Expand All @@ -441,6 +443,10 @@
"Outcomes": "Outcomes",
"Overrides": "Overrides",
"Owner sid": "Owner sid",
"Package status": "Package status",
"Package upload directory": "Package upload directory",
"Package upload status on each node": "Package upload status on each node",
"Package url": "Package url",
"Parent": "Parent",
"Parent directory": "Parent directory",
"Parent types": "Parent types",
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 @@ -181,6 +181,7 @@
"Disabled": "Desactivado",
"Display name": "Mostrar nombre",
"DLL service": "Servicio DLL",
"Do you want to delete this support package?": "¿Desea eliminar este paquete de soporte?",
"DST": "DST",
"DST byte count": "DST byte count",
"DST packets": "Paquetes DST",
Expand Down Expand Up @@ -419,6 +420,7 @@
"Notifiers": "Notificadores",
"Number": "Número",
"Number observed": "Número observado",
"Number of nodes in cluster": "Número de nodos en el clúster",
"Number of sub-keys": "Número de subclaves",
"Object markings": "Marcas de objeto",
"Objective": "Objetivo",
Expand All @@ -441,6 +443,10 @@
"Outcomes": "Resultados",
"Overrides": "Anulaciones",
"Owner sid": "Propietario sid",
"Package status": "Estado del paquete",
"Package upload directory": "Directorio de carga de paquetes",
"Package upload status on each node": "Estado de carga de paquetes en cada nodo",
"Package url": "URL del paquete",
"Parent": "Padre",
"Parent directory": "Directorio principal",
"Parent types": "Tipos parentales",
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 @@ -181,6 +181,7 @@
"Disabled": "Désactivé",
"Display name": "Nom d'affichage",
"DLL service": "Service DLL",
"Do you want to delete this support package?": "Voulez-vous supprimer ce paquet de support ?",
"DST": "DST",
"DST byte count": "Nombre d'octets DST",
"DST packets": "Paquets DST",
Expand Down Expand Up @@ -419,6 +420,7 @@
"Notifiers": "Notificateurs",
"Number": "Nombre",
"Number observed": "Nombre observé",
"Number of nodes in cluster": "Nombre de nœuds dans la grappe",
"Number of sub-keys": "Nombre de sous-clés",
"Object markings": "Marques d'objets",
"Objective": "Objectif",
Expand All @@ -441,6 +443,10 @@
"Outcomes": "Résultats",
"Overrides": "Dérogations",
"Owner sid": "Propriétaire sid",
"Package status": "Statut du paquet",
"Package upload directory": "Répertoire de téléchargement du paquet",
"Package upload status on each node": "Statut de téléchargement du paquet sur chaque nœud",
"Package url": "URL du paquet",
"Parent": "Parent",
"Parent directory": "Répertoire parent",
"Parent types": "Types de parents",
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 @@ -181,6 +181,7 @@
"Disabled": "無効",
"Display name": "表示名",
"DLL service": "DLLサービス",
"Do you want to delete this support package?": "このサポートパッケージを削除しますか?",
"DST": "DST",
"DST byte count": "DST バイト数",
"DST packets": "DSTパケット",
Expand Down Expand Up @@ -419,6 +420,7 @@
"Notifiers": "受信者",
"Number": "番号",
"Number observed": "説明",
"Number of nodes in cluster": "クラスタのノード数",
"Number of sub-keys": "サブキーの数",
"Object markings": "オブジェクトのマーキング",
"Objective": "概要",
Expand All @@ -441,6 +443,10 @@
"Outcomes": "通知者",
"Overrides": "オーバーライド",
"Owner sid": "オーナーサイド",
"Package status": "パッケージの状態",
"Package upload directory": "パッケージアップロードディレクトリ",
"Package upload status on each node": "各ノードのパッケージアップロード状況",
"Package url": "パッケージのURL",
"Parent": "",
"Parent directory": "親ディレクトリ",
"Parent types": "親タイプ",
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 @@ -181,6 +181,7 @@
"Disabled": "禁用",
"Display name": "显示名称",
"DLL service": "DLL 服务",
"Do you want to delete this support package?": "您想删除此支持包吗?",
"DST": "DST",
"DST byte count": "DST 字节数",
"DST packets": "DST 数据包",
Expand Down Expand Up @@ -419,6 +420,7 @@
"Notifiers": "警报器",
"Number": "数字",
"Number observed": "观察到的数量",
"Number of nodes in cluster": "集群节点数",
"Number of sub-keys": "子键数",
"Object markings": "对象标记",
"Objective": "目标",
Expand All @@ -441,6 +443,10 @@
"Outcomes": "结果",
"Overrides": "重写",
"Owner sid": "用户名",
"Package status": "软件包状态",
"Package upload directory": "软件包上传目录",
"Package upload status on each node": "每个节点上的软件包上传状态",
"Package url": "软件包网址",
"Parent": "",
"Parent directory": "父目录",
"Parent types": "父类型",
Expand Down
9 changes: 9 additions & 0 deletions opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"An instance trigger on an entity X notifies the following events: update/deletion of X, creation/deletion of a relationship from/to X, creation/deletion of an entity that has X in its refs (for instance contains X, is shared with X, is created by X...), adding/removing X in the ref of an entity.": "Ein Instanz-Trigger auf eine Entität X meldet die folgenden Ereignisse: Aktualisierung/Löschung von X, Erstellung/Löschung einer Beziehung von/zu X, Erstellung/Löschung einer Entität, die X in ihren Referenzen hat (z.B. enthält X, wird mit X geteilt, wird von X erstellt...), Hinzufügen/Entfernen von X in der Referenz einer Entität.",
"An unknown error has occurred! Please try again later.": "Es ist ein unbekannter Fehler aufgetreten! Bitte versuchen Sie es später noch einmal.",
"An unknown error has occurred! Please try again later.": "Es ist ein unbekannter Fehler aufgetreten! Bitte versuchen Sie es später noch einmal.",
"An unknown error occurred. Please contact your administrator or the OpenCTI maintainers.": "Ein unbekannter Fehler ist aufgetreten. Bitte kontaktieren Sie Ihren Administrator oder die OpenCTI-Maintainer.",
"Analyses": "Auswertungen",
"Analysis": "Analyse",
"Analysis definition version": "Version der Analysedefinition",
Expand Down Expand Up @@ -359,6 +360,7 @@
"Copy": "Kopieren",
"Copy disabled: too many selected elements (maximum number of elements for a copy: ": "Kopieren deaktiviert: zu viele ausgewählte Elemente (maximale Anzahl von Elementen für eine Kopie:",
"Copy link": "Link kopieren",
"Copy stack trace errors": "Stacktrace-Fehler kopieren",
"Copy uri to clipboard for your csv client": "Kopiere uri in die Zwischenablage für deinen csv Client",
"Copy uri to clipboard for your Taxii client": "Kopiere uri in die Zwischenablage für deinen Taxii-Client",
"Copy/paste text content": "Kopieren/Einfügen von Textinhalten",
Expand Down Expand Up @@ -574,6 +576,7 @@
"Delete public dashboard": "Öffentliches Dashboard löschen",
"Delete the element if no other containers contain it": "Löschen Sie das Element, wenn keine anderen Container es enthalten",
"Delete this file": "Diese Datei löschen",
"Delete this support package": "Löschen Sie dieses Support-Paket",
"Delete this workbench": "Diese Werkbank löschen",
"deleted": "gelöscht",
"Deleted by": "Gelöscht von",
Expand Down Expand Up @@ -703,6 +706,7 @@
"Do you want to delete this sector?": "Möchten Sie diesen Sektor löschen?",
"Do you want to delete this sighting?": "Möchten Sie diese Sichtung löschen?",
"Do you want to delete this status template?": "Möchten Sie diese Statusvorlage löschen?",
"Do you want to delete this support package?": "Möchten Sie dieses Support-Paket löschen?",
"Do you want to delete this synchronizer?": "Möchten Sie diesen Synchronizer löschen?",
"Do you want to delete this system?": "Möchten Sie dieses System löschen?",
"Do you want to delete this task ?": "Möchten Sie diese Aufgabe löschen?",
Expand Down Expand Up @@ -770,6 +774,7 @@
"Download as SVG": "Herunterladen als SVG",
"Download in pdf": "Herunterladen im pdf-Format",
"Download this file": "Herunterladen dieser Datei",
"Download this support package": "Laden Sie dieses Support-Paket herunter",
"Due Date": "Fälligkeitsdatum",
"Duplicate": "Duplizieren",
"Duplicate the dashboard": "Duplizieren Sie das Dashboard",
Expand Down Expand Up @@ -1074,6 +1079,7 @@
"Fit graph to canvas": "Diagramm an Leinwand anpassen",
"Fix spelling & grammar": "Rechtschreibung & Grammatik korrigieren",
"For all other usages, you (and your organization) should have entered in a": "Für alle anderen Verwendungen sollten Sie (und Ihre Organisation) eine",
"Force download on this support package": "Erzwingen Sie den Download für dieses Support-Paket",
"Force now": "Kraft jetzt",
"Format": "Formatieren",
"Free rectangle select": "Freies Rechteck auswählen",
Expand All @@ -1094,6 +1100,8 @@
"Generate a simulation scenario": "Erzeugen eines Simulationsszenarios",
"Generate an export": "Erzeugen Sie einen Export",
"Generate report document": "Berichtsdokument generieren",
"Generate Support Package": "Erzeugen von Support Package",
"Generated Support Package": "Erstelltes Support Package",
"Generated the": "Generiert die",
"Generation in progress...": "Erzeugung im Gange...",
"Generative AI is a beta feature as we are currently fine-tuning our models. Consider checking important information.": "Die generative KI ist eine Betafunktion, da wir derzeit unsere Modelle feinabstimmen. Überprüfen Sie wichtige Informationen.",
Expand Down Expand Up @@ -2241,6 +2249,7 @@
"Summarize": "Zusammenfassen",
"Summarize associated files": "Zusammenfassen der zugehörigen Dateien",
"Sunday": "Sonntag",
"Support packages": "Unterstützungspakete",
"suricata": "Suricata",
"SYNC_MANAGER": "Synchronisationsmanager",
"Synchronization": "Synchronisierung",
Expand Down
9 changes: 9 additions & 0 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"An instance trigger on an entity X notifies the following events: update/deletion of X, creation/deletion of a relationship from/to X, creation/deletion of an entity that has X in its refs (for instance contains X, is shared with X, is created by X...), adding/removing X in the ref of an entity.": "An instance trigger on an entity X notifies the following events: update/deletion of X, creation/deletion of a relationship from/to X, creation/deletion of an entity that has X in its refs (for instance contains X, is shared with X, is created by X...), adding/removing X in the ref of an entity.",
"An unknown error has occurred! Please try again later.": "An unknown error has occurred! Please try again later.",
"An unknown error has occurred! Please try again later.": "An unknown error has occurred! Please try again later.",
"An unknown error occurred. Please contact your administrator or the OpenCTI maintainers.": "An unknown error occurred. Please contact your administrator or the OpenCTI maintainers.",
"Analyses": "Analyses",
"Analysis": "Analysis",
"Analysis definition version": "Analysis definition version",
Expand Down Expand Up @@ -359,6 +360,7 @@
"copy": "copy",
"Copy disabled: too many selected elements (maximum number of elements for a copy: ": "Copy disabled: too many selected elements (maximum number of elements for a copy: ",
"Copy link": "Copy link",
"Copy stack trace errors": "Copy stack trace errors",
"Copy uri to clipboard for your csv client": "Copy uri to clipboard for your csv client",
"Copy uri to clipboard for your Taxii client": "Copy uri to clipboard for your Taxii client",
"Copy/paste text content": "Copy/paste text content",
Expand Down Expand Up @@ -574,6 +576,7 @@
"Delete public dashboard": "Delete public dashboard",
"Delete the element if no other containers contain it": "Delete the element if no other containers contain it",
"Delete this file": "Delete this file",
"Delete this support package": "Delete this support package",
"Delete this workbench": "Delete this workbench",
"deleted": "deleted",
"Deleted by": "Deleted by",
Expand Down Expand Up @@ -703,6 +706,7 @@
"Do you want to delete this sector?": "Do you want to delete this sector?",
"Do you want to delete this sighting?": "Do you want to delete this sighting?",
"Do you want to delete this status template?": "Do you want to delete this status template?",
"Do you want to delete this support package?": "Do you want to delete this support package?",
"Do you want to delete this synchronizer?": "Do you want to delete this synchronizer?",
"Do you want to delete this system?": "Do you want to delete this system?",
"Do you want to delete this task ?": "Do you want to delete this task ?",
Expand Down Expand Up @@ -770,6 +774,7 @@
"Download as SVG": "Download as SVG",
"Download in pdf": "Download in pdf",
"Download this file": "Download this file",
"Download this support package": "Download this support package",
"Due Date": "Due Date",
"Duplicate": "Duplicate",
"Duplicate the dashboard": "Duplicate the dashboard",
Expand Down Expand Up @@ -1074,6 +1079,7 @@
"Fit graph to canvas": "Fit graph to canvas",
"Fix spelling & grammar": "Fix spelling & grammar",
"For all other usages, you (and your organization) should have entered in a": "For all other usages, you (and your organization) should have entered in a",
"Force download on this support package": "Force download on this support package",
"Force now": "Force now",
"Format": "Format",
"Free rectangle select": "Free rectangle select",
Expand All @@ -1094,6 +1100,8 @@
"Generate a simulation scenario": "Generate a simulation scenario",
"Generate an export": "Generate an export",
"Generate report document": "Generate report document",
"Generate Support Package": "Generate Support Package",
"Generated Support Package": "Generated Support Package",
"Generated the": "Generated the",
"Generation in progress...": "Generation in progress...",
"Generative AI is a beta feature as we are currently fine-tuning our models. Consider checking important information.": "Generative AI is a beta feature as we are currently fine-tuning our models. Consider checking important information.",
Expand Down Expand Up @@ -2241,6 +2249,7 @@
"Summarize": "Summarize",
"Summarize associated files": "Summarize associated files",
"Sunday": "Sunday",
"Support packages": "Support packages",
"suricata": "Suricata",
"SYNC_MANAGER": "Synchronization manager",
"Synchronization": "Synchronization",
Expand Down

0 comments on commit d6fc1aa

Please sign in to comment.