The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/admin/apps/LogItem.tsx

35 lines
822 B

import { Box, Accordion } from '@rocket.chat/fuselage';
import React, { FC } from 'react';
import { useTranslation } from '../../../contexts/TranslationContext';
import LogEntry from './LogEntry';
type LogItemProps = {
entries: {
severity: string;
timestamp: string;
caller: string;
args: unknown;
}[];
instanceId: string;
title: string;
};
const LogItem: FC<LogItemProps> = ({ entries, instanceId, title, ...props }) => {
const t = useTranslation();
return (
<Accordion.Item title={title} {...props}>
{instanceId && (
<Box>
{t('Instance')}: {instanceId}
</Box>
)}
{entries.map(({ severity, timestamp, caller, args }, i) => (
<LogEntry key={i} severity={severity} timestamp={timestamp} caller={caller} args={args} />
))}
</Accordion.Item>
);
};
export default LogItem;