Fix showing Grab ID in history details modal

pull/9117/head
Bogdan 1 year ago
parent 756384d94a
commit 53254f6aeb

@ -15,6 +15,7 @@ function HistoryDetails(props) {
eventType, eventType,
sourceTitle, sourceTitle,
data, data,
downloadId,
shortDateFormat, shortDateFormat,
timeFormat timeFormat
} = props; } = props;
@ -26,7 +27,6 @@ function HistoryDetails(props) {
nzbInfoUrl, nzbInfoUrl,
downloadClient, downloadClient,
downloadClientName, downloadClientName,
downloadId,
movieMatchType, movieMatchType,
age, age,
ageHours, ageHours,
@ -45,24 +45,26 @@ function HistoryDetails(props) {
/> />
{ {
!!indexer && indexer ?
<DescriptionListItem <DescriptionListItem
title={translate('Indexer')} title={translate('Indexer')}
data={indexer} data={indexer}
/> /> :
null
} }
{ {
!!releaseGroup && releaseGroup ?
<DescriptionListItem <DescriptionListItem
descriptionClassName={styles.description} descriptionClassName={styles.description}
title={translate('ReleaseGroup')} title={translate('ReleaseGroup')}
data={releaseGroup} data={releaseGroup}
/> /> :
null
} }
{ {
!!nzbInfoUrl && nzbInfoUrl ?
<span> <span>
<DescriptionListItemTitle> <DescriptionListItemTitle>
Info URL Info URL
@ -71,7 +73,8 @@ function HistoryDetails(props) {
<DescriptionListItemDescription> <DescriptionListItemDescription>
<Link to={nzbInfoUrl}>{nzbInfoUrl}</Link> <Link to={nzbInfoUrl}>{nzbInfoUrl}</Link>
</DescriptionListItemDescription> </DescriptionListItemDescription>
</span> </span> :
null
} }
{ {
@ -94,27 +97,30 @@ function HistoryDetails(props) {
} }
{ {
!!downloadId && downloadId ?
<DescriptionListItem <DescriptionListItem
title={translate('GrabID')} title={translate('GrabID')}
data={downloadId} data={downloadId}
/> /> :
null
} }
{ {
!!indexer && indexer ?
<DescriptionListItem <DescriptionListItem
title={translate('AgeWhenGrabbed')} title={translate('AgeWhenGrabbed')}
data={formatAge(age, ageHours, ageMinutes)} data={formatAge(age, ageHours, ageMinutes)}
/> /> :
null
} }
{ {
!!publishedDate && publishedDate ?
<DescriptionListItem <DescriptionListItem
title={translate('PublishedDate')} title={translate('PublishedDate')}
data={formatDateTime(publishedDate, shortDateFormat, timeFormat, { includeSeconds: true })} data={formatDateTime(publishedDate, shortDateFormat, timeFormat, { includeSeconds: true })}
/> /> :
null
} }
</DescriptionList> </DescriptionList>
); );
@ -134,11 +140,21 @@ function HistoryDetails(props) {
/> />
{ {
!!message && downloadId ?
<DescriptionListItem
title={translate('GrabID')}
data={downloadId}
/> :
null
}
{
message ?
<DescriptionListItem <DescriptionListItem
title={translate('Message')} title={translate('Message')}
data={message} data={message}
/> /> :
null
} }
</DescriptionList> </DescriptionList>
); );
@ -159,21 +175,23 @@ function HistoryDetails(props) {
/> />
{ {
!!droppedPath && droppedPath ?
<DescriptionListItem <DescriptionListItem
descriptionClassName={styles.description} descriptionClassName={styles.description}
title={translate('Source')} title={translate('Source')}
data={droppedPath} data={droppedPath}
/> /> :
null
} }
{ {
!!importedPath && importedPath ?
<DescriptionListItem <DescriptionListItem
descriptionClassName={styles.description} descriptionClassName={styles.description}
title={translate('ImportedTo')} title={translate('ImportedTo')}
data={importedPath} data={importedPath}
/> /> :
null
} }
</DescriptionList> </DescriptionList>
); );
@ -262,11 +280,21 @@ function HistoryDetails(props) {
/> />
{ {
!!message && downloadId ?
<DescriptionListItem
title={translate('GrabID')}
data={downloadId}
/> :
null
}
{
message ?
<DescriptionListItem <DescriptionListItem
title={translate('Message')} title={translate('Message')}
data={message} data={message}
/> /> :
null
} }
</DescriptionList> </DescriptionList>
); );
@ -287,6 +315,7 @@ HistoryDetails.propTypes = {
eventType: PropTypes.string.isRequired, eventType: PropTypes.string.isRequired,
sourceTitle: PropTypes.string.isRequired, sourceTitle: PropTypes.string.isRequired,
data: PropTypes.object.isRequired, data: PropTypes.object.isRequired,
downloadId: PropTypes.string,
shortDateFormat: PropTypes.string.isRequired, shortDateFormat: PropTypes.string.isRequired,
timeFormat: PropTypes.string.isRequired timeFormat: PropTypes.string.isRequired
}; };

