mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	优化命名
This commit is contained in:
		@@ -15,7 +15,7 @@ func (this *DeleteAction) RunPost(params struct {
 | 
			
		||||
}) {
 | 
			
		||||
	// TODO 检查权限
 | 
			
		||||
 | 
			
		||||
	_, err := this.RPC().AuthorityNodeRPC().DeleteAuthorityNode(this.AdminContext(), &pb.DeleteAuthorityNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	_, err := this.RPC().AuthorityNodeRPC().DeleteAuthorityNode(this.AdminContext(), &pb.DeleteAuthorityNodeRequest{AuthorityNodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ func (this *IndexAction) RunGet(params struct{}) {
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		for _, node := range nodesResp.Nodes {
 | 
			
		||||
		for _, node := range nodesResp.AuthorityNodes {
 | 
			
		||||
			// 状态
 | 
			
		||||
			status := &nodeconfigs.NodeStatus{}
 | 
			
		||||
			if len(node.StatusJSON) > 0 {
 | 
			
		||||
 
 | 
			
		||||
@@ -41,7 +41,7 @@ func (this *CreatePopupAction) RunPost(params struct {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 创建日志
 | 
			
		||||
	defer this.CreateLog(oplogs.LevelInfo, "创建认证节点 %d", createResp.NodeId)
 | 
			
		||||
	defer this.CreateLog(oplogs.LevelInfo, "创建认证节点 %d", createResp.AuthorityNodeId)
 | 
			
		||||
 | 
			
		||||
	this.Success()
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,12 +17,12 @@ func (this *IndexAction) Init() {
 | 
			
		||||
func (this *IndexAction) RunGet(params struct {
 | 
			
		||||
	NodeId int64
 | 
			
		||||
}) {
 | 
			
		||||
	nodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	nodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{AuthorityNodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	node := nodeResp.Node
 | 
			
		||||
	node := nodeResp.AuthorityNode
 | 
			
		||||
	if node == nil {
 | 
			
		||||
		this.NotFound("authorityNode", params.NodeId)
 | 
			
		||||
		return
 | 
			
		||||
 
 | 
			
		||||
@@ -19,12 +19,12 @@ func (this *InstallAction) RunGet(params struct {
 | 
			
		||||
	NodeId int64
 | 
			
		||||
}) {
 | 
			
		||||
	// 认证节点信息
 | 
			
		||||
	nodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	nodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{AuthorityNodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	node := nodeResp.Node
 | 
			
		||||
	node := nodeResp.AuthorityNode
 | 
			
		||||
	if node == nil {
 | 
			
		||||
		this.NotFound("authorityNode", params.NodeId)
 | 
			
		||||
		return
 | 
			
		||||
 
 | 
			
		||||
@@ -31,12 +31,12 @@ func (this *LogsAction) RunGet(params struct {
 | 
			
		||||
	this.Data["keyword"] = params.Keyword
 | 
			
		||||
	this.Data["level"] = params.Level
 | 
			
		||||
 | 
			
		||||
	authorityNodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	authorityNodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{AuthorityNodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	authorityNode := authorityNodeResp.Node
 | 
			
		||||
	authorityNode := authorityNodeResp.AuthorityNode
 | 
			
		||||
	if authorityNode == nil {
 | 
			
		||||
		this.NotFound("authorityNode", params.NodeId)
 | 
			
		||||
		return
 | 
			
		||||
 
 | 
			
		||||
@@ -20,13 +20,13 @@ func (this *UpdateAction) RunGet(params struct {
 | 
			
		||||
	NodeId int64
 | 
			
		||||
}) {
 | 
			
		||||
	nodeResp, err := this.RPC().AuthorityNodeRPC().FindEnabledAuthorityNode(this.AdminContext(), &pb.FindEnabledAuthorityNodeRequest{
 | 
			
		||||
		NodeId: params.NodeId,
 | 
			
		||||
		AuthorityNodeId: params.NodeId,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	node := nodeResp.Node
 | 
			
		||||
	node := nodeResp.AuthorityNode
 | 
			
		||||
	if node == nil {
 | 
			
		||||
		this.WriteString("要操作的节点不存在")
 | 
			
		||||
		return
 | 
			
		||||
@@ -56,10 +56,10 @@ func (this *UpdateAction) RunPost(params struct {
 | 
			
		||||
		Require("请输入认证节点名称")
 | 
			
		||||
 | 
			
		||||
	_, err := this.RPC().AuthorityNodeRPC().UpdateAuthorityNode(this.AdminContext(), &pb.UpdateAuthorityNodeRequest{
 | 
			
		||||
		NodeId:      params.NodeId,
 | 
			
		||||
		Name:        params.Name,
 | 
			
		||||
		Description: params.Description,
 | 
			
		||||
		IsOn:        params.IsOn,
 | 
			
		||||
		AuthorityNodeId: params.NodeId,
 | 
			
		||||
		Name:            params.Name,
 | 
			
		||||
		Description:     params.Description,
 | 
			
		||||
		IsOn:            params.IsOn,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user