diff --git a/awx/ui_next/src/components/DetailList/Detail.jsx b/awx/ui_next/src/components/DetailList/Detail.jsx index e97c20d896..f312ab78c3 100644 --- a/awx/ui_next/src/components/DetailList/Detail.jsx +++ b/awx/ui_next/src/components/DetailList/Detail.jsx @@ -14,7 +14,7 @@ const DetailName = styled(({ fullWidth, ...props }) => ( `} `; -const DetailValue = styled(({ fullWidth, ...props }) => ( +const DetailValue = styled(({ fullWidth, isEncrypted, ...props }) => ( ))` word-break: break-all; @@ -23,6 +23,11 @@ const DetailValue = styled(({ fullWidth, ...props }) => ( ` grid-column: 2 / -1; `} + ${props => props.isEncrypted && + ` + text-transform: uppercase + color: var(--pf-global--Color--400); + `} `; const Detail = ({ @@ -32,6 +37,7 @@ const Detail = ({ className, dataCy, alwaysVisible, + isEncrypted }) => { if (!value && typeof value !== 'number' && !alwaysVisible) { return null; @@ -55,6 +61,7 @@ const Detail = ({ component={TextListItemVariants.dd} fullWidth={fullWidth} data-cy={valueCy} + isEncrypted={isEncrypted} > {value} diff --git a/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx b/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx index 1e35f7d36c..10890357eb 100644 --- a/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialDetail/CredentialDetail.jsx @@ -70,7 +70,7 @@ function CredentialDetail({ i18n, credential }) { setHasContentLoading(false); }; - const renderDetail = ({ id, label, type, secret }) => { + const renderDetail = ({ id, label, type }) => { let detail; if (type === 'boolean') { @@ -81,8 +81,9 @@ function CredentialDetail({ i18n, credential }) { value={{inputs[id] && {label}}} /> ); - } else if (secret === true) { - detail = null; + } else if (inputs[id] === '$encrypted$') { + const isEncrypted = true; + detail = ; } else { detail = ; }