Skip to content

Commit

Permalink
update for order of variable assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenGravy authored and github-actions committed Dec 5, 2024
1 parent 66b7d2e commit b46f60c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/packages/teleport/src/services/audit/makeEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,6 @@ export const formatters: Formatters = {
desc: 'Session Started',
format: event => {
const user = event.user || '';
const node =
event.server_hostname || event.server_addr || event.server_id;

if (event.proto === 'kube') {
if (!event.kubernetes_cluster) {
Expand All @@ -661,6 +659,8 @@ export const formatters: Formatters = {
return `User [${user}] has started a session [${event.sid}] on Kubernetes cluster [${event.kubernetes_cluster}]`;
}

const node =
event.server_hostname || event.server_addr || event.server_id;
return `User [${user}] has started a session [${event.sid}] on node [${node}] `;
},
},
Expand Down

0 comments on commit b46f60c

Please sign in to comment.