mirror of https://github.com/openspug/spug
A 添加批量执行全局变量文档
parent
8a007058b2
commit
155319e72d
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -43,6 +43,12 @@ pre {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 180px;
|
||||
}
|
||||
|
||||
.hisBlock {
|
||||
width: 40%;
|
||||
display: flex;
|
||||
|
@ -118,4 +124,8 @@ pre {
|
|||
border-color: #1890ff;
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
}
|
||||
|
||||
.output {
|
||||
|
||||
}
|
Loading…
Reference in New Issue