mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 20:08:40 +08:00
fix
This commit is contained in:
parent
12d67a1d60
commit
d11def03bb
@ -83,6 +83,10 @@ public class NodeService extends BaseWorkspaceService<NodeModel> {
|
||||
if (StrUtil.isNotEmpty(sshId)) {
|
||||
SshModel byKey = sshService.getByKey(sshId, request);
|
||||
Assert.notNull(byKey, "对应的 SSH 不存在");
|
||||
List<NodeModel> nodeBySshId = this.getNodeBySshId(sshId);
|
||||
nodeBySshId = ObjectUtil.defaultIfNull(nodeBySshId, Collections.EMPTY_LIST);
|
||||
Optional<NodeModel> any = nodeBySshId.stream().filter(nodeModel2 -> !StrUtil.equals(id, nodeModel2.getId())).findAny();
|
||||
Assert.state(!any.isPresent(), "对应的SSH已经被其他节点绑定啦");
|
||||
}
|
||||
if (nodeModel.isOpenStatus()) {
|
||||
int timeOut = nodeModel.getTimeOut();
|
||||
|
@ -15,6 +15,10 @@ export function getSshCheckAgent(params) {
|
||||
url: "/node/ssh/check_agent.json",
|
||||
method: "get",
|
||||
params: params,
|
||||
timeout: 0,
|
||||
headers: {
|
||||
loading: "no",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,12 @@
|
||||
<a-tooltip slot="name" slot-scope="text" placement="topLeft" :title="text">
|
||||
<span>{{ text }}</span>
|
||||
</a-tooltip>
|
||||
<template slot="status" slot-scope="text, record">
|
||||
<a-tooltip v-if="record.runMode !== 'File'" placement="topLeft" title="状态操作请到控制台中控制">
|
||||
<a-switch :checked="text" disabled checked-children="开" un-checked-children="关" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<a-switch slot="status" slot-scope="text" :checked="text" disabled checked-children="开" un-checked-children="关" />
|
||||
<a-tooltip slot="port" slot-scope="text, record" placement="topLeft" :title="`进程号:${record.pid}, 端口号:${record.port}`">
|
||||
<span v-if="record.pid">{{ record.port }}/{{ record.pid }}</span>
|
||||
</a-tooltip>
|
||||
|
@ -5,6 +5,7 @@
|
||||
<a-input class="search-input-item" v-model="listQuery['%host%']" placeholder="节点地址" />
|
||||
<a-button type="primary" @click="loadData">搜索</a-button>
|
||||
<a-button type="primary" @click="handleAdd">新增</a-button>
|
||||
关联节点数据是异步获取有一定时间延迟
|
||||
</div>
|
||||
<!-- 数据表格 -->
|
||||
<a-table :data-source="list" :loading="loading" :columns="columns" :pagination="this.pagination" @change="changePage" bordered :rowKey="(record, index) => index">
|
||||
@ -386,6 +387,7 @@ export default {
|
||||
this.list = res.data.result;
|
||||
this.listQuery.total = res.data.total;
|
||||
//
|
||||
this.sshAgentInfo = {};
|
||||
let ids = this.list
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
|
Loading…
Reference in New Issue
Block a user