|
@@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next'
|
|
|
import PreviewLogEntryHeader from './preview-log-entry-header'
|
|
import PreviewLogEntryHeader from './preview-log-entry-header'
|
|
|
import Icon from '../../../shared/components/icon'
|
|
import Icon from '../../../shared/components/icon'
|
|
|
|
|
|
|
|
-function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown }) {
|
|
|
|
|
|
|
+function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown, hasErrors }) {
|
|
|
const { t } = useTranslation()
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
const title = t('log_entry_maximum_entries_title', {
|
|
const title = t('log_entry_maximum_entries_title', {
|
|
@@ -16,10 +16,17 @@ function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown }) {
|
|
|
<PreviewLogEntryHeader level="raw" headerTitle={title} />
|
|
<PreviewLogEntryHeader level="raw" headerTitle={title} />
|
|
|
<div className="log-entry-content">
|
|
<div className="log-entry-content">
|
|
|
<Icon type="lightbulb-o" />{' '}
|
|
<Icon type="lightbulb-o" />{' '}
|
|
|
- <Trans
|
|
|
|
|
- i18nKey="log_entry_maximum_entries_message"
|
|
|
|
|
- components={[<b key="bold-1" />]}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ {hasErrors ? (
|
|
|
|
|
+ <Trans
|
|
|
|
|
+ i18nKey="log_entry_maximum_entries_message"
|
|
|
|
|
+ components={[<b key="bold-1" />, <p />]} // eslint-disable-line react/jsx-key
|
|
|
|
|
+ />
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <Trans
|
|
|
|
|
+ i18nKey="log_entry_maximum_entries_message_no_errors"
|
|
|
|
|
+ components={[<b key="bold-1" />]}
|
|
|
|
|
+ />
|
|
|
|
|
+ )}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
@@ -28,6 +35,7 @@ function PreviewLogsPaneMaxEntries({ totalEntries, entriesShown }) {
|
|
|
PreviewLogsPaneMaxEntries.propTypes = {
|
|
PreviewLogsPaneMaxEntries.propTypes = {
|
|
|
totalEntries: PropTypes.number,
|
|
totalEntries: PropTypes.number,
|
|
|
entriesShown: PropTypes.number,
|
|
entriesShown: PropTypes.number,
|
|
|
|
|
+ hasErrors: PropTypes.bool,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export default PreviewLogsPaneMaxEntries
|
|
export default PreviewLogsPaneMaxEntries
|