1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 20:12:41 +02:00

Fixed: Time column is first column on events page [common]

This commit is contained in:
Robin Dadswell 2021-10-23 21:33:41 +01:00
parent 4299799967
commit c14ef7bee7
2 changed files with 18 additions and 18 deletions

View File

@ -87,6 +87,13 @@ export const defaultState = {
isVisible: true, isVisible: true,
isModifiable: false isModifiable: false
}, },
{
name: 'time',
label: translate('Time'),
isSortable: true,
isVisible: true,
isModifiable: false
},
{ {
name: 'logger', name: 'logger',
label: translate('Component'), label: translate('Component'),
@ -100,13 +107,6 @@ export const defaultState = {
isVisible: true, isVisible: true,
isModifiable: false isModifiable: false
}, },
{
name: 'time',
label: translate('Time'),
isSortable: true,
isVisible: true,
isModifiable: false
},
{ {
name: 'actions', name: 'actions',
columnLabel: translate('Actions'), columnLabel: translate('Actions'),

View File

@ -58,9 +58,9 @@ class LogsTableRow extends Component {
render() { render() {
const { const {
level, level,
time,
logger, logger,
message, message,
time,
exception, exception,
columns columns
} = this.props; } = this.props;
@ -96,6 +96,15 @@ class LogsTableRow extends Component {
); );
} }
if (name === 'time') {
return (
<RelativeDateCellConnector
key={name}
date={time}
/>
);
}
if (name === 'logger') { if (name === 'logger') {
return ( return (
<TableRowCell key={name}> <TableRowCell key={name}>
@ -112,15 +121,6 @@ class LogsTableRow extends Component {
); );
} }
if (name === 'time') {
return (
<RelativeDateCellConnector
key={name}
date={time}
/>
);
}
if (name === 'actions') { if (name === 'actions') {
return ( return (
<TableRowCell <TableRowCell
@ -148,9 +148,9 @@ class LogsTableRow extends Component {
LogsTableRow.propTypes = { LogsTableRow.propTypes = {
level: PropTypes.string.isRequired, level: PropTypes.string.isRequired,
time: PropTypes.string.isRequired,
logger: PropTypes.string.isRequired, logger: PropTypes.string.isRequired,
message: PropTypes.string.isRequired, message: PropTypes.string.isRequired,
time: PropTypes.string.isRequired,
exception: PropTypes.string, exception: PropTypes.string,
columns: PropTypes.arrayOf(PropTypes.object).isRequired columns: PropTypes.arrayOf(PropTypes.object).isRequired
}; };