创建节点表单显示剩余配额

This commit is contained in:
刘祥超
2023-05-27 15:33:08 +08:00
parent 5eb0fb3422
commit f5fea6c34d
6 changed files with 45 additions and 1 deletions

View File

@@ -92,6 +92,17 @@ func (this *CreateNodeAction) RunGet(params struct {
// 安装文件下载
this.Data["installerFiles"] = clusterutils.ListInstallerFiles()
// 限额
maxNodes, leftNodes, err := this.findNodesQuota()
if err != nil {
this.ErrorPage(err)
return
}
this.Data["quota"] = maps.Map{
"maxNodes": maxNodes,
"leftNodes": leftNodes,
}
this.Show()
}