mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
History Improvements Round 1
This commit is contained in:
@@ -70,6 +70,7 @@ import {
|
||||
faLanguage as fasLanguage,
|
||||
faLaptop as fasLaptop,
|
||||
faLevelUpAlt as fasLevelUpAlt,
|
||||
faLock as fasLock,
|
||||
faMedkit as fasMedkit,
|
||||
faMinus as fasMinus,
|
||||
faPause as fasPause,
|
||||
@@ -167,6 +168,7 @@ export const IN_CINEMAS = fasTicketAlt;
|
||||
export const INFO = fasInfoCircle;
|
||||
export const INTERACTIVE = fasUser;
|
||||
export const KEYBOARD = farKeyboard;
|
||||
export const LOCK = fasLock;
|
||||
export const LOGOUT = fasSignOutAlt;
|
||||
export const MEDIA_INFO = farFileInvoice;
|
||||
export const MISSING = fasExclamationTriangle;
|
||||
|
@@ -12,7 +12,7 @@ function HistoryDetails(props) {
|
||||
data
|
||||
} = props;
|
||||
|
||||
if (eventType === 'indexerQuery') {
|
||||
if (eventType === 'indexerQuery' || eventType === 'indexerRss') {
|
||||
const {
|
||||
query,
|
||||
queryResults,
|
||||
@@ -65,7 +65,8 @@ function HistoryDetails(props) {
|
||||
|
||||
if (eventType === 'releaseGrabbed') {
|
||||
const {
|
||||
source
|
||||
source,
|
||||
title
|
||||
} = data;
|
||||
|
||||
return (
|
||||
@@ -82,7 +83,32 @@ function HistoryDetails(props) {
|
||||
!!data &&
|
||||
<DescriptionListItem
|
||||
title={'Source'}
|
||||
data={source}
|
||||
data={source ? source : '-'}
|
||||
/>
|
||||
}
|
||||
|
||||
{
|
||||
!!data &&
|
||||
<DescriptionListItem
|
||||
title={'Title'}
|
||||
data={title ? title : '-'}
|
||||
/>
|
||||
}
|
||||
</DescriptionList>
|
||||
);
|
||||
}
|
||||
|
||||
if (eventType === 'indexerAuth') {
|
||||
return (
|
||||
<DescriptionList
|
||||
descriptionClassName={styles.description}
|
||||
title={translate('Auth')}
|
||||
>
|
||||
{
|
||||
!!indexer &&
|
||||
<DescriptionListItem
|
||||
title={translate('Indexer')}
|
||||
data={indexer.name}
|
||||
/>
|
||||
}
|
||||
</DescriptionList>
|
||||
|
@@ -16,6 +16,12 @@ function getHeaderTitle(eventType) {
|
||||
switch (eventType) {
|
||||
case 'indexerQuery':
|
||||
return 'Indexer Query';
|
||||
case 'releaseGrabbed':
|
||||
return 'Release Grabbed';
|
||||
case 'indexerAuth':
|
||||
return 'Indexer Auth Attempt';
|
||||
case 'indexerRss':
|
||||
return 'Indexer Rss Query';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class History extends Component {
|
||||
error,
|
||||
isMoviesFetching,
|
||||
isMoviesPopulated,
|
||||
moviesError,
|
||||
indexersError,
|
||||
items,
|
||||
columns,
|
||||
selectedFilterKey,
|
||||
@@ -40,7 +40,7 @@ class History extends Component {
|
||||
|
||||
const isFetchingAny = isFetching || isMoviesFetching;
|
||||
const isAllPopulated = isPopulated && (isMoviesPopulated || !items.length);
|
||||
const hasError = error || moviesError;
|
||||
const hasError = error || indexersError;
|
||||
|
||||
return (
|
||||
<PageContent title={translate('History')}>
|
||||
@@ -140,7 +140,7 @@ History.propTypes = {
|
||||
error: PropTypes.object,
|
||||
isMoviesFetching: PropTypes.bool.isRequired,
|
||||
isMoviesPopulated: PropTypes.bool.isRequired,
|
||||
moviesError: PropTypes.object,
|
||||
indexersError: PropTypes.object,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
selectedFilterKey: PropTypes.string.isRequired,
|
||||
|
@@ -15,7 +15,7 @@ function createMapStateToProps() {
|
||||
return {
|
||||
isMoviesFetching: indexers.isFetching,
|
||||
isMoviesPopulated: indexers.isPopulated,
|
||||
moviesError: indexers.error,
|
||||
indexersError: indexers.error,
|
||||
...history
|
||||
};
|
||||
}
|
||||
|
@@ -11,6 +11,10 @@ function getIconName(eventType) {
|
||||
return icons.SEARCH;
|
||||
case 'releaseGrabbed':
|
||||
return icons.DOWNLOAD;
|
||||
case 'indexerAuth':
|
||||
return icons.LOCK;
|
||||
case 'indexerRss':
|
||||
return icons.RSS;
|
||||
default:
|
||||
return icons.UNKNOWN;
|
||||
}
|
||||
@@ -31,6 +35,10 @@ function getTooltip(eventType, data, indexer) {
|
||||
return `Query "${data.query}" sent to ${indexer.name}`;
|
||||
case 'releaseGrabbed':
|
||||
return `Release grabbed from ${indexer.name}`;
|
||||
case 'indexerAuth':
|
||||
return `Auth attempted for ${indexer.name}`;
|
||||
case 'indexerRss':
|
||||
return `RSS query for ${indexer.name}`;
|
||||
default:
|
||||
return 'Unknown event';
|
||||
}
|
||||
|
@@ -16,6 +16,18 @@
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.categories {
|
||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.source {
|
||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.details {
|
||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||
|
||||
|
@@ -117,6 +117,21 @@ class HistoryRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'categories') {
|
||||
return (
|
||||
<TableRowCell
|
||||
key={name}
|
||||
className={styles.indexer}
|
||||
>
|
||||
{
|
||||
data.categories ?
|
||||
data.categories :
|
||||
null
|
||||
}
|
||||
</TableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'successful') {
|
||||
return (
|
||||
<TableRowCell
|
||||
@@ -128,6 +143,21 @@ class HistoryRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'source') {
|
||||
return (
|
||||
<TableRowCell
|
||||
key={name}
|
||||
className={styles.indexer}
|
||||
>
|
||||
{
|
||||
data.source ?
|
||||
data.source :
|
||||
null
|
||||
}
|
||||
</TableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'elapsedTime') {
|
||||
return (
|
||||
<TableRowCell
|
||||
|
@@ -61,6 +61,8 @@
|
||||
.downloadLink {
|
||||
composes: link from '~Components/Link/Link.css';
|
||||
|
||||
margin: 0 2px;
|
||||
width: 22px;
|
||||
color: $textColor;
|
||||
}
|
||||
|
||||
|
@@ -220,6 +220,13 @@ class SearchIndexRow extends Component {
|
||||
title={'Grab'}
|
||||
to={downloadUrl}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
className={styles.downloadLink}
|
||||
name={icons.SAVE}
|
||||
title={'Save'}
|
||||
to={downloadUrl}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
@@ -46,6 +46,12 @@ export const defaultState = {
|
||||
isSortable: false,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'categories',
|
||||
label: 'Categories',
|
||||
isSortable: false,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'date',
|
||||
label: translate('Date'),
|
||||
@@ -56,7 +62,13 @@ export const defaultState = {
|
||||
name: 'successful',
|
||||
label: 'Successful',
|
||||
isSortable: false,
|
||||
isVisible: true
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'source',
|
||||
label: 'Source',
|
||||
isSortable: false,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'elapsedTime',
|
||||
|
Reference in New Issue
Block a user