Skip to content

Commit

Permalink
[frontend] Add page titles to Data pages
Browse files Browse the repository at this point in the history
WIP - Adding Titles to pages

WIP - Updating Titles

WIP - Updating Titles for Functional Components only.

Updated Titles. Some class component pages have not been updated.

Revert "Updated Titles. Some class component pages have not been updated."

This reverts commit babb1cd.

Updated Titles. Some class component pages have not been updated.

Resolving Merge Conflicts

WIP - Converting class components to functional components

WIP - pushing current updates.

Fix merge issues

Fix Roles.tsx to be able to compile

Add latest version of Narratives.tsx

Replace key 'FAB_REPLACED' with 'FAB_REPLACEMENT'

Convert KillChainPhases to functional component

Updated Sectors. Need to update SectorLine and SectorsLines.

WIP - converting IngestionRss

WIP - finished IngestionRSS conversion

WIP

WIP - Modified IngestionTaxiis

WIP editing Connectors and Tasks.

WIP - one more to convert

WIP - modifying Streams.tsx and ImportContent.tsx.

WIP

Convert Connectors back to JSX functional component

WIP - updated Streams

Convert Stream to functional

Finished Import Content

Remove changes from PR 7753

Remove changes from PR 7753 (pt 2)

Remove changes from PR 7753 (pt 3)

Remove changes from PR 7753 (pt 4)

Remove duplicate Data titles

Remove duplicate Data titles (pt 3)

Remove sectors.jsx

Add translations

Convert Sectors closer to original component
  • Loading branch information
