import React, {FunctionComponent} from 'react'; import {Trans, useTranslation} from '~/utils/i18n'; import {WithStyled, backgroundColor, em, link, rem, size, textColor, textLightColor} from '~/utils/style'; import styled from 'styled-components'; const Wrapper = styled.div` display: flex; justify-content: center; align-items: center; background-color: ${backgroundColor}; height: 100%; width: 100%; > .image { background-image: url(${`${process.env.PUBLIC_PATH}/images/empty.svg`}); background-repeat: no-repeat; background-position: center center; background-size: 100% 100%; ${size(rem(244), rem(280))} } > .inner { width: calc(50% - ${rem(280)}); color: ${textLightColor}; ${link} h4 { color: ${textColor}; font-size: ${em(18)}; font-weight: 700; } p { margin: 0; } ol { padding-left: 2em; line-height: 1.857142857; } } `; const reload = () => window.location.reload(); const Error: FunctionComponent = ({className, children}) => { const {t} = useTranslation('errors'); return (
{children || ( <>

{t('errors:common.title')}

{t('errors:common.description')}

  1. Log files are not generated. Please refer to  README  to create log files.
  2. Log files are generated but data is not written yet. Please refer to  VisualDL User Guide  to write visualized data.
  3. Log files are generated and data is writte. Please try to  Refresh.
  4. Log files are generated but path to log directory is wrong. Please check your directory and try again.
)}
); }; export default Error;