Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: addressed lint

Sheen Capadngan3a35ba78b5a5
diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/components/TerminalEventView.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/components/TerminalEventView.tsx
index 59e94e9628..7d3ef29e07 100644
--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/TerminalEventView.tsx
+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/TerminalEventView.tsx
@@ -8,6 +8,11 @@ import { TerminalChannelType, TTerminalEvent } from "@app/hooks/api/pam";
import { aggregateTerminalEvents } from "./terminal-utils";
+const CHANNEL_LABEL_MAP: Record<string, string> = {
+ [TerminalChannelType.Exec]: "Exec",
+ [TerminalChannelType.Sftp]: "SFTP"
+};
+
type Props = {
events: TTerminalEvent[];
};
@@ -45,12 +50,7 @@ export const TerminalEventView = ({ events }: Props) => {
filteredEvents.map((event, index) => {
const eventKey = `${event.timestamp}-${index}`;
- const channelLabel =
- event.channelType === TerminalChannelType.Exec
- ? "Exec"
- : event.channelType === TerminalChannelType.Sftp
- ? "SFTP"
- : null;
+ const channelLabel = event.channelType ? CHANNEL_LABEL_MAP[event.channelType] : null;
return (
<div