import PropTypes from 'prop-types';
import * as React from 'react';
import { DateTime } from 'luxon';
import Stack from '@mui/material/Stack';
import Box from '@mui/material/Box';
import Tooltip from '@mui/material/Tooltip';
import Typography from '@mui/material/Typography';
import useFormatMessage from 'hooks/useFormatMessage';
import { ExecutionPropType } from 'propTypes/propTypes';
function ExecutionName(props) {
return (
{props.name}
);
}
ExecutionName.propTypes = {
name: PropTypes.string.isRequired,
};
function ExecutionId(props) {
const formatMessage = useFormatMessage();
const id = (
{props.id}
);
return (
{formatMessage('execution.id', { id })}
);
}
ExecutionId.propTypes = {
id: PropTypes.string.isRequired,
};
function ExecutionDate(props) {
const createdAt = DateTime.fromMillis(parseInt(props.createdAt, 10));
const relativeCreatedAt = createdAt.toRelative();
return (
{relativeCreatedAt}
);
}
ExecutionDate.propTypes = {
createdAt: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.instanceOf(Date),
]).isRequired,
};
function ExecutionHeader(props) {
const { execution } = props;
if (!execution) return ;
return (
);
}
ExecutionHeader.propTypes = {
execution: ExecutionPropType,
};
export default ExecutionHeader;