Bonsai8863 authored and VerboseCat committed Sep 12, 2024
1 parent bab94af commit 5350e04
Show file tree
Hide file tree
Showing 12 changed files with 667 additions and 700 deletions.
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "Datenimport und Analysten-Workbenches",
"Data sharing": "Gemeinsame Nutzung von Daten",
"Data sharing configuration": "Konfiguration der gemeinsamen Datennutzung",
"Data Sharing: Live Streams | Data": "Datenaustausch: Live-Streams | Daten",
"Data source": "Datenquelle",
"Data sources": "Datenquellen",
"Data type": "Datentyp",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "Wissen importieren",
"Import successfully asked": "Import erfolgreich abgefragt",
"Import type": "Art des Imports",
"Import: Import | Data": "Import: Import | Daten",
"Important notice: your action is required!": "Wichtiger Hinweis: Ihr Handeln ist erforderlich!",
"Imports": "Importe",
"In all the database": "In der gesamten Datenbank",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "Verschluckte Entitäten",
"Ingestion": "Ingestion",
"INGESTION_MANAGER": "Ingestion-Manager",
"Ingestion: Connectors | Data": "Aufnahme: Konnektoren | Daten",
"Initial score": "Anfangspunktzahl",
"Initiator": "Initiator",
"innovator": "innovator",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "Sekundäre Motivationen",
"Sector": "Sektor",
"Sectors": "Sektoren",
"Sectors | Entities": "Branchen | Entitäten",
"Sectors and organizations": "Sektoren und Organisationen",
"Security": "Sicherheit",
"See all entities created by user": "Alle vom Benutzer erstellten Entitäten anzeigen",
Expand Down
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "Data import and analyst workbenches",
"Data sharing": "Data sharing",
"Data sharing configuration": "Data sharing configuration",
"Data Sharing: Live Streams | Data": "Data Sharing: Live Streams | Data",
"Data source": "Data source",
"Data sources": "Data sources",
"Data type": "Data type",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "Import knowledge",
"Import successfully asked": "Import successfully asked",
"Import type": "Import type",
"Import: Import | Data": "Import: Import | Data",
"Important notice: your action is required!": "Important notice: your action is required!",
"Imports": "Imports",
"In all the database": "In all the database",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "Ingested entities",
"Ingestion": "Ingestion",
"INGESTION_MANAGER": "Ingestion manager",
"Ingestion: Connectors | Data": "Ingestion: Connectors | Data",
"Initial score": "Initial score",
"Initiator": "Initiator",
"innovator": "innovator",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "Secondary motivations",
"Sector": "Sector",
"Sectors": "Sectors",
"Sectors | Entities": "Sectors | Entities",
"Sectors and organizations": "Sectors and organizations",
"Security": "Security",
"See all entities created by user": "See all entities created by user",
Expand Down
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "Bancos de trabajo de importación de datos y de análisis",
"Data sharing": "Compartición de datos",
"Data sharing configuration": "Configuración de compartición de datos",
"Data Sharing: Live Streams | Data": "Intercambio de datos: transmisiones en vivo | Datos",
"Data source": "Fuente de datos",
"Data sources": "Fuentes de datos",
"Data type": "Tipo de datos",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "Importar conocimiento",
"Import successfully asked": "Importación solicitada exitosamente",
"Import type": "Tipo de importación",
"Import: Import | Data": "Importar: Importar | Datos",
"Important notice: your action is required!": "Aviso importante: ¡su acción es necesaria!",
"Imports": "Importaciones",
"In all the database": "En toda la base de datos",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "Entidades ingestadas",
"Ingestion": "Ingestión",
"INGESTION_MANAGER": "Gestor del ingestion",
"Ingestion: Connectors | Data": "Ingestión: Conectores | Datos",
"Initial score": "Puntuación inicial",
"Initiator": "Iniciador",
"innovator": "Innovadora",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "Motivaciones secundarias",
"Sector": "Sector",
"Sectors": "Sectores",
"Sectors | Entities": "Sectores | Entidades",
"Sectors and organizations": "Sectores y organizaciones",
"Security": "Seguridad",
"See all entities created by user": "Ver todas las entidades creadas por el usuario",
Expand Down
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "Importation de données et postes de travail des analystes",
"Data sharing": "Partage de données",
"Data sharing configuration": "Configuration du partage des données",
"Data Sharing: Live Streams | Data": "Partage de données : flux en direct | Données",
"Data source": "Source de données",
"Data sources": "Sources de données",
"Data type": "Type de données",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "Importer des connaissances",
"Import successfully asked": "L'import a été demandé",
"Import type": "Type d'import",
"Import: Import | Data": "Importation : Import | Data",
"Important notice: your action is required!": "Avis important : votre action est requise !",
"Imports": "Importations",
"In all the database": "Dans toute la base",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "Entités stockées",
"Ingestion": "Ingestion",
"INGESTION_MANAGER": "Manager d'ingestion",
"Ingestion: Connectors | Data": "Ingestion : Connecteurs | Données",
"Initial score": "Score initial",
"Initiator": "Initiateur",
"innovator": "innovateur",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "Motivations secondaires",
"Sector": "Secteur",
"Sectors": "Secteurs",
"Sectors | Entities": "Secteurs | Entités",
"Sectors and organizations": "Secteurs et organisations",
"Security": "Sécurité",
"See all entities created by user": "Voir toutes les entités crées par l'utilisateur",
Expand Down
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "データインポートとアナリストワークベンチ",
"Data sharing": "データ共有",
"Data sharing configuration": "データ共有設定",
"Data Sharing: Live Streams | Data": "データ共有:ライブストリーム|データ",
"Data source": "データソース",
"Data sources": "データソース",
"Data type": "データ型",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "知識をインポート",
"Import successfully asked": "インポート要求を正常に受け付けました",
"Import type": "インポート種別",
"Import: Import | Data": "インポート:インポート|データ",
"Important notice: your action is required!": "重要なお知らせ:あなたのアクションが必要です!",
"Imports": "インポート",
"In all the database": "すべてのデータベースで",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "取り込まれたエンティティ",
"Ingestion": "摂取",
"INGESTION_MANAGER": "インジェストマネージャー",
"Ingestion: Connectors | Data": "摂取:コネクタ|データ",
"Initial score": "初期スコア",
"Initiator": "イニシエータ",
"innovator": "革新的",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "二次的動機",
"Sector": "セクター",
"Sectors": "セクター",
"Sectors | Entities": "エンティティ",
"Sectors and organizations": "セクターと組織",
"Security": "安全",
"See all entities created by user": "ユーザーが作成したすべてのエンティティを見る",
Expand Down
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "데이터 가져오기 및 분석가 작업대",
"Data sharing": "데이터 공유",
"Data sharing configuration": "데이터 공유 구성",
"Data Sharing: Live Streams | Data": "데이터 공유: 실시간 스트리밍 | 데이터",
"Data source": "데이터 소스",
"Data sources": "데이터 소스",
"Data type": "데이터 유형",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "지식 가져오기",
"Import successfully asked": "가져오기가 성공적으로 요청됨",
"Import type": "가져오기 유형",
"Import: Import | Data": "가져오기: 가져오기 | 데이터",
"Important notice: your action is required!": "중요 공지: 귀하의 조치가 필요합니다!",
"Imports": "Imports",
"In all the database": "모든 데이터베이스에서",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "수집된 엔터티",
"Ingestion": "수집",
"INGESTION_MANAGER": "수집 관리자",
"Ingestion: Connectors | Data": "섭취: 커넥터 | 데이터",
"Initial score": "초기 점수",
"Initiator": "발기인",
"innovator": "혁신가",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "부차적 동기",
"Sector": "부문",
"Sectors": "부문",
"Sectors | Entities": "분야 | 법인",
"Sectors and organizations": "부문 및 조직",
"Security": "보안",
"See all entities created by user": "사용자가 만든 모든 엔터티 보기",
Expand Down
4 changes: 4 additions & 0 deletions opencti-platform/opencti-front/lang/front/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@
"Data import and analyst workbenches": "数据导入和分析工作台",
"Data sharing": "数据共享",
"Data sharing configuration": "数据共享配置",
"Data Sharing: Live Streams | Data": "数据共享:实时流|数据",
"Data source": "数据源",
"Data sources": "数据源",
"Data type": "数据类型",
Expand Down Expand Up @@ -1314,6 +1315,7 @@
"Import knowledge": "导入知识",
"Import successfully asked": "请求导入成功",
"Import type": "导入类型",
"Import: Import | Data": "导入:导入|数据",
"Important notice: your action is required!": "重要提示:需要您执行操作!",
"Imports": "导入",
"In all the database": "在所有数据库中",
Expand Down Expand Up @@ -1384,6 +1386,7 @@
"Ingested entities": "引入的实体",
"Ingestion": "接入",
"INGESTION_MANAGER": "提取管理器",
"Ingestion: Connectors | Data": "摄取:连接器|数据",
"Initial score": "初始分数",
"Initiator": "发起者",
"innovator": "创新者",
Expand Down Expand Up @@ -2321,6 +2324,7 @@
"Secondary motivations": "次要动机",
"Sector": "部门",
"Sectors": "部门",
"Sectors | Entities": "部门|实体",
"Sectors and organizations": "部门和组织",
"Security": "安全",
"See all entities created by user": "查看用户创建的所有实体",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,58 +1,50 @@
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { compose } from 'ramda';
import withStyles from '@mui/styles/withStyles';
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import IngestionMenu from './IngestionMenu';
import inject18n from '../../../components/i18n';
import { useFormatter } from '../../../components/i18n';
import { QueryRenderer } from '../../../relay/environment';
import WorkersStatus, { workersStatusQuery } from './connectors/WorkersStatus';
import ConnectorsStatus, { connectorsStatusQuery } from './connectors/ConnectorsStatus';
import Loader from '../../../components/Loader';
import Loader, { LoaderVariant } from '../../../components/Loader';
import Breadcrumbs from '../../../components/Breadcrumbs';
import useConnectedDocumentModifier from '../../../utils/hooks/useConnectedDocumentModifier';

