Skip to content

Commit

Permalink
Fix newline escaping in auth modal
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Sep 24, 2024
1 parent 88427b8 commit d731e76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const AuthModal: React.FC<ModalProps> = ({
return {
publicKey: input.pkiKeys.publicKey!,
// Escape newlines in private key
privateKey: input.pkiKeys.privateKey!.replace(/\n/gm, '\\n'),
privateKey: input.pkiKeys.privateKey!.replace(/\n/gm, '\n'),
loginUser: input.pkiKeys.loginUser,
};
case Systems.AuthnEnum.AccessKey:
Expand Down Expand Up @@ -142,8 +142,8 @@ const AuthModal: React.FC<ModalProps> = ({
{defaultAuthnMethod === Systems.AuthnEnum.PkiKeys && (
<Alert severity="warning" style={{ marginTop: '8px' }}>
Ensure that the public key you paste below has already been placed
on host of this system or Tapis will not be able to access its
files on your behalf.
on the host for this system or Tapis will not be able to
authenticate with the host on your behalf.
</Alert>
)}
{defaultAuthnMethod === Systems.AuthnEnum.PkiKeys && (
Expand Down Expand Up @@ -308,6 +308,7 @@ const AuthModal: React.FC<ModalProps> = ({
defaultAuthnMethod,
input
);
console.log({ reqUpdateCredential });
if (reqUpdateCredential) {
create(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ const SystemCard: React.FC<SystemCardProps> = ({ system }) => {
<div className={styles['flex-space-between']}>
<div className={styles['card-line']}>
{system.isPublic ? <Public /> : <PublicOff />}
<span className={styles['card-title']}>{system.id}</span>
<span className={styles['muted']}>({system.systemType})</span>
{system.enabled ? (
<LockOpen color="success" />
) : (
<Lock color="error" />
)}
<span className={styles['card-title']}>{system.id}</span>
<span className={styles['muted']}>({system.systemType})</span>
<span className={styles['muted']}>{system.uuid}</span>
</div>
<div></div>
Expand All @@ -99,7 +99,8 @@ const SystemCard: React.FC<SystemCardProps> = ({ system }) => {
{!system.enabled && (
<Alert severity="warning">
<AlertTitle>System disabled</AlertTitle>
Press the lock icon above to enable the system
Jobs cannot be run on disabled systems. Press the lock icon above to
enable the system
</Alert>
)}
<div className={styles['card-line']}>
Expand Down

0 comments on commit d731e76

Please sign in to comment.