mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-10 08:20:24 +08:00
集群增加是否远程启动选项
This commit is contained in:
@@ -80,13 +80,14 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.Data["cluster"] = maps.Map{
|
this.Data["cluster"] = maps.Map{
|
||||||
"id": cluster.Id,
|
"id": cluster.Id,
|
||||||
"name": cluster.Name,
|
"name": cluster.Name,
|
||||||
"installDir": cluster.InstallDir,
|
"installDir": cluster.InstallDir,
|
||||||
"timeZone": cluster.TimeZone,
|
"timeZone": cluster.TimeZone,
|
||||||
"nodeMaxThreads": cluster.NodeMaxThreads,
|
"nodeMaxThreads": cluster.NodeMaxThreads,
|
||||||
"autoOpenPorts": cluster.AutoOpenPorts,
|
"autoOpenPorts": cluster.AutoOpenPorts,
|
||||||
"clock": clockConfig,
|
"clock": clockConfig,
|
||||||
|
"autoRemoteStart": cluster.AutoRemoteStart,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 默认值
|
// 默认值
|
||||||
@@ -99,15 +100,16 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
|
|
||||||
// RunPost 保存设置
|
// RunPost 保存设置
|
||||||
func (this *IndexAction) RunPost(params struct {
|
func (this *IndexAction) RunPost(params struct {
|
||||||
ClusterId int64
|
ClusterId int64
|
||||||
Name string
|
Name string
|
||||||
GrantId int64
|
GrantId int64
|
||||||
InstallDir string
|
InstallDir string
|
||||||
TimeZone string
|
TimeZone string
|
||||||
NodeMaxThreads int32
|
NodeMaxThreads int32
|
||||||
AutoOpenPorts bool
|
AutoOpenPorts bool
|
||||||
ClockAutoSync bool
|
ClockAutoSync bool
|
||||||
ClockServer string
|
ClockServer string
|
||||||
|
AutoRemoteStart bool
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
@@ -141,14 +143,15 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = this.RPC().NodeClusterRPC().UpdateNodeCluster(this.AdminContext(), &pb.UpdateNodeClusterRequest{
|
_, err = this.RPC().NodeClusterRPC().UpdateNodeCluster(this.AdminContext(), &pb.UpdateNodeClusterRequest{
|
||||||
NodeClusterId: params.ClusterId,
|
NodeClusterId: params.ClusterId,
|
||||||
Name: params.Name,
|
Name: params.Name,
|
||||||
NodeGrantId: params.GrantId,
|
NodeGrantId: params.GrantId,
|
||||||
InstallDir: params.InstallDir,
|
InstallDir: params.InstallDir,
|
||||||
TimeZone: params.TimeZone,
|
TimeZone: params.TimeZone,
|
||||||
NodeMaxThreads: params.NodeMaxThreads,
|
NodeMaxThreads: params.NodeMaxThreads,
|
||||||
AutoOpenPorts: params.AutoOpenPorts,
|
AutoOpenPorts: params.AutoOpenPorts,
|
||||||
ClockJSON: clockConfigJSON,
|
ClockJSON: clockConfigJSON,
|
||||||
|
AutoRemoteStart: params.AutoRemoteStart,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
|
|||||||
@@ -78,6 +78,13 @@
|
|||||||
<p class="comment">可选项。默认使用<code-label>pool.ntp.org</code-label>。</p>
|
<p class="comment">可选项。默认使用<code-label>pool.ntp.org</code-label>。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>自动远程启动</td>
|
||||||
|
<td>
|
||||||
|
<checkbox name="autoRemoteStart" v-model="cluster.autoRemoteStart"></checkbox>
|
||||||
|
<p class="comment">当检测到节点离线时,自动尝试远程启动(前提是节点已经设置了SSH登录认证)。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<submit-btn></submit-btn>
|
<submit-btn></submit-btn>
|
||||||
|
|||||||
Reference in New Issue
Block a user