Add scm refspec to project detail and remove org id from top level shared component

This commit is contained in:
Marliana Lara
2019-10-28 10:25:10 -04:00
parent e4bde24f38
commit 31fdd5e85c
3 changed files with 5 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ class MultiCredentialsLookup extends React.Component {
const { selectedCredentialType, credentialTypes } = this.state; const { selectedCredentialType, credentialTypes } = this.state;
const { tooltip, i18n, credentials } = this.props; const { tooltip, i18n, credentials } = this.props;
return ( return (
<FormGroup label={i18n._(t`Credentials`)} fieldId="org-credentials"> <FormGroup label={i18n._(t`Credentials`)} fieldId="multiCredential">
{tooltip && ( {tooltip && (
<Tooltip position="right" content={tooltip}> <Tooltip position="right" content={tooltip}>
<QuestionCircleIcon /> <QuestionCircleIcon />
@@ -114,7 +114,7 @@ class MultiCredentialsLookup extends React.Component {
selectedCategory={selectedCredentialType} selectedCategory={selectedCredentialType}
onToggleItem={this.toggleCredentialSelection} onToggleItem={this.toggleCredentialSelection}
onloadCategories={this.loadCredentialTypes} onloadCategories={this.loadCredentialTypes}
id="org-credentials" id="multiCredential"
lookupHeader={i18n._(t`Credentials`)} lookupHeader={i18n._(t`Credentials`)}
name="credentials" name="credentials"
value={credentials} value={credentials}

View File

@@ -30,6 +30,7 @@ function ProjectDetail({ project, i18n }) {
scm_branch, scm_branch,
scm_clean, scm_clean,
scm_delete_on_update, scm_delete_on_update,
scm_refspec,
scm_type, scm_type,
scm_update_on_launch, scm_update_on_launch,
scm_update_cache_timeout, scm_update_cache_timeout,
@@ -98,6 +99,7 @@ function ProjectDetail({ project, i18n }) {
<Detail label={i18n._(t`SCM Type`)} value={scm_type} /> <Detail label={i18n._(t`SCM Type`)} value={scm_type} />
<Detail label={i18n._(t`SCM URL`)} value={scm_url} /> <Detail label={i18n._(t`SCM URL`)} value={scm_url} />
<Detail label={i18n._(t`SCM Branch`)} value={scm_branch} /> <Detail label={i18n._(t`SCM Branch`)} value={scm_branch} />
<Detail label={i18n._(t`SCM Refspec`)} value={scm_refspec} />
{summary_fields.credential && ( {summary_fields.credential && (
<Detail <Detail
label={i18n._(t`SCM Credential`)} label={i18n._(t`SCM Credential`)}

View File

@@ -88,6 +88,7 @@ describe('<ProjectDetail />', () => {
assertDetail('SCM Type', mockProject.scm_type); assertDetail('SCM Type', mockProject.scm_type);
assertDetail('SCM URL', mockProject.scm_url); assertDetail('SCM URL', mockProject.scm_url);
assertDetail('SCM Branch', mockProject.scm_branch); assertDetail('SCM Branch', mockProject.scm_branch);
assertDetail('SCM Refspec', mockProject.scm_refspec);
assertDetail( assertDetail(
'SCM Credential', 'SCM Credential',
`Scm: ${mockProject.summary_fields.credential.name}` `Scm: ${mockProject.summary_fields.credential.name}`