增加SSH认证连接测试功能

This commit is contained in:
GoEdgeLab
2021-04-18 21:19:50 +08:00
parent 7e9422df78
commit c35c7e261d
22 changed files with 221 additions and 63 deletions

View File

@@ -19,19 +19,19 @@ func (this *GrantAction) Init() {
func (this *GrantAction) RunGet(params struct {
GrantId int64
}) {
grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: params.GrantId})
grantResp, err := this.RPC().NodeGrantRPC().FindEnabledNodeGrant(this.AdminContext(), &pb.FindEnabledNodeGrantRequest{NodeGrantId: params.GrantId})
if err != nil {
this.ErrorPage(err)
return
}
if grantResp.Grant == nil {
if grantResp.NodeGrant == nil {
this.WriteString("can not find the grant")
return
}
// TODO 处理节点专用的认证
grant := grantResp.Grant
grant := grantResp.NodeGrant
this.Data["grant"] = maps.Map{
"id": grant.Id,
"name": grant.Name,