@ -37,6 +37,7 @@ function HistoryDetailsModal(props) {
eventType, eventType,
sourceTitle, sourceTitle,
data, data,
downloadId,
isMarkingAsFailed, isMarkingAsFailed,
shortDateFormat, shortDateFormat,
timeFormat, timeFormat,
@ -59,6 +60,7 @@ function HistoryDetailsModal(props) {
eventType={eventType} eventType={eventType}
sourceTitle={sourceTitle} sourceTitle={sourceTitle}
data={data} data={data}
downloadId={downloadId}
shortDateFormat={shortDateFormat} shortDateFormat={shortDateFormat}
timeFormat={timeFormat} timeFormat={timeFormat}
/> />
@ -73,7 +75,7 @@ function HistoryDetailsModal(props) {
isSpinning={isMarkingAsFailed} isSpinning={isMarkingAsFailed}
onPress={onMarkAsFailedPress} onPress={onMarkAsFailedPress}
> >
Mark as Failed {translate('MarkAsFailed')}
</SpinnerButton> </SpinnerButton>
} }
@ -93,6 +95,7 @@ HistoryDetailsModal.propTypes = {
eventType: PropTypes.string.isRequired, eventType: PropTypes.string.isRequired,
sourceTitle: PropTypes.string.isRequired, sourceTitle: PropTypes.string.isRequired,
data: PropTypes.object.isRequired, data: PropTypes.object.isRequired,
downloadId: PropTypes.string,
isMarkingAsFailed: PropTypes.bool.isRequired, isMarkingAsFailed: PropTypes.bool.isRequired,
shortDateFormat: PropTypes.string.isRequired, shortDateFormat: PropTypes.string.isRequired,
timeFormat: PropTypes.string.isRequired, timeFormat: PropTypes.string.isRequired,

@ -64,6 +64,7 @@ class HistoryRow extends Component {
sourceTitle, sourceTitle,
date, date,
data, data,
downloadId,
isMarkingAsFailed, isMarkingAsFailed,
columns, columns,
shortDateFormat, shortDateFormat,
@ -233,6 +234,7 @@ class HistoryRow extends Component {
eventType={eventType} eventType={eventType}
sourceTitle={sourceTitle} sourceTitle={sourceTitle}
data={data} data={data}
downloadId={downloadId}
isMarkingAsFailed={isMarkingAsFailed} isMarkingAsFailed={isMarkingAsFailed}
shortDateFormat={shortDateFormat} shortDateFormat={shortDateFormat}
timeFormat={timeFormat} timeFormat={timeFormat}
@ -257,6 +259,7 @@ HistoryRow.propTypes = {
sourceTitle: PropTypes.string.isRequired, sourceTitle: PropTypes.string.isRequired,
date: PropTypes.string.isRequired, date: PropTypes.string.isRequired,
data: PropTypes.object.isRequired, data: PropTypes.object.isRequired,
downloadId: PropTypes.string,
isMarkingAsFailed: PropTypes.bool, isMarkingAsFailed: PropTypes.bool,
markAsFailedError: PropTypes.object, markAsFailedError: PropTypes.object,
columns: PropTypes.arrayOf(PropTypes.object).isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired,

@ -68,6 +68,7 @@ class MovieHistoryRow extends Component {
qualityCutoffNotMet, qualityCutoffNotMet,
date, date,
data, data,
downloadId,
isMarkingAsFailed, isMarkingAsFailed,
shortDateFormat, shortDateFormat,
timeFormat timeFormat
@ -153,6 +154,7 @@ class MovieHistoryRow extends Component {
eventType={eventType} eventType={eventType}
sourceTitle={sourceTitle} sourceTitle={sourceTitle}
data={data} data={data}
downloadId={downloadId}
isMarkingAsFailed={isMarkingAsFailed} isMarkingAsFailed={isMarkingAsFailed}
shortDateFormat={shortDateFormat} shortDateFormat={shortDateFormat}
timeFormat={timeFormat} timeFormat={timeFormat}
@ -175,6 +177,7 @@ MovieHistoryRow.propTypes = {
qualityCutoffNotMet: PropTypes.bool.isRequired, qualityCutoffNotMet: PropTypes.bool.isRequired,
date: PropTypes.string.isRequired, date: PropTypes.string.isRequired,
data: PropTypes.object.isRequired, data: PropTypes.object.isRequired,
downloadId: PropTypes.string,
isMarkingAsFailed: PropTypes.bool, isMarkingAsFailed: PropTypes.bool,
movie: PropTypes.object.isRequired, movie: PropTypes.object.isRequired,
shortDateFormat: PropTypes.string.isRequired, shortDateFormat: PropTypes.string.isRequired,

Loading…
Cancel
Save