实现远程升级节点

This commit is contained in:
GoEdgeLab
2020-10-28 12:35:49 +08:00
parent 0bf5859112
commit 97b5405fcf
16 changed files with 299 additions and 29 deletions

View File

@@ -0,0 +1,27 @@
package cluster
import (
"github.com/TeaOSLab/EdgeAdmin/internal/utils/numberutils"
"github.com/iwind/TeaGo/maps"
)
// 安装升级相关的左侧菜单
func LeftMenuItemsForInstall(clusterId int64, selectedItem string) []maps.Map {
return []maps.Map{
{
"name": "自动注册",
"url": "/clusters/cluster/installNodes?clusterId=" + numberutils.FormatInt64(clusterId),
"isActive": selectedItem == "register",
},
{
"name": "远程安装",
"url": "/clusters/cluster/installRemote?clusterId=" + numberutils.FormatInt64(clusterId),
"isActive": selectedItem == "install",
},
{
"name": "远程升级",
"url": "/clusters/cluster/upgradeRemote?clusterId=" + numberutils.FormatInt64(clusterId),
"isActive": selectedItem == "upgrade",
},
}
}