Skip to content

Commit

Permalink
refactor credentials dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng authored and bjoernricks committed Jan 9, 2025
1 parent fce7b58 commit b4a0b98
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 375 deletions.
2 changes: 1 addition & 1 deletion src/gmp/models/credential.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const vFire_credential_filter = credential =>
export const SNMP_AUTH_ALGORITHM_MD5 = 'md5';
export const SNMP_AUTH_ALGORITHM_SHA1 = 'sha1';

export const SNMP_PRIVACY_ALOGRITHM_NONE = '';
export const SNMP_PRIVACY_ALGORITHM_NONE = '';
export const SNMP_PRIVACY_ALGORITHM_AES = 'aes';
export const SNMP_PRIVACY_ALGORITHM_DES = 'des';

Expand Down
6 changes: 3 additions & 3 deletions src/web/pages/credentials/details.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import _ from 'gmp/locale';
import {
SNMP_CREDENTIAL_TYPE,
SNMP_PRIVACY_ALOGRITHM_NONE,
SNMP_PRIVACY_ALGORITHM_NONE,
getCredentialTypeName,
} from 'gmp/models/credential';
import React from 'react';
Expand All @@ -29,7 +29,7 @@ const CredentialDetails = ({entity}) => {
login,
auth_algorithm,
privacy = {
algorithm: SNMP_PRIVACY_ALOGRITHM_NONE,
algorithm: SNMP_PRIVACY_ALGORITHM_NONE,
},
targets = [],
scanners = [],
Expand Down Expand Up @@ -78,7 +78,7 @@ const CredentialDetails = ({entity}) => {
<TableRow>
<TableData>{_('Privacy Algorithm')}</TableData>
<TableData>
{privacy.algorithm === SNMP_PRIVACY_ALOGRITHM_NONE
{privacy.algorithm === SNMP_PRIVACY_ALGORITHM_NONE
? _('None')
: privacy.algorithm}
</TableData>
Expand Down
Loading

0 comments on commit b4a0b98

Please sign in to comment.