A 添加批量执行全局变量文档

pull/418/head
vapao 2021-11-30 10:52:02 +08:00
parent 8a007058b2
commit 155319e72d
3 changed files with 13 additions and 1 deletions

View File

@ -26,6 +26,7 @@ class Job:
SPUG_HOST_HOSTNAME=hostname,
SPUG_SSH_PORT=str(port),
SPUG_SSH_USERNAME=username,
SPUG_INTERPRETER=interpreter
)
def _send(self, message, with_expire=False):

View File

@ -66,7 +66,7 @@ function TaskIndex() {
style={{marginBottom: 24}}
icon={<PlusOutlined/>}
onClick={() => store.showHost = true}>从主机列表中选择</Button>
<Form.Item required label="执行命令">
<Form.Item required label="执行命令" style={{position: 'relative'}}>
<Radio.Group
buttonStyle="solid"
style={{marginBottom: 12}}
@ -75,6 +75,7 @@ function TaskIndex() {
<Radio.Button value="sh">Shell</Radio.Button>
<Radio.Button value="python">Python</Radio.Button>
</Radio.Group>
<a href="https://spug.cc/docs/batch-exec" target="_blank" className={style.tips}>全局变量</a>
<ACEditor mode={interpreter} value={command} height="350px" width="100%" onChange={setCommand}/>
</Form.Item>
<Form.Item>

View File

@ -43,6 +43,12 @@ pre {
margin: 0;
}
.tips {
position: absolute;
top: 10px;
left: 180px;
}
.hisBlock {
width: 40%;
display: flex;
@ -119,3 +125,7 @@ pre {
background-color: #e6f7ff;
}
}
.output {
}