Fixes navigation bug in InventoryAdd Adds SCM Branch field on JTForm

This commit is contained in:
Alex Corey 2020-01-14 12:01:02 -05:00
parent fd1e574fcb
commit 790942c0f2
2 changed files with 7 additions and 1 deletions

View File

@ -196,7 +196,12 @@ class JobTemplateDetail extends Component {
) : (
renderMissingDataDetail(i18n._(t`Project`))
)}
<Detail label={i18n._(t`SCM Branch`)} value={template.scm_branch} />
{template.scm_branch && (
<Detail
label={i18n._(t`SCM Branch`)}
value={template.scm_branch}
/>
)}
<Detail label={i18n._(t`Playbook`)} value={playbook} />
<Detail label={i18n._(t`Forks`)} value={forks || '0'} />
<Detail label={i18n._(t`Limit`)} value={limit} />

View File

@ -27,6 +27,7 @@ describe('<JobTemplateForm />', () => {
project: {
id: 3,
name: 'qux',
allow_override: true,
},
labels: { results: [{ name: 'Sushi', id: 1 }, { name: 'Major', id: 2 }] },
credentials: [