mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 01:38:43 +00:00
More helm (#2274)
This commit is contained in:
parent
e0dd4b107c
commit
c0084ebfe8
2 changed files with 12 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {DropDownMenu, FormField, NotificationType, SlidingPanel} from 'argo-ui';
|
||||
import {DropDownMenu, FormField, FormSelect, NotificationType, SlidingPanel} from 'argo-ui';
|
||||
import * as PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
import {Form, FormApi, Text, TextArea} from 'react-form';
|
||||
|
|
@ -127,6 +127,7 @@ export class ReposList extends React.Component<RouteComponentProps<any>> {
|
|||
<h4>Connect repo using HTTPS</h4>
|
||||
<Form onSubmit={(params) => this.connectHTTPSRepo(params as NewHTTPSRepoParams)}
|
||||
getApi={(api) => this.formApiHTTPS = api}
|
||||
defaultValues={{type: 'git'}}
|
||||
validateError={(params: NewHTTPSRepoParams) => ({
|
||||
url: !params.url && 'Repo URL is required',
|
||||
password: !params.password && params.username && 'Password is required if username is given.',
|
||||
|
|
@ -135,11 +136,10 @@ export class ReposList extends React.Component<RouteComponentProps<any>> {
|
|||
{(formApi) => (
|
||||
<form onSubmit={formApi.submitForm} role='form' className='repos-list width-control'>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Type' field='type' component={Text}/>
|
||||
Either empty, "git" or "helm".
|
||||
<FormField formApi={formApi} label='Type' field='type' component={FormSelect} componentProps={{options: ['git', 'helm']}}/>
|
||||
</div>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Name' field='name' component={Text}/>
|
||||
<FormField formApi={formApi} label='Name (optional for Git)' field='name' component={Text}/>
|
||||
</div>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Repository URL' field='url' component={Text}/>
|
||||
|
|
@ -161,7 +161,7 @@ export class ReposList extends React.Component<RouteComponentProps<any>> {
|
|||
<FormField formApi={formApi} label='Skip server verification' field='insecure' component={CheckboxField}/>
|
||||
</div>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Enable LFS support' field='enableLfs' component={CheckboxField}/>
|
||||
<FormField formApi={formApi} label='Enable LFS support (Git only)' field='enableLfs' component={CheckboxField}/>
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
|
|
@ -187,11 +187,10 @@ export class ReposList extends React.Component<RouteComponentProps<any>> {
|
|||
{(formApi) => (
|
||||
<form onSubmit={formApi.submitForm} role='form' className='repos-list width-control'>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Type' field='type' component={Text}/>
|
||||
Either empty, "git" or "helm".
|
||||
<FormField formApi={formApi} label='Type' field='type' component={FormSelect} componentProps={{options: ['git', 'helm']}}/>
|
||||
</div>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Name' field='name' component={Text}/>
|
||||
<FormField formApi={formApi} label='Name (optional for Git)' field='name' component={Text}/>
|
||||
</div>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Repository URL' field='url' component={Text}/>
|
||||
|
|
@ -203,7 +202,7 @@ export class ReposList extends React.Component<RouteComponentProps<any>> {
|
|||
<FormField formApi={formApi} label='Skip server verification' field='insecure' component={CheckboxField}/>
|
||||
</div>
|
||||
<div className='argo-form-row'>
|
||||
<FormField formApi={formApi} label='Enable LFS support' field='enableLfs' component={CheckboxField}/>
|
||||
<FormField formApi={formApi} label='Enable LFS support (Git only)' field='enableLfs' component={CheckboxField}/>
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ func (g gitRepo) ListApps(revision string) (map[string]string, string, error) {
|
|||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
err = g.client.Checkout(resolvedRevision)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
apps, err := g.disco(g.client.Root())
|
||||
return apps, resolvedRevision, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue