mirror of https://github.com/openspug/spug
A 添加批量执行全局变量文档
parent
8a007058b2
commit
155319e72d
|
@ -26,6 +26,7 @@ class Job:
|
||||||
SPUG_HOST_HOSTNAME=hostname,
|
SPUG_HOST_HOSTNAME=hostname,
|
||||||
SPUG_SSH_PORT=str(port),
|
SPUG_SSH_PORT=str(port),
|
||||||
SPUG_SSH_USERNAME=username,
|
SPUG_SSH_USERNAME=username,
|
||||||
|
SPUG_INTERPRETER=interpreter
|
||||||
)
|
)
|
||||||
|
|
||||||
def _send(self, message, with_expire=False):
|
def _send(self, message, with_expire=False):
|
||||||
|
|
|
@ -66,7 +66,7 @@ function TaskIndex() {
|
||||||
style={{marginBottom: 24}}
|
style={{marginBottom: 24}}
|
||||||
icon={<PlusOutlined/>}
|
icon={<PlusOutlined/>}
|
||||||
onClick={() => store.showHost = true}>从主机列表中选择</Button>
|
onClick={() => store.showHost = true}>从主机列表中选择</Button>
|
||||||
<Form.Item required label="执行命令">
|
<Form.Item required label="执行命令" style={{position: 'relative'}}>
|
||||||
<Radio.Group
|
<Radio.Group
|
||||||
buttonStyle="solid"
|
buttonStyle="solid"
|
||||||
style={{marginBottom: 12}}
|
style={{marginBottom: 12}}
|
||||||
|
@ -75,6 +75,7 @@ function TaskIndex() {
|
||||||
<Radio.Button value="sh">Shell</Radio.Button>
|
<Radio.Button value="sh">Shell</Radio.Button>
|
||||||
<Radio.Button value="python">Python</Radio.Button>
|
<Radio.Button value="python">Python</Radio.Button>
|
||||||
</Radio.Group>
|
</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}/>
|
<ACEditor mode={interpreter} value={command} height="350px" width="100%" onChange={setCommand}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
|
|
|
@ -43,6 +43,12 @@ pre {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
.hisBlock {
|
.hisBlock {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -118,4 +124,8 @@ pre {
|
||||||
border-color: #1890ff;
|
border-color: #1890ff;
|
||||||
background-color: #e6f7ff;
|
background-color: #e6f7ff;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.output {
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue