mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
Fix bug where falsy details return 0
This commit is contained in:
@@ -231,11 +231,13 @@ function TemplateListItem({
|
|||||||
value={template.description}
|
value={template.description}
|
||||||
dataCy={`template-${template.id}-description`}
|
dataCy={`template-${template.id}-description`}
|
||||||
/>
|
/>
|
||||||
<Detail
|
{summaryFields.recent_jobs && summaryFields.recent_jobs.length ? (
|
||||||
label={i18n._(t`Activity`)}
|
<Detail
|
||||||
value={<Sparkline jobs={summaryFields.recent_jobs} />}
|
label={i18n._(t`Activity`)}
|
||||||
dataCy={`template-${template.id}-activity`}
|
value={<Sparkline jobs={summaryFields.recent_jobs} />}
|
||||||
/>
|
dataCy={`template-${template.id}-activity`}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
{summaryFields.organization && (
|
{summaryFields.organization && (
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Organization`)}
|
label={i18n._(t`Organization`)}
|
||||||
@@ -284,7 +286,7 @@ function TemplateListItem({
|
|||||||
value={formatDateString(template.modified)}
|
value={formatDateString(template.modified)}
|
||||||
dataCy={`template-${template.id}-last-modified`}
|
dataCy={`template-${template.id}-last-modified`}
|
||||||
/>
|
/>
|
||||||
{summaryFields.credentials && summaryFields.credentials.length && (
|
{summaryFields.credentials && summaryFields.credentials.length ? (
|
||||||
<Detail
|
<Detail
|
||||||
fullWidth
|
fullWidth
|
||||||
label={i18n._(t`Credentials`)}
|
label={i18n._(t`Credentials`)}
|
||||||
@@ -300,7 +302,7 @@ function TemplateListItem({
|
|||||||
}
|
}
|
||||||
dataCy={`template-${template.id}-credentials`}
|
dataCy={`template-${template.id}-credentials`}
|
||||||
/>
|
/>
|
||||||
)}
|
) : null}
|
||||||
{summaryFields.labels && summaryFields.labels.results.length > 0 && (
|
{summaryFields.labels && summaryFields.labels.results.length > 0 && (
|
||||||
<Detail
|
<Detail
|
||||||
fullWidth
|
fullWidth
|
||||||
|
|||||||
Reference in New Issue
Block a user