mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: (History) Filter by Failed
This commit is contained in:
@@ -20,9 +20,9 @@ function getIconName(eventType) {
|
||||
}
|
||||
}
|
||||
|
||||
function getIconKind(data) {
|
||||
switch (data.successful) {
|
||||
case 'False':
|
||||
function getIconKind(successful) {
|
||||
switch (successful) {
|
||||
case false:
|
||||
return kinds.DANGER;
|
||||
default:
|
||||
return kinds.DEFAULT;
|
||||
@@ -44,9 +44,9 @@ function getTooltip(eventType, data, indexer) {
|
||||
}
|
||||
}
|
||||
|
||||
function HistoryEventTypeCell({ eventType, data, indexer }) {
|
||||
function HistoryEventTypeCell({ eventType, successful, data, indexer }) {
|
||||
const iconName = getIconName(eventType);
|
||||
const iconKind = getIconKind(data);
|
||||
const iconKind = getIconKind(successful);
|
||||
const tooltip = getTooltip(eventType, data, indexer);
|
||||
|
||||
return (
|
||||
@@ -64,6 +64,7 @@ function HistoryEventTypeCell({ eventType, data, indexer }) {
|
||||
|
||||
HistoryEventTypeCell.propTypes = {
|
||||
eventType: PropTypes.string.isRequired,
|
||||
successful: PropTypes.bool.isRequired,
|
||||
data: PropTypes.object,
|
||||
indexer: PropTypes.object
|
||||
};
|
||||
|
@@ -71,6 +71,7 @@ class HistoryRow extends Component {
|
||||
eventType,
|
||||
date,
|
||||
data,
|
||||
successful,
|
||||
isMarkingAsFailed,
|
||||
columns,
|
||||
shortDateFormat,
|
||||
@@ -102,6 +103,7 @@ class HistoryRow extends Component {
|
||||
indexer={indexer}
|
||||
eventType={eventType}
|
||||
data={data}
|
||||
successful={successful}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -352,6 +354,7 @@ HistoryRow.propTypes = {
|
||||
indexerId: PropTypes.number,
|
||||
indexer: PropTypes.object.isRequired,
|
||||
eventType: PropTypes.string.isRequired,
|
||||
successful: PropTypes.bool.isRequired,
|
||||
date: PropTypes.string.isRequired,
|
||||
data: PropTypes.object.isRequired,
|
||||
isMarkingAsFailed: PropTypes.bool,
|
||||
|
@@ -135,6 +135,17 @@ export const defaultState = {
|
||||
type: filterTypes.EQUAL
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'failed',
|
||||
label: translate('Failed'),
|
||||
filters: [
|
||||
{
|
||||
key: 'successful',
|
||||
value: false,
|
||||
type: filterTypes.EQUAL
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user