mirror of https://github.com/openspug/spug
U 更新提示信息
parent
78b30d0451
commit
0b9ab1e379
|
@ -112,7 +112,7 @@ def _do_sync(rds, task, host):
|
||||||
fp.write(host.pkey or AppSetting.get('private_key'))
|
fp.write(host.pkey or AppSetting.get('private_key'))
|
||||||
fp.flush()
|
fp.flush()
|
||||||
|
|
||||||
options = '-azv' if task.host_id else '-rzv'
|
options = '-azv --progress' if task.host_id else '-rzv --progress'
|
||||||
argument = f'{task.src_dir}/ {host.username}@{host.hostname}:{task.dst_dir}'
|
argument = f'{task.src_dir}/ {host.username}@{host.hostname}:{task.dst_dir}'
|
||||||
command = f'rsync {options} -h -e "ssh -p {host.port} -o StrictHostKeyChecking=no -i {fp.name}" {argument}'
|
command = f'rsync {options} -h -e "ssh -p {host.port} -o StrictHostKeyChecking=no -i {fp.name}" {argument}'
|
||||||
task = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
task = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
|
|
@ -6,7 +6,12 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import {
|
import {
|
||||||
PlusOutlined, ThunderboltOutlined, QuestionCircleOutlined, UploadOutlined, CloudServerOutlined
|
PlusOutlined,
|
||||||
|
ThunderboltOutlined,
|
||||||
|
QuestionCircleOutlined,
|
||||||
|
UploadOutlined,
|
||||||
|
CloudServerOutlined,
|
||||||
|
BulbOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { Form, Button, Alert, Tooltip, Space, Card, Table, Input, Upload, message } from 'antd';
|
import { Form, Button, Alert, Tooltip, Space, Card, Table, Input, Upload, message } from 'antd';
|
||||||
import { AuthDiv, Breadcrumb } from 'components';
|
import { AuthDiv, Breadcrumb } from 'components';
|
||||||
|
@ -119,7 +124,11 @@ function TransferIndex() {
|
||||||
<Button danger type="link" onClick={() => handleRemove(index)}>移除</Button>)}/>
|
<Button danger type="link" onClick={() => handleRemove(index)}>移除</Button>)}/>
|
||||||
</Table>
|
</Table>
|
||||||
</Card>
|
</Card>
|
||||||
<Card type="inner" title="分发目标" style={{margin: '24px 0'}} bodyStyle={{paddingBottom: 0}}>
|
<Card type="inner" title="分发目标" style={{margin: '24px 0'}} bodyStyle={{paddingBottom: 0}} extra={(
|
||||||
|
<Tooltip className={style.tips} title="文件分发功能依赖rsync,大部分linux发行版默认都已安装,如未安装可通过「批量执行/执行任务」进行批量安装。">
|
||||||
|
<BulbOutlined/> 小提示
|
||||||
|
</Tooltip>
|
||||||
|
)}>
|
||||||
<Form>
|
<Form>
|
||||||
<Form.Item required label="目标路径">
|
<Form.Item required label="目标路径">
|
||||||
<Input value={dir} onChange={e => setDir(e.target.value)} placeholder="请输入目标路径"/>
|
<Input value={dir} onChange={e => setDir(e.target.value)} placeholder="请输入目标路径"/>
|
||||||
|
|
|
@ -16,19 +16,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
position: absolute;
|
font-size: 12px;
|
||||||
top: 10px;
|
|
||||||
left: 180px;
|
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips:hover {
|
:global(.ant-table-tbody) {
|
||||||
color: #777;
|
tr:last-child {
|
||||||
}
|
td {
|
||||||
|
border: none;
|
||||||
.editor {
|
}
|
||||||
height: calc(100vh - 482px) !important;
|
}
|
||||||
min-height: 152px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.ant-empty-normal) {
|
:global(.ant-empty-normal) {
|
||||||
|
|
Loading…
Reference in New Issue