File tree 3 files changed +24
-2
lines changed
3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export const AuditLogDiff: FC<{ diff: AuditLog["diff"] }> = ({ diff }) => {
41
41
styles . diffValueOld ,
42
42
] ) }
43
43
>
44
- { getDiffValue ( valueDiff . old ) }
44
+ { valueDiff . secret ? "••••••••" : getDiffValue ( valueDiff . old ) }
45
45
</ span >
46
46
</ div >
47
47
</ div >
@@ -60,7 +60,7 @@ export const AuditLogDiff: FC<{ diff: AuditLog["diff"] }> = ({ diff }) => {
60
60
styles . diffValueNew ,
61
61
] ) }
62
62
>
63
- { getDiffValue ( valueDiff . new ) }
63
+ { valueDiff . secret ? "••••••••" : getDiffValue ( valueDiff . new ) }
64
64
</ span >
65
65
</ div >
66
66
</ div >
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
MockAuditLog2 ,
11
11
MockAuditLogWithWorkspaceBuild ,
12
12
MockAuditLogWithDeletedResource ,
13
+ MockAuditLogGitSSH ,
13
14
} from "testHelpers/entities"
14
15
import { AuditLogRow , AuditLogRowProps } from "./AuditLogRow"
15
16
@@ -72,3 +73,8 @@ export const DeletedResource = Template.bind({})
72
73
DeletedResource . args = {
73
74
auditLog : MockAuditLogWithDeletedResource ,
74
75
}
76
+
77
+ export const SecretDiffValue = Template . bind ( { } )
78
+ SecretDiffValue . args = {
79
+ auditLog : MockAuditLogGitSSH ,
80
+ }
Original file line number Diff line number Diff line change @@ -1066,6 +1066,22 @@ export const MockAuditLogWithDeletedResource: TypesGen.AuditLog = {
1066
1066
is_deleted : true ,
1067
1067
}
1068
1068
1069
+ export const MockAuditLogGitSSH : TypesGen . AuditLog = {
1070
+ ...MockAuditLog ,
1071
+ diff : {
1072
+ private_key : {
1073
+ old : "" ,
1074
+ new : "" ,
1075
+ secret : true ,
1076
+ } ,
1077
+ public_key : {
1078
+ old : "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINRUPjBSNtOAnL22+r07OSu9t3Lnm8/5OX8bRHECKS9g\n" ,
1079
+ new : "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEwoUPJPMekuSzMZyV0rA82TGGNzw/Uj/dhLbwiczTpV\n" ,
1080
+ secret : false ,
1081
+ } ,
1082
+ } ,
1083
+ }
1084
+
1069
1085
export const MockWorkspaceQuota : TypesGen . WorkspaceQuota = {
1070
1086
credits_consumed : 0 ,
1071
1087
budget : 100 ,
You can’t perform that action at this time.
0 commit comments