Skip to content

Commit

Permalink
add demo feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
johanah29 committed Nov 15, 2024
1 parent a0f473d commit 33b5e76
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ const AtomicTestingPayloadInfo: FunctionComponent<Props> = () => {
>
{t('External ID')}
</Typography>
{injectResultDto.inject_injector_contract?.injector_contract_payload?.payload_external_id
&& injectResultDto.inject_injector_contract?.injector_contract_payload?.payload_external_id.length > 0 ? (
<pre>
<ItemCopy content={injectResultDto.inject_injector_contract?.injector_contract_payload?.payload_external_id} />
</pre>
) : '-'}
{emptyFilled(injectResultDto.inject_injector_contract?.injector_contract_payload?.payload_external_id)}
</Grid>
</Grid>

Expand Down Expand Up @@ -144,7 +139,7 @@ const AtomicTestingPayloadInfo: FunctionComponent<Props> = () => {
gutterBottom
style={{ marginTop: 20 }}
>
{t('Attack commands')}
{t('Attack command')}
</Typography>
<pre>
<ItemCopy content={
Expand Down Expand Up @@ -291,7 +286,9 @@ const AtomicTestingPayloadInfo: FunctionComponent<Props> = () => {
{argument.key}
</TableCell>
<TableCell>
{argument.default_value}
<pre>
<ItemCopy content={argument.default_value} />
</pre>
</TableCell>
</TableRow>
</>
Expand Down Expand Up @@ -336,7 +333,12 @@ const AtomicTestingPayloadInfo: FunctionComponent<Props> = () => {
{prerequisite.get_command}
</TableCell>
<TableCell>
{prerequisite.check_command}
{prerequisite.check_command !== undefined
? (
<pre>
<ItemCopy content={prerequisite.check_command} />
</pre>
) : '-'}
</TableCell>
</TableRow>
</>
Expand All @@ -360,7 +362,7 @@ const AtomicTestingPayloadInfo: FunctionComponent<Props> = () => {
gutterBottom
style={{ marginTop: 20 }}
>
{t('Cleanup commands')}
{t('Cleanup command')}
</Typography>
{injectResultDto.inject_injector_contract?.injector_contract_payload?.payload_cleanup_command
&& injectResultDto.inject_injector_contract?.injector_contract_payload?.payload_cleanup_command.length > 0
Expand Down
24 changes: 14 additions & 10 deletions openbas-front/src/admin/components/payloads/Payload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ const Payload: FunctionComponent<Props> = ({
>
{t('External ID')}
</Typography>
{selectedPayload?.payload_external_id && selectedPayload?.payload_external_id.length > 0 ? (
<pre>
<ItemCopy content={selectedPayload?.payload_external_id} />
</pre>
) : '-'}
{emptyFilled(selectedPayload?.payload_external_id)}
</Grid>
<Grid item xs={12} style={{ paddingTop: 10 }}>
<Typography
Expand All @@ -140,7 +136,7 @@ const Payload: FunctionComponent<Props> = ({
gutterBottom
style={{ marginTop: 20 }}
>
{t('Attack commands')}
{t('Attack command')}
</Typography>
<pre>
<ItemCopy content={
Expand Down Expand Up @@ -181,7 +177,9 @@ const Payload: FunctionComponent<Props> = ({
{argument.key}
</TableCell>
<TableCell>
{argument.default_value}
<pre>
<ItemCopy content={argument.default_value} />
</pre>
</TableCell>
</TableRow>
</>
Expand All @@ -204,7 +202,7 @@ const Payload: FunctionComponent<Props> = ({
selectedPayload?.payload_prerequisites && selectedPayload?.payload_prerequisites.length === 0 ? '-'
: (
<TableContainer component={Paper}>
<Table sx={{ minWidth: 650 }}>
<Table sx={{ minWidth: 650, justifyContent: 'center' }}>
<TableHead>
<TableRow sx={{ textTransform: 'uppercase', fontWeight: 'bold' }}>
<TableCell width="30%">{t('Command executor')}</TableCell>
Expand All @@ -226,7 +224,13 @@ const Payload: FunctionComponent<Props> = ({
{prerequisite.get_command}
</TableCell>
<TableCell>
{prerequisite.check_command}
{prerequisite.check_command !== undefined
? (
<pre>
<ItemCopy content={prerequisite.check_command} />
</pre>
) : '-'}

</TableCell>
</TableRow>
</>
Expand All @@ -250,7 +254,7 @@ const Payload: FunctionComponent<Props> = ({
gutterBottom
style={{ marginTop: 20 }}
>
{t('Cleanup commands')}
{t('Cleanup command')}
</Typography>
{selectedPayload?.payload_cleanup_command && selectedPayload?.payload_cleanup_command.length > 0
? <pre><ItemCopy content={selectedPayload?.payload_cleanup_command} /></pre> : '-'}
Expand Down
25 changes: 21 additions & 4 deletions openbas-front/src/utils/Localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,6 @@ const i18n = {
'Targets response': 'Réponse des cibles',
'Update the atomic testing': 'Mettre à jour le test atomique',
'Create a new atomic test': 'Créer un nouveau test atomique',
'Attack commands': 'Commandes de l\'attaque',
'Attack command': 'Commande de l\'attaque',
'Mitre Filter': 'Filtre Mitre',
'techniques': 'Techniques',
Expand Down Expand Up @@ -1119,7 +1118,17 @@ const i18n = {
'Windows Command Line': 'Ligne de commande Windows',
'Windows Powershell': 'Windows Powershell',
'Update the payload': 'Mettre à jour la charge utile',
'Payload': 'Charge utile',
'Payloads': 'Charges utiles',
'Commands': 'Commandes',
'Executable files': 'Fichiers exécutables',
'File drop file': 'Fichier de dépose',
'Dns resolution hostname': 'Nom d\'hôte de resolution Dns',
'Network traffic ip destination': 'Adresse ip de destination de traffic réseau',
'Network traffic port destination': 'Port de destination de traffic réseau',
'Network traffic ip source': 'Adresse ip source de traffic réseau',
'Network traffic port source': 'Port source de traffic réseau',
'Network traffic protocol': 'Protocole de traffic réseau',
'Payload info': 'Informations de charge utile',
'Do you want to duplicate this payload?': 'Voulez-vous dupliquer cette charge utile ?',
'Number of simulations': 'Nombre de simulations',
Expand Down Expand Up @@ -1245,7 +1254,6 @@ const i18n = {
'Check command': 'Commande de vérification',
'Cleanup executor': 'Exécuteur de nettoyage',
'Cleanup command': 'Commande de nettoyage',
'Cleanup commands': 'Commandes de nettoyage',
'Document': 'Document',
// Policies
'Platform login message': 'Messages de connexion',
Expand Down Expand Up @@ -2369,7 +2377,6 @@ const i18n = {
'Targets response': '目标响应',
'Update the atomic testing': '更新自动测试',
'Create a new atomic test': '创建新自动测试',
'Attack commands': '攻击指挥',
'Attack command': '攻击命令',
'Mitre Filter': 'Mitre过滤器',
'techniques': '技术',
Expand Down Expand Up @@ -2492,7 +2499,18 @@ const i18n = {
'Windows Command Line': 'Windows命令行',
'Windows Powershell': 'Windows Powershell',
'Update the payload': '更新载荷',
'Payload': '有效载荷',
'Payloads': '载荷',
'Commands': '命令',
'Executable files': '可执行文件',
'File drop file': '文件放置文件',
'Dns resolution hostname': 'Dns 解析主机名',
'Network traffic ip destination': '网络流量 IP 目标',
'Network traffic port destination': '网络流量端口目标',
'Network traffic ip source': '网络流量 IP 源',
'Network traffic port source': '网络流量端口源',
'Network traffic protocol': '网络流量协议',

'Payload info': '有效负载信息',
'Number of simulations': '模拟数量',
'Performance Overview': '性能概述',
Expand Down Expand Up @@ -2607,7 +2625,6 @@ const i18n = {
'Get command': '获取命令',
'Check command': '检查命令',
'Cleanup executor': '清理执行器',
'Cleanup commands': '清理命令',
'Cleanup command': '清理命令',
'Document': '文档',
// Policies
Expand Down

0 comments on commit 33b5e76

Please sign in to comment.