const styles = () => ({
const useStyles = makeStyles(() => ({
container: {
margin: 0,
padding: '0 200px 50px 0',
},
});
}));

class Connectors extends Component {
render() {
const { t, classes } = this.props;
return (
<div className={classes.container}>
<Breadcrumbs variant="list" elements={[{ label: t('Data') }, { label: t('Ingestion') }, { label: t('Connectors'), current: true }]} />
<IngestionMenu/>
<QueryRenderer
query={workersStatusQuery}
render={({ props }) => {
if (props) {
return <WorkersStatus data={props} />;
}
return <div> &nbsp; </div>;
}}
/>
<QueryRenderer
query={connectorsStatusQuery}
render={({ props }) => {
if (props) {
return <ConnectorsStatus data={props} />;
}
return <Loader />;
}}
/>
</div>
);
}
}

Connectors.propTypes = {
classes: PropTypes.object,
t: PropTypes.func,
connectorsStatus: PropTypes.array,
const Connectors = () => {
const classes = useStyles();
const { t_i18n } = useFormatter();
const { setTitle } = useConnectedDocumentModifier();
setTitle(t_i18n('Ingestion: Connectors | Data'));
return (
<div className={classes.container}>
<Breadcrumbs variant="list" elements={[{ label: t_i18n('Data') }, { label: t_i18n('Ingestion') }, { label: t_i18n('Connectors'), current: true }]} />
<IngestionMenu/>
<QueryRenderer
query={workersStatusQuery}
render={({ props }) => {
if (props) {
return <WorkersStatus data={props} />;
}
return <Loader variant={LoaderVariant.container} />;
}}
/>
<QueryRenderer
query={connectorsStatusQuery}
render={({ props }) => {
if (props) {
return <ConnectorsStatus data={props} />;
}
return <Loader variant={LoaderVariant.container} />;
}}
/>
</div>
);
};

export default compose(
inject18n,
withStyles(styles, { withTheme: true }),
)(Connectors);
export default Connectors;
Loading

0 comments on commit 5350e04

Please sign in to comment.