mirror of https://github.com/openspug/spug
parent
e9c161bcbe
commit
35b479c508
|
@ -317,6 +317,8 @@ def _deploy_ext2_host(helper, h_id, actions, env, spug_version):
|
|||
command = f'mkdir -p /tmp/{spug_version} && tar xf /tmp/{tar_gz_file} -C /tmp/{spug_version}/ '
|
||||
command += f'&& rm -rf {action["dst"]} && mv /tmp/{spug_version}/{sd_dst} {action["dst"]} '
|
||||
command += f'&& rm -rf /tmp/{spug_version}* && echo "transfer completed"'
|
||||
elif action.get('interpreter', 'shell') == 'python':
|
||||
command = f"cd /tmp && python3 <<EOF\n{action['data']}\nEOF"
|
||||
else:
|
||||
command = f'cd /tmp && {action["data"]}'
|
||||
helper.remote(host.id, ssh, command)
|
||||
|
|
|
@ -129,6 +129,12 @@ class Ext2Setup2 extends React.Component {
|
|||
<Input disabled={store.isReadOnly} value={item['title']} onChange={e => item['title'] = e.target.value}
|
||||
placeholder="请输入"/>
|
||||
</Form.Item>
|
||||
<Form.Item required label='解释器'>
|
||||
<Select value={item['interpreter']} placeholder={'请选择'} onChange={value => item['interpreter'] = value}>
|
||||
<Select.Option key={'shell'} value={'shell'}>shell</Select.Option>
|
||||
<Select.Option key={'python'} value={'python'}>python</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
{item['type'] === 'transfer' ? ([
|
||||
<Form.Item key={0} required label="数据来源">
|
||||
<Input
|
||||
|
|
Loading…
Reference in New Issue