Merge branch 'plugins-feedback' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#583)

This commit is contained in:
vardan.bansal@harness.io vardan 2023-09-20 17:13:02 +00:00 committed by Harness
commit 0fda028070
3 changed files with 49 additions and 47 deletions

View File

@ -306,7 +306,7 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX.
...(name && { name }), ...(name && { name }),
type: 'run', type: 'run',
...(Object.keys(container).length === 1 && container?.image ...(Object.keys(container).length === 1 && container?.image
? { spec: { container: get(container, 'image') } } ? { spec: { ...pluginFormData, container: get(container, 'image') } }
: { spec: pluginFormData }) : { spec: pluginFormData })
} }
default: default:
@ -389,6 +389,7 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX.
flex={{ justifyContent: 'space-between' }}> flex={{ justifyContent: 'space-between' }}>
{category === PluginCategory.Harness ? ( {category === PluginCategory.Harness ? (
<Layout.Vertical width="inherit"> <Layout.Vertical width="inherit">
<FormInput.Text name={'name'} label={getString('name')} style={{ width: '100%' }} key={'name'} />
<FormInput.TextArea <FormInput.TextArea
name={'script'} name={'script'}
label={getString('pluginsPanel.run.script')} label={getString('pluginsPanel.run.script')}
@ -419,6 +420,47 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX.
style={{ width: '100%' }} style={{ width: '100%' }}
key={'container.image'} key={'container.image'}
/> />
<FormInput.Select
name={'container.pull'}
label={getString('pluginsPanel.run.pull')}
style={{ width: '100%' }}
key={'container.pull'}
items={[
{ label: getString('pluginsPanel.run.always'), value: 'always' },
{ label: getString('pluginsPanel.run.never'), value: 'never' },
{ label: getString('pluginsPanel.run.ifNotExists'), value: 'f-not-exists' }
]}
/>
<FormInput.Text
name={'container.entrypoint'}
label={getString('pluginsPanel.run.entrypoint')}
style={{ width: '100%' }}
key={'container.entrypoint'}
/>
<FormInput.Text
name={'container.network'}
label={getString('pluginsPanel.run.network')}
style={{ width: '100%' }}
key={'container.network'}
/>
<FormInput.Text
name={'container.networkMode'}
label={getString('pluginsPanel.run.networkMode')}
style={{ width: '100%' }}
key={'container.networkMode'}
/>
<FormInput.Toggle
name={'container.privileged'}
label={getString('pluginsPanel.run.privileged')}
style={{ width: '100%' }}
key={'container.privileged'}
/>
<FormInput.Text
name={'container.user'}
label={getString('user')}
style={{ width: '100%' }}
key={'container.user'}
/>
<Accordion activeId=""> <Accordion activeId="">
<Accordion.Panel <Accordion.Panel
id="container.credentials" id="container.credentials"
@ -441,52 +483,6 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX.
} }
/> />
</Accordion> </Accordion>
<FormInput.Text
name={'container.pull'}
label={getString('pluginsPanel.run.pull')}
style={{ width: '100%' }}
key={'container.pull'}
/>
<FormInput.Text
name={'container.entrypoint'}
label={getString('pluginsPanel.run.entrypoint')}
style={{ width: '100%' }}
key={'container.entrypoint'}
/>
<FormInput.Text
name={'container.network'}
label={getString('pluginsPanel.run.network')}
style={{ width: '100%' }}
key={'container.network'}
/>
<FormInput.Text
name={'container.networkMode'}
label={getString('pluginsPanel.run.networkMode')}
style={{ width: '100%' }}
key={'container.networkMode'}
/>
<FormInput.RadioGroup
name={'container.privileged'}
label={getString('pluginsPanel.run.privileged')}
style={{ width: '100%' }}
key={'container.privileged'}
items={[
{ label: 'Yes', value: 'true' },
{ label: 'No', value: 'false' }
]}
/>
<FormInput.Toggle
name={'container.privileged'}
label={getString('pluginsPanel.run.privileged')}
style={{ width: '100%' }}
key={'container.privileged'}
/>
<FormInput.Text
name={'container.user'}
label={getString('user')}
style={{ width: '100%' }}
key={'container.user'}
/>
</Layout.Vertical> </Layout.Vertical>
} }
/> />

View File

@ -430,13 +430,16 @@ export interface StringsMap {
'plugins.stepLabel': string 'plugins.stepLabel': string
'plugins.title': string 'plugins.title': string
'pluginsPanel.plugins.helptext': string 'pluginsPanel.plugins.helptext': string
'pluginsPanel.run.always': string
'pluginsPanel.run.bash': string 'pluginsPanel.run.bash': string
'pluginsPanel.run.credentials': string 'pluginsPanel.run.credentials': string
'pluginsPanel.run.entrypoint': string 'pluginsPanel.run.entrypoint': string
'pluginsPanel.run.helptext': string 'pluginsPanel.run.helptext': string
'pluginsPanel.run.ifNotExists': string
'pluginsPanel.run.image': string 'pluginsPanel.run.image': string
'pluginsPanel.run.network': string 'pluginsPanel.run.network': string
'pluginsPanel.run.networkMode': string 'pluginsPanel.run.networkMode': string
'pluginsPanel.run.never': string
'pluginsPanel.run.password': string 'pluginsPanel.run.password': string
'pluginsPanel.run.path': string 'pluginsPanel.run.path': string
'pluginsPanel.run.powershell': string 'pluginsPanel.run.powershell': string

View File

@ -738,6 +738,9 @@ pluginsPanel:
networkMode: Network Mode networkMode: Network Mode
privileged: Privileged privileged: Privileged
path: Path path: Path
always: Always
never: Never
ifNotExists: If not exists
createNewRepo: Create New repository createNewRepo: Create New repository
importGitRepo: Import Repository importGitRepo: Import Repository
importRepo: importRepo: