mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
Add history parameters to indexer history
This commit is contained in:
parent
0a439a4a96
commit
b472a022a6
5 changed files with 33 additions and 1 deletions
|
@ -14,7 +14,7 @@ import HistoryEventTypeCell from './HistoryEventTypeCell';
|
|||
import HistoryRowParameter from './HistoryRowParameter';
|
||||
import styles from './HistoryRow.css';
|
||||
|
||||
const historyParameters = [
|
||||
export const historyParameters = [
|
||||
{ key: historyDataTypes.IMDB_ID, title: 'IMDb' },
|
||||
{ key: historyDataTypes.TMDB_ID, title: 'TMDb' },
|
||||
{ key: historyDataTypes.TVDB_ID, title: 'TVDb' },
|
||||
|
|
|
@ -28,6 +28,11 @@ const columns = [
|
|||
label: () => translate('Query'),
|
||||
isVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'parameters',
|
||||
label: () => translate('Parameters'),
|
||||
isVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'date',
|
||||
label: () => translate('Date'),
|
||||
|
|
|
@ -16,3 +16,8 @@
|
|||
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.parametersContent {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
interface CssExports {
|
||||
'details': string;
|
||||
'elapsedTime': string;
|
||||
'parametersContent': string;
|
||||
'query': string;
|
||||
'source': string;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import TableRow from 'Components/Table/TableRow';
|
|||
import { icons } from 'Helpers/Props';
|
||||
import HistoryDetailsModal from 'History/Details/HistoryDetailsModal';
|
||||
import HistoryEventTypeCell from 'History/HistoryEventTypeCell';
|
||||
import { historyParameters } from 'History/HistoryRow';
|
||||
import HistoryRowParameter from 'History/HistoryRowParameter';
|
||||
import Indexer from 'Indexer/Indexer';
|
||||
import { HistoryData } from 'typings/History';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
@ -42,6 +44,11 @@ function IndexerHistoryRow(props: IndexerHistoryRowProps) {
|
|||
setIsDetailsModalOpen(false);
|
||||
}, [setIsDetailsModalOpen]);
|
||||
|
||||
const parameters = historyParameters.filter(
|
||||
(parameter) =>
|
||||
parameter.key in data && data[parameter.key as keyof HistoryData]
|
||||
);
|
||||
|
||||
return (
|
||||
<TableRow>
|
||||
<HistoryEventTypeCell
|
||||
|
@ -53,6 +60,20 @@ function IndexerHistoryRow(props: IndexerHistoryRowProps) {
|
|||
|
||||
<TableRowCell className={styles.query}>{data.query}</TableRowCell>
|
||||
|
||||
<TableRowCell>
|
||||
<div className={styles.parametersContent}>
|
||||
{parameters.map((parameter) => {
|
||||
return (
|
||||
<HistoryRowParameter
|
||||
key={parameter.key}
|
||||
title={parameter.title}
|
||||
value={data[parameter.key as keyof HistoryData]}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</TableRowCell>
|
||||
|
||||
<RelativeDateCell date={date} />
|
||||
|
||||
<TableRowCell className={styles.source}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue