mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	阶段性提交
This commit is contained in:
		@@ -33,6 +33,7 @@ type Node struct {
 | 
			
		||||
	Id      int64        `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
 | 
			
		||||
	Name    string       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
 | 
			
		||||
	Cluster *NodeCluster `protobuf:"bytes,32,opt,name=cluster,proto3" json:"cluster,omitempty"`
 | 
			
		||||
	Login   *NodeLogin   `protobuf:"bytes,33,opt,name=login,proto3" json:"login,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *Node) Reset() {
 | 
			
		||||
@@ -88,19 +89,30 @@ func (x *Node) GetCluster() *NodeCluster {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *Node) GetLogin() *NodeLogin {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Login
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var File_model_node_proto protoreflect.FileDescriptor
 | 
			
		||||
 | 
			
		||||
var file_model_node_proto_rawDesc = []byte{
 | 
			
		||||
	0x0a, 0x10, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f,
 | 
			
		||||
	0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
 | 
			
		||||
	0x22, 0x55, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
 | 
			
		||||
	0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
 | 
			
		||||
	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x07,
 | 
			
		||||
	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07,
 | 
			
		||||
	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
 | 
			
		||||
	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
	0x1a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67,
 | 
			
		||||
	0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7a, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
 | 
			
		||||
	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
 | 
			
		||||
	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18,
 | 
			
		||||
	0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43,
 | 
			
		||||
	0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12,
 | 
			
		||||
	0x23, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
 | 
			
		||||
	0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x6c,
 | 
			
		||||
	0x6f, 0x67, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
 | 
			
		||||
	0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
@@ -119,14 +131,16 @@ var file_model_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
 | 
			
		||||
var file_model_node_proto_goTypes = []interface{}{
 | 
			
		||||
	(*Node)(nil),        // 0: pb.Node
 | 
			
		||||
	(*NodeCluster)(nil), // 1: pb.NodeCluster
 | 
			
		||||
	(*NodeLogin)(nil),   // 2: pb.NodeLogin
 | 
			
		||||
}
 | 
			
		||||
var file_model_node_proto_depIdxs = []int32{
 | 
			
		||||
	1, // 0: pb.Node.cluster:type_name -> pb.NodeCluster
 | 
			
		||||
	1, // [1:1] is the sub-list for method output_type
 | 
			
		||||
	1, // [1:1] is the sub-list for method input_type
 | 
			
		||||
	1, // [1:1] is the sub-list for extension type_name
 | 
			
		||||
	1, // [1:1] is the sub-list for extension extendee
 | 
			
		||||
	0, // [0:1] is the sub-list for field type_name
 | 
			
		||||
	2, // 1: pb.Node.login:type_name -> pb.NodeLogin
 | 
			
		||||
	2, // [2:2] is the sub-list for method output_type
 | 
			
		||||
	2, // [2:2] is the sub-list for method input_type
 | 
			
		||||
	2, // [2:2] is the sub-list for extension type_name
 | 
			
		||||
	2, // [2:2] is the sub-list for extension extendee
 | 
			
		||||
	0, // [0:2] is the sub-list for field type_name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() { file_model_node_proto_init() }
 | 
			
		||||
@@ -135,6 +149,7 @@ func file_model_node_proto_init() {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	file_model_node_cluster_proto_init()
 | 
			
		||||
	file_model_node_login_proto_init()
 | 
			
		||||
	if !protoimpl.UnsafeEnabled {
 | 
			
		||||
		file_model_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*Node); i {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										174
									
								
								internal/rpc/pb/model_node_login.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										174
									
								
								internal/rpc/pb/model_node_login.pb.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,174 @@
 | 
			
		||||
// Code generated by protoc-gen-go. DO NOT EDIT.
 | 
			
		||||
// versions:
 | 
			
		||||
// 	protoc-gen-go v1.25.0
 | 
			
		||||
// 	protoc        v3.12.3
 | 
			
		||||
// source: model_node_login.proto
 | 
			
		||||
 | 
			
		||||
package pb
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	proto "github.com/golang/protobuf/proto"
 | 
			
		||||
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 | 
			
		||||
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 | 
			
		||||
	reflect "reflect"
 | 
			
		||||
	sync "sync"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	// Verify that this generated code is sufficiently up-to-date.
 | 
			
		||||
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
 | 
			
		||||
	// Verify that runtime/protoimpl is sufficiently up-to-date.
 | 
			
		||||
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// This is a compile-time assertion that a sufficiently up-to-date version
 | 
			
		||||
// of the legacy proto package is being used.
 | 
			
		||||
const _ = proto.ProtoPackageIsVersion4
 | 
			
		||||
 | 
			
		||||
type NodeLogin struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Id     int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
 | 
			
		||||
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
 | 
			
		||||
	Type   string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
 | 
			
		||||
	Params []byte `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) Reset() {
 | 
			
		||||
	*x = NodeLogin{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_model_node_login_proto_msgTypes[0]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*NodeLogin) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_model_node_login_proto_msgTypes[0]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use NodeLogin.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*NodeLogin) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_model_node_login_proto_rawDescGZIP(), []int{0}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) GetId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Id
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) GetName() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Name
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) GetType() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Type
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *NodeLogin) GetParams() []byte {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Params
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var File_model_node_login_proto protoreflect.FileDescriptor
 | 
			
		||||
 | 
			
		||||
var file_model_node_login_proto_rawDesc = []byte{
 | 
			
		||||
	0x0a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67,
 | 
			
		||||
	0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x5b, 0x0a, 0x09,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
 | 
			
		||||
	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
 | 
			
		||||
	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
 | 
			
		||||
	0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
 | 
			
		||||
	0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
 | 
			
		||||
	0x0c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
 | 
			
		||||
	0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	file_model_node_login_proto_rawDescOnce sync.Once
 | 
			
		||||
	file_model_node_login_proto_rawDescData = file_model_node_login_proto_rawDesc
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func file_model_node_login_proto_rawDescGZIP() []byte {
 | 
			
		||||
	file_model_node_login_proto_rawDescOnce.Do(func() {
 | 
			
		||||
		file_model_node_login_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_node_login_proto_rawDescData)
 | 
			
		||||
	})
 | 
			
		||||
	return file_model_node_login_proto_rawDescData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var file_model_node_login_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
 | 
			
		||||
var file_model_node_login_proto_goTypes = []interface{}{
 | 
			
		||||
	(*NodeLogin)(nil), // 0: pb.NodeLogin
 | 
			
		||||
}
 | 
			
		||||
var file_model_node_login_proto_depIdxs = []int32{
 | 
			
		||||
	0, // [0:0] is the sub-list for method output_type
 | 
			
		||||
	0, // [0:0] is the sub-list for method input_type
 | 
			
		||||
	0, // [0:0] is the sub-list for extension type_name
 | 
			
		||||
	0, // [0:0] is the sub-list for extension extendee
 | 
			
		||||
	0, // [0:0] is the sub-list for field type_name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() { file_model_node_login_proto_init() }
 | 
			
		||||
func file_model_node_login_proto_init() {
 | 
			
		||||
	if File_model_node_login_proto != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	if !protoimpl.UnsafeEnabled {
 | 
			
		||||
		file_model_node_login_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*NodeLogin); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	type x struct{}
 | 
			
		||||
	out := protoimpl.TypeBuilder{
 | 
			
		||||
		File: protoimpl.DescBuilder{
 | 
			
		||||
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 | 
			
		||||
			RawDescriptor: file_model_node_login_proto_rawDesc,
 | 
			
		||||
			NumEnums:      0,
 | 
			
		||||
			NumMessages:   1,
 | 
			
		||||
			NumExtensions: 0,
 | 
			
		||||
			NumServices:   0,
 | 
			
		||||
		},
 | 
			
		||||
		GoTypes:           file_model_node_login_proto_goTypes,
 | 
			
		||||
		DependencyIndexes: file_model_node_login_proto_depIdxs,
 | 
			
		||||
		MessageInfos:      file_model_node_login_proto_msgTypes,
 | 
			
		||||
	}.Build()
 | 
			
		||||
	File_model_node_login_proto = out.File
 | 
			
		||||
	file_model_node_login_proto_rawDesc = nil
 | 
			
		||||
	file_model_node_login_proto_goTypes = nil
 | 
			
		||||
	file_model_node_login_proto_depIdxs = nil
 | 
			
		||||
}
 | 
			
		||||
@@ -35,8 +35,9 @@ type CreateNodeRequest struct {
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 | 
			
		||||
	ClusterId int64  `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
 | 
			
		||||
	Name      string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 | 
			
		||||
	ClusterId int64      `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
 | 
			
		||||
	Login     *NodeLogin `protobuf:"bytes,3,opt,name=Login,proto3" json:"Login,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateNodeRequest) Reset() {
 | 
			
		||||
@@ -85,6 +86,13 @@ func (x *CreateNodeRequest) GetClusterId() int64 {
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *CreateNodeRequest) GetLogin() *NodeLogin {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Login
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type CreateNodeResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
@@ -321,49 +329,377 @@ func (x *ListEnabledNodesResponse) GetNodes() []*Node {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 禁用节点
 | 
			
		||||
type DisableNodeRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeRequest) Reset() {
 | 
			
		||||
	*x = DisableNodeRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_proto_msgTypes[6]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*DisableNodeRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_proto_msgTypes[6]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use DisableNodeRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*DisableNodeRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_proto_rawDescGZIP(), []int{6}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeRequest) GetNodeId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.NodeId
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type DisableNodeResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeResponse) Reset() {
 | 
			
		||||
	*x = DisableNodeResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_proto_msgTypes[7]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeResponse) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*DisableNodeResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *DisableNodeResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_proto_msgTypes[7]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use DisableNodeResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*DisableNodeResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_proto_rawDescGZIP(), []int{7}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 修改节点
 | 
			
		||||
type UpdateNodeRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	NodeId    int64      `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
 | 
			
		||||
	Name      string     `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
 | 
			
		||||
	ClusterId int64      `protobuf:"varint,3,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
 | 
			
		||||
	Login     *NodeLogin `protobuf:"bytes,4,opt,name=Login,proto3" json:"Login,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) Reset() {
 | 
			
		||||
	*x = UpdateNodeRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_proto_msgTypes[8]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*UpdateNodeRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_proto_msgTypes[8]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use UpdateNodeRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*UpdateNodeRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_proto_rawDescGZIP(), []int{8}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) GetNodeId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.NodeId
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) GetName() string {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Name
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) GetClusterId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.ClusterId
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeRequest) GetLogin() *NodeLogin {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Login
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type UpdateNodeResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeResponse) Reset() {
 | 
			
		||||
	*x = UpdateNodeResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_proto_msgTypes[9]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeResponse) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*UpdateNodeResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *UpdateNodeResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_proto_msgTypes[9]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use UpdateNodeResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*UpdateNodeResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_proto_rawDescGZIP(), []int{9}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查找节点
 | 
			
		||||
type FindEnabledNodeRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeRequest) Reset() {
 | 
			
		||||
	*x = FindEnabledNodeRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_proto_msgTypes[10]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindEnabledNodeRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_proto_msgTypes[10]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindEnabledNodeRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindEnabledNodeRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_proto_rawDescGZIP(), []int{10}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeRequest) GetNodeId() int64 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.NodeId
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type FindEnabledNodeResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeResponse) Reset() {
 | 
			
		||||
	*x = FindEnabledNodeResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_proto_msgTypes[11]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeResponse) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindEnabledNodeResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_proto_msgTypes[11]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindEnabledNodeResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindEnabledNodeResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_proto_rawDescGZIP(), []int{11}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledNodeResponse) GetNode() *Node {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Node
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var File_service_node_proto protoreflect.FileDescriptor
 | 
			
		||||
 | 
			
		||||
var file_service_node_proto_rawDesc = []byte{
 | 
			
		||||
	0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70,
 | 
			
		||||
	0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
 | 
			
		||||
	0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x11, 0x43, 0x72,
 | 
			
		||||
	0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
 | 
			
		||||
	0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
 | 
			
		||||
	0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
 | 
			
		||||
	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
 | 
			
		||||
	0x64, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
 | 
			
		||||
	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,
 | 
			
		||||
	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22,
 | 
			
		||||
	0x1d, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
 | 
			
		||||
	0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34,
 | 
			
		||||
	0x0a, 0x1c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
 | 
			
		||||
	0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
 | 
			
		||||
	0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
 | 
			
		||||
	0x6f, 0x75, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
 | 
			
		||||
	0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
 | 
			
		||||
	0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
 | 
			
		||||
	0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c,
 | 
			
		||||
	0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
 | 
			
		||||
	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73,
 | 
			
		||||
	0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x32, 0xf4, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
 | 
			
		||||
	0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
 | 
			
		||||
	0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70,
 | 
			
		||||
	0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
 | 
			
		||||
	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
 | 
			
		||||
	0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x70,
 | 
			
		||||
	0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
 | 
			
		||||
	0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
 | 
			
		||||
	0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
 | 
			
		||||
	0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
 | 
			
		||||
	0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
 | 
			
		||||
	0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
 | 
			
		||||
	0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06,
 | 
			
		||||
	0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
	0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6d, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
 | 
			
		||||
	0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
 | 
			
		||||
	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63,
 | 
			
		||||
	0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
 | 
			
		||||
	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
 | 
			
		||||
	0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x2c,
 | 
			
		||||
	0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
 | 
			
		||||
	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01,
 | 
			
		||||
	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x1d, 0x0a, 0x1b,
 | 
			
		||||
	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
 | 
			
		||||
	0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x1c, 0x43,
 | 
			
		||||
	0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63,
 | 
			
		||||
	0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
 | 
			
		||||
	0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
 | 
			
		||||
	0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66,
 | 
			
		||||
	0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01,
 | 
			
		||||
	0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74,
 | 
			
		||||
	0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
 | 
			
		||||
	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20,
 | 
			
		||||
	0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e,
 | 
			
		||||
	0x6f, 0x64, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e,
 | 
			
		||||
	0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64,
 | 
			
		||||
	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x55, 0x70,
 | 
			
		||||
	0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
 | 
			
		||||
	0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
 | 
			
		||||
	0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
 | 
			
		||||
	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63,
 | 
			
		||||
	0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
 | 
			
		||||
	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
 | 
			
		||||
	0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x14,
 | 
			
		||||
	0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
 | 
			
		||||
	0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
 | 
			
		||||
	0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
 | 
			
		||||
	0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
 | 
			
		||||
	0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
 | 
			
		||||
	0x65, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
 | 
			
		||||
	0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32,
 | 
			
		||||
	0xbd, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
 | 
			
		||||
	0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
 | 
			
		||||
	0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14,
 | 
			
		||||
	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
 | 
			
		||||
	0x6f, 0x64, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41,
 | 
			
		||||
	0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
 | 
			
		||||
	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
 | 
			
		||||
	0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
 | 
			
		||||
	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45,
 | 
			
		||||
	0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69,
 | 
			
		||||
	0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
 | 
			
		||||
	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c,
 | 
			
		||||
	0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
 | 
			
		||||
	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
 | 
			
		||||
	0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
 | 
			
		||||
	0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
 | 
			
		||||
	0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
 | 
			
		||||
	0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
 | 
			
		||||
	0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
@@ -378,7 +714,7 @@ func file_service_node_proto_rawDescGZIP() []byte {
 | 
			
		||||
	return file_service_node_proto_rawDescData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var file_service_node_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
 | 
			
		||||
var file_service_node_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
 | 
			
		||||
var file_service_node_proto_goTypes = []interface{}{
 | 
			
		||||
	(*CreateNodeRequest)(nil),            // 0: pb.CreateNodeRequest
 | 
			
		||||
	(*CreateNodeResponse)(nil),           // 1: pb.CreateNodeResponse
 | 
			
		||||
@@ -386,21 +722,37 @@ var file_service_node_proto_goTypes = []interface{}{
 | 
			
		||||
	(*CountAllEnabledNodesResponse)(nil), // 3: pb.CountAllEnabledNodesResponse
 | 
			
		||||
	(*ListEnabledNodesRequest)(nil),      // 4: pb.ListEnabledNodesRequest
 | 
			
		||||
	(*ListEnabledNodesResponse)(nil),     // 5: pb.ListEnabledNodesResponse
 | 
			
		||||
	(*Node)(nil),                         // 6: pb.Node
 | 
			
		||||
	(*DisableNodeRequest)(nil),           // 6: pb.DisableNodeRequest
 | 
			
		||||
	(*DisableNodeResponse)(nil),          // 7: pb.DisableNodeResponse
 | 
			
		||||
	(*UpdateNodeRequest)(nil),            // 8: pb.UpdateNodeRequest
 | 
			
		||||
	(*UpdateNodeResponse)(nil),           // 9: pb.UpdateNodeResponse
 | 
			
		||||
	(*FindEnabledNodeRequest)(nil),       // 10: pb.FindEnabledNodeRequest
 | 
			
		||||
	(*FindEnabledNodeResponse)(nil),      // 11: pb.FindEnabledNodeResponse
 | 
			
		||||
	(*NodeLogin)(nil),                    // 12: pb.NodeLogin
 | 
			
		||||
	(*Node)(nil),                         // 13: pb.Node
 | 
			
		||||
}
 | 
			
		||||
var file_service_node_proto_depIdxs = []int32{
 | 
			
		||||
	6, // 0: pb.ListEnabledNodesResponse.nodes:type_name -> pb.Node
 | 
			
		||||
	0, // 1: pb.NodeService.createNode:input_type -> pb.CreateNodeRequest
 | 
			
		||||
	2, // 2: pb.NodeService.countAllEnabledNodes:input_type -> pb.CountAllEnabledNodesRequest
 | 
			
		||||
	4, // 3: pb.NodeService.listEnabledNodes:input_type -> pb.ListEnabledNodesRequest
 | 
			
		||||
	1, // 4: pb.NodeService.createNode:output_type -> pb.CreateNodeResponse
 | 
			
		||||
	3, // 5: pb.NodeService.countAllEnabledNodes:output_type -> pb.CountAllEnabledNodesResponse
 | 
			
		||||
	5, // 6: pb.NodeService.listEnabledNodes:output_type -> pb.ListEnabledNodesResponse
 | 
			
		||||
	4, // [4:7] is the sub-list for method output_type
 | 
			
		||||
	1, // [1:4] is the sub-list for method input_type
 | 
			
		||||
	1, // [1:1] is the sub-list for extension type_name
 | 
			
		||||
	1, // [1:1] is the sub-list for extension extendee
 | 
			
		||||
	0, // [0:1] is the sub-list for field type_name
 | 
			
		||||
	12, // 0: pb.CreateNodeRequest.Login:type_name -> pb.NodeLogin
 | 
			
		||||
	13, // 1: pb.ListEnabledNodesResponse.nodes:type_name -> pb.Node
 | 
			
		||||
	12, // 2: pb.UpdateNodeRequest.Login:type_name -> pb.NodeLogin
 | 
			
		||||
	13, // 3: pb.FindEnabledNodeResponse.node:type_name -> pb.Node
 | 
			
		||||
	0,  // 4: pb.NodeService.createNode:input_type -> pb.CreateNodeRequest
 | 
			
		||||
	2,  // 5: pb.NodeService.countAllEnabledNodes:input_type -> pb.CountAllEnabledNodesRequest
 | 
			
		||||
	4,  // 6: pb.NodeService.listEnabledNodes:input_type -> pb.ListEnabledNodesRequest
 | 
			
		||||
	6,  // 7: pb.NodeService.disableNode:input_type -> pb.DisableNodeRequest
 | 
			
		||||
	8,  // 8: pb.NodeService.updateNode:input_type -> pb.UpdateNodeRequest
 | 
			
		||||
	10, // 9: pb.NodeService.findEnabledNode:input_type -> pb.FindEnabledNodeRequest
 | 
			
		||||
	1,  // 10: pb.NodeService.createNode:output_type -> pb.CreateNodeResponse
 | 
			
		||||
	3,  // 11: pb.NodeService.countAllEnabledNodes:output_type -> pb.CountAllEnabledNodesResponse
 | 
			
		||||
	5,  // 12: pb.NodeService.listEnabledNodes:output_type -> pb.ListEnabledNodesResponse
 | 
			
		||||
	7,  // 13: pb.NodeService.disableNode:output_type -> pb.DisableNodeResponse
 | 
			
		||||
	9,  // 14: pb.NodeService.updateNode:output_type -> pb.UpdateNodeResponse
 | 
			
		||||
	11, // 15: pb.NodeService.findEnabledNode:output_type -> pb.FindEnabledNodeResponse
 | 
			
		||||
	10, // [10:16] is the sub-list for method output_type
 | 
			
		||||
	4,  // [4:10] is the sub-list for method input_type
 | 
			
		||||
	4,  // [4:4] is the sub-list for extension type_name
 | 
			
		||||
	4,  // [4:4] is the sub-list for extension extendee
 | 
			
		||||
	0,  // [0:4] is the sub-list for field type_name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() { file_service_node_proto_init() }
 | 
			
		||||
@@ -409,6 +761,7 @@ func file_service_node_proto_init() {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	file_model_node_proto_init()
 | 
			
		||||
	file_model_node_login_proto_init()
 | 
			
		||||
	if !protoimpl.UnsafeEnabled {
 | 
			
		||||
		file_service_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*CreateNodeRequest); i {
 | 
			
		||||
@@ -482,6 +835,78 @@ func file_service_node_proto_init() {
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*DisableNodeRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*DisableNodeResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*UpdateNodeRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*UpdateNodeResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindEnabledNodeRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindEnabledNodeResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	type x struct{}
 | 
			
		||||
	out := protoimpl.TypeBuilder{
 | 
			
		||||
@@ -489,7 +914,7 @@ func file_service_node_proto_init() {
 | 
			
		||||
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 | 
			
		||||
			RawDescriptor: file_service_node_proto_rawDesc,
 | 
			
		||||
			NumEnums:      0,
 | 
			
		||||
			NumMessages:   6,
 | 
			
		||||
			NumMessages:   12,
 | 
			
		||||
			NumExtensions: 0,
 | 
			
		||||
			NumServices:   1,
 | 
			
		||||
		},
 | 
			
		||||
@@ -521,6 +946,12 @@ type NodeServiceClient interface {
 | 
			
		||||
	CountAllEnabledNodes(ctx context.Context, in *CountAllEnabledNodesRequest, opts ...grpc.CallOption) (*CountAllEnabledNodesResponse, error)
 | 
			
		||||
	// 列出单页节点
 | 
			
		||||
	ListEnabledNodes(ctx context.Context, in *ListEnabledNodesRequest, opts ...grpc.CallOption) (*ListEnabledNodesResponse, error)
 | 
			
		||||
	// 禁用节点
 | 
			
		||||
	DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error)
 | 
			
		||||
	// 修改节点
 | 
			
		||||
	UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error)
 | 
			
		||||
	// 查看单个节点
 | 
			
		||||
	FindEnabledNode(ctx context.Context, in *FindEnabledNodeRequest, opts ...grpc.CallOption) (*FindEnabledNodeResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type nodeServiceClient struct {
 | 
			
		||||
@@ -558,6 +989,33 @@ func (c *nodeServiceClient) ListEnabledNodes(ctx context.Context, in *ListEnable
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *nodeServiceClient) DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error) {
 | 
			
		||||
	out := new(DisableNodeResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.NodeService/disableNode", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *nodeServiceClient) UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error) {
 | 
			
		||||
	out := new(UpdateNodeResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.NodeService/updateNode", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *nodeServiceClient) FindEnabledNode(ctx context.Context, in *FindEnabledNodeRequest, opts ...grpc.CallOption) (*FindEnabledNodeResponse, error) {
 | 
			
		||||
	out := new(FindEnabledNodeResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.NodeService/findEnabledNode", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NodeServiceServer is the server API for NodeService service.
 | 
			
		||||
type NodeServiceServer interface {
 | 
			
		||||
	// 创建节点
 | 
			
		||||
@@ -566,6 +1024,12 @@ type NodeServiceServer interface {
 | 
			
		||||
	CountAllEnabledNodes(context.Context, *CountAllEnabledNodesRequest) (*CountAllEnabledNodesResponse, error)
 | 
			
		||||
	// 列出单页节点
 | 
			
		||||
	ListEnabledNodes(context.Context, *ListEnabledNodesRequest) (*ListEnabledNodesResponse, error)
 | 
			
		||||
	// 禁用节点
 | 
			
		||||
	DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error)
 | 
			
		||||
	// 修改节点
 | 
			
		||||
	UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error)
 | 
			
		||||
	// 查看单个节点
 | 
			
		||||
	FindEnabledNode(context.Context, *FindEnabledNodeRequest) (*FindEnabledNodeResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnimplementedNodeServiceServer can be embedded to have forward compatible implementations.
 | 
			
		||||
@@ -581,6 +1045,15 @@ func (*UnimplementedNodeServiceServer) CountAllEnabledNodes(context.Context, *Co
 | 
			
		||||
func (*UnimplementedNodeServiceServer) ListEnabledNodes(context.Context, *ListEnabledNodesRequest) (*ListEnabledNodesResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNodes not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedNodeServiceServer) DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method DisableNode not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedNodeServiceServer) UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method UpdateNode not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedNodeServiceServer) FindEnabledNode(context.Context, *FindEnabledNodeRequest) (*FindEnabledNodeResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method FindEnabledNode not implemented")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterNodeServiceServer(s *grpc.Server, srv NodeServiceServer) {
 | 
			
		||||
	s.RegisterService(&_NodeService_serviceDesc, srv)
 | 
			
		||||
@@ -640,6 +1113,60 @@ func _NodeService_ListEnabledNodes_Handler(srv interface{}, ctx context.Context,
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _NodeService_DisableNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(DisableNodeRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(NodeServiceServer).DisableNode(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.NodeService/DisableNode",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(NodeServiceServer).DisableNode(ctx, req.(*DisableNodeRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _NodeService_UpdateNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(UpdateNodeRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(NodeServiceServer).UpdateNode(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.NodeService/UpdateNode",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(NodeServiceServer).UpdateNode(ctx, req.(*UpdateNodeRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _NodeService_FindEnabledNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(FindEnabledNodeRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(NodeServiceServer).FindEnabledNode(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.NodeService/FindEnabledNode",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(NodeServiceServer).FindEnabledNode(ctx, req.(*FindEnabledNodeRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var _NodeService_serviceDesc = grpc.ServiceDesc{
 | 
			
		||||
	ServiceName: "pb.NodeService",
 | 
			
		||||
	HandlerType: (*NodeServiceServer)(nil),
 | 
			
		||||
@@ -656,6 +1183,18 @@ var _NodeService_serviceDesc = grpc.ServiceDesc{
 | 
			
		||||
			MethodName: "listEnabledNodes",
 | 
			
		||||
			Handler:    _NodeService_ListEnabledNodes_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "disableNode",
 | 
			
		||||
			Handler:    _NodeService_DisableNode_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "updateNode",
 | 
			
		||||
			Handler:    _NodeService_UpdateNode_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "findEnabledNode",
 | 
			
		||||
			Handler:    _NodeService_FindEnabledNode_Handler,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	Streams:  []grpc.StreamDesc{},
 | 
			
		||||
	Metadata: "service_node.proto",
 | 
			
		||||
 
 | 
			
		||||
@@ -486,7 +486,7 @@ func (x *CountAllEnabledNodeGrantsResponse) GetCount() int64 {
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 列出所有认证
 | 
			
		||||
// 列出单页认证
 | 
			
		||||
type ListEnabledNodeGrantsRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
@@ -589,6 +589,92 @@ func (x *ListEnabledNodeGrantsResponse) GetGrants() []*NodeGrant {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取所有认证信息
 | 
			
		||||
type FindAllEnabledNodeGrantsRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsRequest) Reset() {
 | 
			
		||||
	*x = FindAllEnabledNodeGrantsRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_grant_proto_msgTypes[10]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindAllEnabledNodeGrantsRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_grant_proto_msgTypes[10]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindAllEnabledNodeGrantsRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindAllEnabledNodeGrantsRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_grant_proto_rawDescGZIP(), []int{10}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type FindAllEnabledNodeGrantsResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	Grants []*NodeGrant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsResponse) Reset() {
 | 
			
		||||
	*x = FindAllEnabledNodeGrantsResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_grant_proto_msgTypes[11]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsResponse) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindAllEnabledNodeGrantsResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_grant_proto_msgTypes[11]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindAllEnabledNodeGrantsResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindAllEnabledNodeGrantsResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_grant_proto_rawDescGZIP(), []int{11}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAllEnabledNodeGrantsResponse) GetGrants() []*NodeGrant {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.Grants
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取认证信息
 | 
			
		||||
type FindEnabledGrantRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
@@ -601,7 +687,7 @@ type FindEnabledGrantRequest struct {
 | 
			
		||||
func (x *FindEnabledGrantRequest) Reset() {
 | 
			
		||||
	*x = FindEnabledGrantRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_grant_proto_msgTypes[10]
 | 
			
		||||
		mi := &file_service_node_grant_proto_msgTypes[12]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
@@ -614,7 +700,7 @@ func (x *FindEnabledGrantRequest) String() string {
 | 
			
		||||
func (*FindEnabledGrantRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledGrantRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_grant_proto_msgTypes[10]
 | 
			
		||||
	mi := &file_service_node_grant_proto_msgTypes[12]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
@@ -627,7 +713,7 @@ func (x *FindEnabledGrantRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindEnabledGrantRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindEnabledGrantRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_grant_proto_rawDescGZIP(), []int{10}
 | 
			
		||||
	return file_service_node_grant_proto_rawDescGZIP(), []int{12}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledGrantRequest) GetGrantId() int64 {
 | 
			
		||||
@@ -648,7 +734,7 @@ type FindEnabledGrantResponse struct {
 | 
			
		||||
func (x *FindEnabledGrantResponse) Reset() {
 | 
			
		||||
	*x = FindEnabledGrantResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_node_grant_proto_msgTypes[11]
 | 
			
		||||
		mi := &file_service_node_grant_proto_msgTypes[13]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
@@ -661,7 +747,7 @@ func (x *FindEnabledGrantResponse) String() string {
 | 
			
		||||
func (*FindEnabledGrantResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledGrantResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_node_grant_proto_msgTypes[11]
 | 
			
		||||
	mi := &file_service_node_grant_proto_msgTypes[13]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
@@ -674,7 +760,7 @@ func (x *FindEnabledGrantResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindEnabledGrantResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindEnabledGrantResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_node_grant_proto_rawDescGZIP(), []int{11}
 | 
			
		||||
	return file_service_node_grant_proto_rawDescGZIP(), []int{13}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindEnabledGrantResponse) GetGrant() *NodeGrant {
 | 
			
		||||
@@ -744,48 +830,62 @@ var file_service_node_grant_proto_rawDesc = []byte{
 | 
			
		||||
	0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
 | 
			
		||||
	0x25, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
 | 
			
		||||
	0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x06,
 | 
			
		||||
	0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
 | 
			
		||||
	0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
 | 
			
		||||
	0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
 | 
			
		||||
	0x28, 0x03, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x18, 0x46,
 | 
			
		||||
	0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
 | 
			
		||||
	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74,
 | 
			
		||||
	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x32, 0x90, 0x04, 0x0a,
 | 
			
		||||
	0x10, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
 | 
			
		||||
	0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47,
 | 
			
		||||
	0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
 | 
			
		||||
	0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a,
 | 
			
		||||
	0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74,
 | 
			
		||||
	0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70,
 | 
			
		||||
	0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
 | 
			
		||||
	0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x69, 0x73,
 | 
			
		||||
	0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
 | 
			
		||||
	0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74,
 | 
			
		||||
	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e,
 | 
			
		||||
	0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47,
 | 
			
		||||
	0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
 | 
			
		||||
	0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
 | 
			
		||||
	0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
 | 
			
		||||
	0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
 | 
			
		||||
	0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
 | 
			
		||||
	0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
 | 
			
		||||
	0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x20, 0x46, 0x69, 0x6e,
 | 
			
		||||
	0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47,
 | 
			
		||||
	0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a,
 | 
			
		||||
	0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x67, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
 | 
			
		||||
	0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
 | 
			
		||||
	0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x18, 0x46, 0x69, 0x6e,
 | 
			
		||||
	0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73,
 | 
			
		||||
	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01,
 | 
			
		||||
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x32, 0xf7, 0x04, 0x0a, 0x10, 0x4e,
 | 
			
		||||
	0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
 | 
			
		||||
	0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61,
 | 
			
		||||
	0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
 | 
			
		||||
	0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75,
 | 
			
		||||
	0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a,
 | 
			
		||||
	0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e,
 | 
			
		||||
	0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
 | 
			
		||||
	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
 | 
			
		||||
	0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69,
 | 
			
		||||
	0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65,
 | 
			
		||||
	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41,
 | 
			
		||||
	0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61,
 | 
			
		||||
	0x6e, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
 | 
			
		||||
	0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
 | 
			
		||||
	0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43,
 | 
			
		||||
	0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
 | 
			
		||||
	0x12, 0x4d, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47,
 | 
			
		||||
	0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
 | 
			
		||||
	0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
 | 
			
		||||
	0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
 | 
			
		||||
	0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
 | 
			
		||||
	0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
	0x12, 0x5c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
 | 
			
		||||
	0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
 | 
			
		||||
	0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
 | 
			
		||||
	0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65,
 | 
			
		||||
	0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65,
 | 
			
		||||
	0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
 | 
			
		||||
	0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e,
 | 
			
		||||
	0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
 | 
			
		||||
	0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
 | 
			
		||||
	0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
 | 
			
		||||
	0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
 | 
			
		||||
	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
 | 
			
		||||
	0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46,
 | 
			
		||||
	0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
 | 
			
		||||
	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
 | 
			
		||||
	0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
 | 
			
		||||
	0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
 | 
			
		||||
	0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
@@ -800,7 +900,7 @@ func file_service_node_grant_proto_rawDescGZIP() []byte {
 | 
			
		||||
	return file_service_node_grant_proto_rawDescData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var file_service_node_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
 | 
			
		||||
var file_service_node_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
 | 
			
		||||
var file_service_node_grant_proto_goTypes = []interface{}{
 | 
			
		||||
	(*CreateNodeGrantRequest)(nil),            // 0: pb.CreateNodeGrantRequest
 | 
			
		||||
	(*CreateNodeGrantResponse)(nil),           // 1: pb.CreateNodeGrantResponse
 | 
			
		||||
@@ -812,30 +912,35 @@ var file_service_node_grant_proto_goTypes = []interface{}{
 | 
			
		||||
	(*CountAllEnabledNodeGrantsResponse)(nil), // 7: pb.CountAllEnabledNodeGrantsResponse
 | 
			
		||||
	(*ListEnabledNodeGrantsRequest)(nil),      // 8: pb.ListEnabledNodeGrantsRequest
 | 
			
		||||
	(*ListEnabledNodeGrantsResponse)(nil),     // 9: pb.ListEnabledNodeGrantsResponse
 | 
			
		||||
	(*FindEnabledGrantRequest)(nil),           // 10: pb.FindEnabledGrantRequest
 | 
			
		||||
	(*FindEnabledGrantResponse)(nil),          // 11: pb.FindEnabledGrantResponse
 | 
			
		||||
	(*NodeGrant)(nil),                         // 12: pb.NodeGrant
 | 
			
		||||
	(*FindAllEnabledNodeGrantsRequest)(nil),   // 10: pb.FindAllEnabledNodeGrantsRequest
 | 
			
		||||
	(*FindAllEnabledNodeGrantsResponse)(nil),  // 11: pb.FindAllEnabledNodeGrantsResponse
 | 
			
		||||
	(*FindEnabledGrantRequest)(nil),           // 12: pb.FindEnabledGrantRequest
 | 
			
		||||
	(*FindEnabledGrantResponse)(nil),          // 13: pb.FindEnabledGrantResponse
 | 
			
		||||
	(*NodeGrant)(nil),                         // 14: pb.NodeGrant
 | 
			
		||||
}
 | 
			
		||||
var file_service_node_grant_proto_depIdxs = []int32{
 | 
			
		||||
	12, // 0: pb.ListEnabledNodeGrantsResponse.grants:type_name -> pb.NodeGrant
 | 
			
		||||
	12, // 1: pb.FindEnabledGrantResponse.grant:type_name -> pb.NodeGrant
 | 
			
		||||
	0,  // 2: pb.NodeGrantService.createNodeGrant:input_type -> pb.CreateNodeGrantRequest
 | 
			
		||||
	2,  // 3: pb.NodeGrantService.updateNodeGrant:input_type -> pb.UpdateNodeGrantRequest
 | 
			
		||||
	4,  // 4: pb.NodeGrantService.disableNodeGrant:input_type -> pb.DisableNodeGrantRequest
 | 
			
		||||
	6,  // 5: pb.NodeGrantService.countAllEnabledNodeGrants:input_type -> pb.CountAllEnabledNodeGrantsRequest
 | 
			
		||||
	8,  // 6: pb.NodeGrantService.ListEnabledNodeGrants:input_type -> pb.ListEnabledNodeGrantsRequest
 | 
			
		||||
	10, // 7: pb.NodeGrantService.FindEnabledGrant:input_type -> pb.FindEnabledGrantRequest
 | 
			
		||||
	1,  // 8: pb.NodeGrantService.createNodeGrant:output_type -> pb.CreateNodeGrantResponse
 | 
			
		||||
	3,  // 9: pb.NodeGrantService.updateNodeGrant:output_type -> pb.UpdateNodeGrantResponse
 | 
			
		||||
	5,  // 10: pb.NodeGrantService.disableNodeGrant:output_type -> pb.DisableNodeGrantResponse
 | 
			
		||||
	7,  // 11: pb.NodeGrantService.countAllEnabledNodeGrants:output_type -> pb.CountAllEnabledNodeGrantsResponse
 | 
			
		||||
	9,  // 12: pb.NodeGrantService.ListEnabledNodeGrants:output_type -> pb.ListEnabledNodeGrantsResponse
 | 
			
		||||
	11, // 13: pb.NodeGrantService.FindEnabledGrant:output_type -> pb.FindEnabledGrantResponse
 | 
			
		||||
	8,  // [8:14] is the sub-list for method output_type
 | 
			
		||||
	2,  // [2:8] is the sub-list for method input_type
 | 
			
		||||
	2,  // [2:2] is the sub-list for extension type_name
 | 
			
		||||
	2,  // [2:2] is the sub-list for extension extendee
 | 
			
		||||
	0,  // [0:2] is the sub-list for field type_name
 | 
			
		||||
	14, // 0: pb.ListEnabledNodeGrantsResponse.grants:type_name -> pb.NodeGrant
 | 
			
		||||
	14, // 1: pb.FindAllEnabledNodeGrantsResponse.grants:type_name -> pb.NodeGrant
 | 
			
		||||
	14, // 2: pb.FindEnabledGrantResponse.grant:type_name -> pb.NodeGrant
 | 
			
		||||
	0,  // 3: pb.NodeGrantService.createNodeGrant:input_type -> pb.CreateNodeGrantRequest
 | 
			
		||||
	2,  // 4: pb.NodeGrantService.updateNodeGrant:input_type -> pb.UpdateNodeGrantRequest
 | 
			
		||||
	4,  // 5: pb.NodeGrantService.disableNodeGrant:input_type -> pb.DisableNodeGrantRequest
 | 
			
		||||
	6,  // 6: pb.NodeGrantService.countAllEnabledNodeGrants:input_type -> pb.CountAllEnabledNodeGrantsRequest
 | 
			
		||||
	8,  // 7: pb.NodeGrantService.ListEnabledNodeGrants:input_type -> pb.ListEnabledNodeGrantsRequest
 | 
			
		||||
	10, // 8: pb.NodeGrantService.FindAllEnabledNodeGrants:input_type -> pb.FindAllEnabledNodeGrantsRequest
 | 
			
		||||
	12, // 9: pb.NodeGrantService.FindEnabledGrant:input_type -> pb.FindEnabledGrantRequest
 | 
			
		||||
	1,  // 10: pb.NodeGrantService.createNodeGrant:output_type -> pb.CreateNodeGrantResponse
 | 
			
		||||
	3,  // 11: pb.NodeGrantService.updateNodeGrant:output_type -> pb.UpdateNodeGrantResponse
 | 
			
		||||
	5,  // 12: pb.NodeGrantService.disableNodeGrant:output_type -> pb.DisableNodeGrantResponse
 | 
			
		||||
	7,  // 13: pb.NodeGrantService.countAllEnabledNodeGrants:output_type -> pb.CountAllEnabledNodeGrantsResponse
 | 
			
		||||
	9,  // 14: pb.NodeGrantService.ListEnabledNodeGrants:output_type -> pb.ListEnabledNodeGrantsResponse
 | 
			
		||||
	11, // 15: pb.NodeGrantService.FindAllEnabledNodeGrants:output_type -> pb.FindAllEnabledNodeGrantsResponse
 | 
			
		||||
	13, // 16: pb.NodeGrantService.FindEnabledGrant:output_type -> pb.FindEnabledGrantResponse
 | 
			
		||||
	10, // [10:17] is the sub-list for method output_type
 | 
			
		||||
	3,  // [3:10] is the sub-list for method input_type
 | 
			
		||||
	3,  // [3:3] is the sub-list for extension type_name
 | 
			
		||||
	3,  // [3:3] is the sub-list for extension extendee
 | 
			
		||||
	0,  // [0:3] is the sub-list for field type_name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() { file_service_node_grant_proto_init() }
 | 
			
		||||
@@ -966,7 +1071,7 @@ func file_service_node_grant_proto_init() {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_grant_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindEnabledGrantRequest); i {
 | 
			
		||||
			switch v := v.(*FindAllEnabledNodeGrantsRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
@@ -978,6 +1083,30 @@ func file_service_node_grant_proto_init() {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_grant_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindAllEnabledNodeGrantsResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_grant_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindEnabledGrantRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_node_grant_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindEnabledGrantResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
@@ -996,7 +1125,7 @@ func file_service_node_grant_proto_init() {
 | 
			
		||||
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 | 
			
		||||
			RawDescriptor: file_service_node_grant_proto_rawDesc,
 | 
			
		||||
			NumEnums:      0,
 | 
			
		||||
			NumMessages:   12,
 | 
			
		||||
			NumMessages:   14,
 | 
			
		||||
			NumExtensions: 0,
 | 
			
		||||
			NumServices:   1,
 | 
			
		||||
		},
 | 
			
		||||
@@ -1030,9 +1159,11 @@ type NodeGrantServiceClient interface {
 | 
			
		||||
	DisableNodeGrant(ctx context.Context, in *DisableNodeGrantRequest, opts ...grpc.CallOption) (*DisableNodeGrantResponse, error)
 | 
			
		||||
	// 计算认证的数量
 | 
			
		||||
	CountAllEnabledNodeGrants(ctx context.Context, in *CountAllEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*CountAllEnabledNodeGrantsResponse, error)
 | 
			
		||||
	// 列出所有认证
 | 
			
		||||
	// 列出单页认证
 | 
			
		||||
	ListEnabledNodeGrants(ctx context.Context, in *ListEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*ListEnabledNodeGrantsResponse, error)
 | 
			
		||||
	// 获取认证信息
 | 
			
		||||
	// 列出所有认证
 | 
			
		||||
	FindAllEnabledNodeGrants(ctx context.Context, in *FindAllEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodeGrantsResponse, error)
 | 
			
		||||
	// 获取单个认证信息
 | 
			
		||||
	FindEnabledGrant(ctx context.Context, in *FindEnabledGrantRequest, opts ...grpc.CallOption) (*FindEnabledGrantResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1089,6 +1220,15 @@ func (c *nodeGrantServiceClient) ListEnabledNodeGrants(ctx context.Context, in *
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *nodeGrantServiceClient) FindAllEnabledNodeGrants(ctx context.Context, in *FindAllEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodeGrantsResponse, error) {
 | 
			
		||||
	out := new(FindAllEnabledNodeGrantsResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.NodeGrantService/FindAllEnabledNodeGrants", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *nodeGrantServiceClient) FindEnabledGrant(ctx context.Context, in *FindEnabledGrantRequest, opts ...grpc.CallOption) (*FindEnabledGrantResponse, error) {
 | 
			
		||||
	out := new(FindEnabledGrantResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.NodeGrantService/FindEnabledGrant", in, out, opts...)
 | 
			
		||||
@@ -1108,9 +1248,11 @@ type NodeGrantServiceServer interface {
 | 
			
		||||
	DisableNodeGrant(context.Context, *DisableNodeGrantRequest) (*DisableNodeGrantResponse, error)
 | 
			
		||||
	// 计算认证的数量
 | 
			
		||||
	CountAllEnabledNodeGrants(context.Context, *CountAllEnabledNodeGrantsRequest) (*CountAllEnabledNodeGrantsResponse, error)
 | 
			
		||||
	// 列出所有认证
 | 
			
		||||
	// 列出单页认证
 | 
			
		||||
	ListEnabledNodeGrants(context.Context, *ListEnabledNodeGrantsRequest) (*ListEnabledNodeGrantsResponse, error)
 | 
			
		||||
	// 获取认证信息
 | 
			
		||||
	// 列出所有认证
 | 
			
		||||
	FindAllEnabledNodeGrants(context.Context, *FindAllEnabledNodeGrantsRequest) (*FindAllEnabledNodeGrantsResponse, error)
 | 
			
		||||
	// 获取单个认证信息
 | 
			
		||||
	FindEnabledGrant(context.Context, *FindEnabledGrantRequest) (*FindEnabledGrantResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1133,6 +1275,9 @@ func (*UnimplementedNodeGrantServiceServer) CountAllEnabledNodeGrants(context.Co
 | 
			
		||||
func (*UnimplementedNodeGrantServiceServer) ListEnabledNodeGrants(context.Context, *ListEnabledNodeGrantsRequest) (*ListEnabledNodeGrantsResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNodeGrants not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedNodeGrantServiceServer) FindAllEnabledNodeGrants(context.Context, *FindAllEnabledNodeGrantsRequest) (*FindAllEnabledNodeGrantsResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNodeGrants not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedNodeGrantServiceServer) FindEnabledGrant(context.Context, *FindEnabledGrantRequest) (*FindEnabledGrantResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method FindEnabledGrant not implemented")
 | 
			
		||||
}
 | 
			
		||||
@@ -1231,6 +1376,24 @@ func _NodeGrantService_ListEnabledNodeGrants_Handler(srv interface{}, ctx contex
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _NodeGrantService_FindAllEnabledNodeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(FindAllEnabledNodeGrantsRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(NodeGrantServiceServer).FindAllEnabledNodeGrants(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.NodeGrantService/FindAllEnabledNodeGrants",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(NodeGrantServiceServer).FindAllEnabledNodeGrants(ctx, req.(*FindAllEnabledNodeGrantsRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _NodeGrantService_FindEnabledGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(FindEnabledGrantRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
@@ -1273,6 +1436,10 @@ var _NodeGrantService_serviceDesc = grpc.ServiceDesc{
 | 
			
		||||
			MethodName: "ListEnabledNodeGrants",
 | 
			
		||||
			Handler:    _NodeGrantService_ListEnabledNodeGrants_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "FindAllEnabledNodeGrants",
 | 
			
		||||
			Handler:    _NodeGrantService_FindAllEnabledNodeGrants_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "FindEnabledGrant",
 | 
			
		||||
			Handler:    _NodeGrantService_FindEnabledGrant_Handler,
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@ option go_package = "./pb";
 | 
			
		||||
 | 
			
		||||
package pb;
 | 
			
		||||
import "model_node.proto";
 | 
			
		||||
import "model_node_login.proto";
 | 
			
		||||
 | 
			
		||||
service NodeService {
 | 
			
		||||
	// 创建节点
 | 
			
		||||
@@ -13,12 +14,22 @@ service NodeService {
 | 
			
		||||
 | 
			
		||||
	// 列出单页节点
 | 
			
		||||
	rpc listEnabledNodes (ListEnabledNodesRequest) returns (ListEnabledNodesResponse);
 | 
			
		||||
 | 
			
		||||
	// 禁用节点
 | 
			
		||||
	rpc disableNode (DisableNodeRequest) returns (DisableNodeResponse);
 | 
			
		||||
 | 
			
		||||
	// 修改节点
 | 
			
		||||
	rpc updateNode(UpdateNodeRequest) returns (UpdateNodeResponse);
 | 
			
		||||
 | 
			
		||||
	// 查看单个节点
 | 
			
		||||
	rpc findEnabledNode(FindEnabledNodeRequest) returns (FindEnabledNodeResponse);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 创建节点
 | 
			
		||||
message CreateNodeRequest {
 | 
			
		||||
	string name = 1;
 | 
			
		||||
	int64 clusterId = 2;
 | 
			
		||||
	NodeLogin Login = 3;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message CreateNodeResponse {
 | 
			
		||||
@@ -43,3 +54,33 @@ message ListEnabledNodesRequest {
 | 
			
		||||
message ListEnabledNodesResponse {
 | 
			
		||||
	repeated Node nodes = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 禁用节点
 | 
			
		||||
message DisableNodeRequest {
 | 
			
		||||
	int64 nodeId = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message DisableNodeResponse {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 修改节点
 | 
			
		||||
message UpdateNodeRequest {
 | 
			
		||||
	int64 nodeId = 1;
 | 
			
		||||
	string name = 2;
 | 
			
		||||
	int64 clusterId = 3;
 | 
			
		||||
	NodeLogin Login = 4;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message UpdateNodeResponse {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查找节点
 | 
			
		||||
message FindEnabledNodeRequest {
 | 
			
		||||
	int64 nodeId = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message FindEnabledNodeResponse {
 | 
			
		||||
	Node node = 1;
 | 
			
		||||
}
 | 
			
		||||
@@ -17,10 +17,13 @@ service NodeGrantService {
 | 
			
		||||
	// 计算认证的数量
 | 
			
		||||
	rpc countAllEnabledNodeGrants (CountAllEnabledNodeGrantsRequest) returns (CountAllEnabledNodeGrantsResponse);
 | 
			
		||||
 | 
			
		||||
	// 列出所有认证
 | 
			
		||||
	// 列出单页认证
 | 
			
		||||
	rpc ListEnabledNodeGrants (ListEnabledNodeGrantsRequest) returns (ListEnabledNodeGrantsResponse);
 | 
			
		||||
 | 
			
		||||
	// 获取认证信息
 | 
			
		||||
	// 列出所有认证
 | 
			
		||||
	rpc FindAllEnabledNodeGrants(FindAllEnabledNodeGrantsRequest) returns (FindAllEnabledNodeGrantsResponse);
 | 
			
		||||
 | 
			
		||||
	// 获取单个认证信息
 | 
			
		||||
	rpc FindEnabledGrant(FindEnabledGrantRequest) returns (FindEnabledGrantResponse);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -73,7 +76,7 @@ message CountAllEnabledNodeGrantsResponse {
 | 
			
		||||
	int64 count = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 列出所有认证
 | 
			
		||||
// 列出单页认证
 | 
			
		||||
message ListEnabledNodeGrantsRequest {
 | 
			
		||||
	int64 offset = 1;
 | 
			
		||||
	int64 size = 2;
 | 
			
		||||
@@ -83,6 +86,15 @@ message ListEnabledNodeGrantsResponse {
 | 
			
		||||
	repeated NodeGrant grants = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取所有认证信息
 | 
			
		||||
message FindAllEnabledNodeGrantsRequest {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message FindAllEnabledNodeGrantsResponse {
 | 
			
		||||
	repeated NodeGrant grants = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取认证信息
 | 
			
		||||
message FindEnabledGrantRequest {
 | 
			
		||||
	int64 grantId = 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ func TestRPCClient_NodeRPC(t *testing.T) {
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
	resp, err := rpc.AdminRPC().Login(rpc.Context(0), &pb.AdminLoginRequest{
 | 
			
		||||
	resp, err := rpc.AdminRPC().LoginAdmin(rpc.Context(0), &pb.LoginAdminRequest{
 | 
			
		||||
		Username: "admin",
 | 
			
		||||
		Password: stringutil.Md5("123456"),
 | 
			
		||||
	})
 | 
			
		||||
 
 | 
			
		||||
@@ -40,6 +40,9 @@ func (this *CreateAction) RunGet(params struct{}) {
 | 
			
		||||
func (this *CreateAction) RunPost(params struct {
 | 
			
		||||
	Name      string
 | 
			
		||||
	ClusterId int64
 | 
			
		||||
	GrantId   int64
 | 
			
		||||
	SshHost   string
 | 
			
		||||
	SshPort   int
 | 
			
		||||
 | 
			
		||||
	Must *actions.Must
 | 
			
		||||
}) {
 | 
			
		||||
@@ -52,12 +55,23 @@ func (this *CreateAction) RunPost(params struct {
 | 
			
		||||
		this.Fail("请选择所在集群")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// TODO 检查SSH授权
 | 
			
		||||
	// TODO 检查登录授权
 | 
			
		||||
	loginInfo := &pb.NodeLogin{
 | 
			
		||||
		Id:   0,
 | 
			
		||||
		Name: "SSH",
 | 
			
		||||
		Type: "ssh",
 | 
			
		||||
		Params: maps.Map{
 | 
			
		||||
			"grantId": params.GrantId,
 | 
			
		||||
			"host":    params.SshHost,
 | 
			
		||||
			"port":    params.SshPort,
 | 
			
		||||
		}.AsJSON(),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 保存
 | 
			
		||||
	_, err := this.RPC().NodeRPC().CreateNode(this.AdminContext(), &pb.CreateNodeRequest{
 | 
			
		||||
		Name:      params.Name,
 | 
			
		||||
		ClusterId: params.ClusterId,
 | 
			
		||||
		Login:     loginInfo,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								internal/web/actions/default/nodes/delete.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								internal/web/actions/default/nodes/delete.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
package nodes
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type DeleteAction struct {
 | 
			
		||||
	actionutils.ParentAction
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *DeleteAction) RunPost(params struct {
 | 
			
		||||
	NodeId int64
 | 
			
		||||
}) {
 | 
			
		||||
	_, err := this.RPC().NodeRPC().DisableNode(this.AdminContext(), &pb.DisableNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Success()
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										74
									
								
								internal/web/actions/default/nodes/grants/createPopup.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								internal/web/actions/default/nodes/grants/createPopup.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,74 @@
 | 
			
		||||
package grants
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
 | 
			
		||||
	"github.com/iwind/TeaGo/actions"
 | 
			
		||||
	"github.com/iwind/TeaGo/maps"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type CreatePopupAction struct {
 | 
			
		||||
	actionutils.ParentAction
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *CreatePopupAction) Init() {
 | 
			
		||||
	this.Nav("", "", "")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *CreatePopupAction) RunGet(params struct{}) {
 | 
			
		||||
	this.Data["methods"] = grantutils.AllGrantMethods()
 | 
			
		||||
 | 
			
		||||
	this.Show()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *CreatePopupAction) RunPost(params struct {
 | 
			
		||||
	Name        string
 | 
			
		||||
	Method      string
 | 
			
		||||
	Username    string
 | 
			
		||||
	Password    string
 | 
			
		||||
	PrivateKey  string
 | 
			
		||||
	Description string
 | 
			
		||||
 | 
			
		||||
	Must *actions.Must
 | 
			
		||||
}) {
 | 
			
		||||
	params.Must.
 | 
			
		||||
		Field("name", params.Name).
 | 
			
		||||
		Require("请输入名称")
 | 
			
		||||
 | 
			
		||||
	switch params.Method {
 | 
			
		||||
	case "user":
 | 
			
		||||
		if len(params.Username) == 0 {
 | 
			
		||||
			this.FailField("username", "请输入SSH登录用户名")
 | 
			
		||||
		}
 | 
			
		||||
	case "privateKey":
 | 
			
		||||
		if len(params.PrivateKey) == 0 {
 | 
			
		||||
			this.FailField("privateKey", "请输入RSA私钥")
 | 
			
		||||
		}
 | 
			
		||||
	default:
 | 
			
		||||
		this.Fail("请选择正确的认证方式")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	createResp, err := this.RPC().NodeGrantRPC().CreateNodeGrant(this.AdminContext(), &pb.CreateNodeGrantRequest{
 | 
			
		||||
		Name:        params.Name,
 | 
			
		||||
		Method:      params.Method,
 | 
			
		||||
		Username:    params.Username,
 | 
			
		||||
		Password:    params.Password,
 | 
			
		||||
		PrivateKey:  params.PrivateKey,
 | 
			
		||||
		Description: params.Description,
 | 
			
		||||
		NodeId:      0,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Data["grant"] = maps.Map{
 | 
			
		||||
		"id":         createResp.GrantId,
 | 
			
		||||
		"name":       params.Name,
 | 
			
		||||
		"method":     params.Method,
 | 
			
		||||
		"methodName": grantutils.FindGrantMethodName(params.Method),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Success()
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										72
									
								
								internal/web/actions/default/nodes/grants/selectPopup.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								internal/web/actions/default/nodes/grants/selectPopup.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
			
		||||
package grants
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
 | 
			
		||||
	"github.com/iwind/TeaGo/actions"
 | 
			
		||||
	"github.com/iwind/TeaGo/maps"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type SelectPopupAction struct {
 | 
			
		||||
	actionutils.ParentAction
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *SelectPopupAction) Init() {
 | 
			
		||||
	this.Nav("", "", "")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *SelectPopupAction) RunGet(params struct{}) {
 | 
			
		||||
	// 所有的认证
 | 
			
		||||
	grantsResp, err := this.RPC().NodeGrantRPC().FindAllEnabledNodeGrants(this.AdminContext(), &pb.FindAllEnabledNodeGrantsRequest{})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	grants := grantsResp.Grants
 | 
			
		||||
	grantMaps := []maps.Map{}
 | 
			
		||||
	for _, grant := range grants {
 | 
			
		||||
		grantMaps = append(grantMaps, maps.Map{
 | 
			
		||||
			"id":         grant.Id,
 | 
			
		||||
			"name":       grant.Name,
 | 
			
		||||
			"method":     grant.Method,
 | 
			
		||||
			"methodName": grantutils.FindGrantMethodName(grant.Method),
 | 
			
		||||
		})
 | 
			
		||||
	}
 | 
			
		||||
	this.Data["grants"] = grantMaps
 | 
			
		||||
 | 
			
		||||
	this.Show()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *SelectPopupAction) RunPost(params struct {
 | 
			
		||||
	GrantId int64
 | 
			
		||||
	Must    *actions.Must
 | 
			
		||||
}) {
 | 
			
		||||
	if params.GrantId <= 0 {
 | 
			
		||||
		this.Data["grant"] = maps.Map{
 | 
			
		||||
			"id":         params.GrantId,
 | 
			
		||||
			"name":       "",
 | 
			
		||||
			"method":     "",
 | 
			
		||||
			"methodName": "",
 | 
			
		||||
		}
 | 
			
		||||
		this.Success()
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: params.GrantId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	grant := grantResp.Grant
 | 
			
		||||
	if grant == nil {
 | 
			
		||||
		this.Fail("找不到要使用的认证")
 | 
			
		||||
	}
 | 
			
		||||
	this.Data["grant"] = maps.Map{
 | 
			
		||||
		"id":         grant.Id,
 | 
			
		||||
		"name":       grant.Name,
 | 
			
		||||
		"method":     grant.Method,
 | 
			
		||||
		"methodName": grantutils.FindGrantMethodName(grant.Method),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Success()
 | 
			
		||||
}
 | 
			
		||||
@@ -14,6 +14,9 @@ func init() {
 | 
			
		||||
			Prefix("/nodes").
 | 
			
		||||
			Get("", new(IndexAction)).
 | 
			
		||||
			GetPost("/create", new(CreateAction)).
 | 
			
		||||
			Post("/delete", new(DeleteAction)).
 | 
			
		||||
			GetPost("/update", new(UpdateAction)).
 | 
			
		||||
			Get("/node", new(NodeAction)).
 | 
			
		||||
 | 
			
		||||
			// 授权管理
 | 
			
		||||
			Get("/grants", new(grants.IndexAction)).
 | 
			
		||||
@@ -21,6 +24,8 @@ func init() {
 | 
			
		||||
			GetPost("/grants/update", new(grants.UpdateAction)).
 | 
			
		||||
			Post("/grants/delete", new(grants.DeleteAction)).
 | 
			
		||||
			Get("/grants/grant", new(grants.GrantAction)).
 | 
			
		||||
			GetPost("/grants/selectPopup", new(grants.SelectPopupAction)).
 | 
			
		||||
			GetPost("/grants/createPopup", new(grants.CreatePopupAction)).
 | 
			
		||||
			EndAll()
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										89
									
								
								internal/web/actions/default/nodes/node.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								internal/web/actions/default/nodes/node.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,89 @@
 | 
			
		||||
package nodes
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
 | 
			
		||||
	"github.com/iwind/TeaGo/maps"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type NodeAction struct {
 | 
			
		||||
	actionutils.ParentAction
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *NodeAction) Init() {
 | 
			
		||||
	this.Nav("", "node", "index")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *NodeAction) RunGet(params struct {
 | 
			
		||||
	NodeId int64
 | 
			
		||||
}) {
 | 
			
		||||
	this.Data["nodeId"] = params.NodeId
 | 
			
		||||
 | 
			
		||||
	nodeResp, err := this.RPC().NodeRPC().FindEnabledNode(this.AdminContext(), &pb.FindEnabledNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	node := nodeResp.Node
 | 
			
		||||
	if node == nil {
 | 
			
		||||
		this.WriteString("找不到要操作的节点")
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var clusterMap maps.Map = nil
 | 
			
		||||
	if node.Cluster != nil {
 | 
			
		||||
		clusterMap = maps.Map{
 | 
			
		||||
			"id":   node.Cluster.Id,
 | 
			
		||||
			"name": node.Cluster.Name,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var loginMap maps.Map = nil
 | 
			
		||||
	if node.Login != nil {
 | 
			
		||||
		loginParams := maps.Map{}
 | 
			
		||||
		if len(node.Login.Params) > 0 {
 | 
			
		||||
			err = json.Unmarshal(node.Login.Params, &loginParams)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				this.ErrorPage(err)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		grantMap := maps.Map{}
 | 
			
		||||
		grantId := loginParams.GetInt64("grantId")
 | 
			
		||||
		if grantId > 0 {
 | 
			
		||||
			grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: grantId})
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				this.ErrorPage(err)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			if grantResp.Grant != nil {
 | 
			
		||||
				grantMap = maps.Map{
 | 
			
		||||
					"id":         grantResp.Grant.Id,
 | 
			
		||||
					"name":       grantResp.Grant.Name,
 | 
			
		||||
					"method":     grantResp.Grant.Method,
 | 
			
		||||
					"methodName": grantutils.FindGrantMethodName(grantResp.Grant.Method),
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		loginMap = maps.Map{
 | 
			
		||||
			"id":     node.Login.Id,
 | 
			
		||||
			"name":   node.Login.Name,
 | 
			
		||||
			"type":   node.Login.Type,
 | 
			
		||||
			"params": loginParams,
 | 
			
		||||
			"grant":  grantMap,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Data["node"] = maps.Map{
 | 
			
		||||
		"id":      node.Id,
 | 
			
		||||
		"name":    node.Name,
 | 
			
		||||
		"cluster": clusterMap,
 | 
			
		||||
		"login":   loginMap,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Show()
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										159
									
								
								internal/web/actions/default/nodes/update.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										159
									
								
								internal/web/actions/default/nodes/update.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,159 @@
 | 
			
		||||
package nodes
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
 | 
			
		||||
	"github.com/iwind/TeaGo/actions"
 | 
			
		||||
	"github.com/iwind/TeaGo/maps"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type UpdateAction struct {
 | 
			
		||||
	actionutils.ParentAction
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *UpdateAction) Init() {
 | 
			
		||||
	this.Nav("", "node", "index")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *UpdateAction) RunGet(params struct {
 | 
			
		||||
	NodeId int64
 | 
			
		||||
}) {
 | 
			
		||||
	this.Data["nodeId"] = params.NodeId
 | 
			
		||||
 | 
			
		||||
	nodeResp, err := this.RPC().NodeRPC().FindEnabledNode(this.AdminContext(), &pb.FindEnabledNodeRequest{NodeId: params.NodeId})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	node := nodeResp.Node
 | 
			
		||||
	if node == nil {
 | 
			
		||||
		this.WriteString("找不到要操作的节点")
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var clusterMap maps.Map = nil
 | 
			
		||||
	if node.Cluster != nil {
 | 
			
		||||
		clusterMap = maps.Map{
 | 
			
		||||
			"id":   node.Cluster.Id,
 | 
			
		||||
			"name": node.Cluster.Name,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var loginMap maps.Map = nil
 | 
			
		||||
	if node.Login != nil {
 | 
			
		||||
		loginParams := maps.Map{}
 | 
			
		||||
		if len(node.Login.Params) > 0 {
 | 
			
		||||
			err = json.Unmarshal(node.Login.Params, &loginParams)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				this.ErrorPage(err)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		grantMap := maps.Map{}
 | 
			
		||||
		grantId := loginParams.GetInt64("grantId")
 | 
			
		||||
		if grantId > 0 {
 | 
			
		||||
			grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: grantId})
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				this.ErrorPage(err)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			if grantResp.Grant != nil {
 | 
			
		||||
				grantMap = maps.Map{
 | 
			
		||||
					"id":         grantResp.Grant.Id,
 | 
			
		||||
					"name":       grantResp.Grant.Name,
 | 
			
		||||
					"method":     grantResp.Grant.Method,
 | 
			
		||||
					"methodName": grantutils.FindGrantMethodName(grantResp.Grant.Method),
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		loginMap = maps.Map{
 | 
			
		||||
			"id":     node.Login.Id,
 | 
			
		||||
			"name":   node.Login.Name,
 | 
			
		||||
			"type":   node.Login.Type,
 | 
			
		||||
			"params": loginParams,
 | 
			
		||||
			"grant":  grantMap,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Data["node"] = maps.Map{
 | 
			
		||||
		"id":      node.Id,
 | 
			
		||||
		"name":    node.Name,
 | 
			
		||||
		"cluster": clusterMap,
 | 
			
		||||
		"login":   loginMap,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 所有集群
 | 
			
		||||
	resp, err := this.RPC().NodeClusterRPC().FindAllEnabledClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
	}
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	clusterMaps := []maps.Map{}
 | 
			
		||||
	for _, cluster := range resp.Clusters {
 | 
			
		||||
		clusterMaps = append(clusterMaps, maps.Map{
 | 
			
		||||
			"id":   cluster.Id,
 | 
			
		||||
			"name": cluster.Name,
 | 
			
		||||
		})
 | 
			
		||||
	}
 | 
			
		||||
	this.Data["clusters"] = clusterMaps
 | 
			
		||||
 | 
			
		||||
	this.Show()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *UpdateAction) RunPost(params struct {
 | 
			
		||||
	LoginId   int64
 | 
			
		||||
	NodeId    int64
 | 
			
		||||
	Name      string
 | 
			
		||||
	ClusterId int64
 | 
			
		||||
	GrantId   int64
 | 
			
		||||
	SshHost   string
 | 
			
		||||
	SshPort   int
 | 
			
		||||
 | 
			
		||||
	Must *actions.Must
 | 
			
		||||
}) {
 | 
			
		||||
	if params.NodeId <= 0 {
 | 
			
		||||
		this.Fail("要操作的节点不存在")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	params.Must.
 | 
			
		||||
		Field("name", params.Name).
 | 
			
		||||
		Require("请输入节点名称")
 | 
			
		||||
 | 
			
		||||
	// TODO 检查cluster
 | 
			
		||||
	if params.ClusterId <= 0 {
 | 
			
		||||
		this.Fail("请选择所在集群")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// TODO 检查登录授权
 | 
			
		||||
	loginInfo := &pb.NodeLogin{
 | 
			
		||||
		Id:   params.LoginId,
 | 
			
		||||
		Name: "SSH",
 | 
			
		||||
		Type: "ssh",
 | 
			
		||||
		Params: maps.Map{
 | 
			
		||||
			"grantId": params.GrantId,
 | 
			
		||||
			"host":    params.SshHost,
 | 
			
		||||
			"port":    params.SshPort,
 | 
			
		||||
		}.AsJSON(),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 保存
 | 
			
		||||
	_, err := this.RPC().NodeRPC().UpdateNode(this.AdminContext(), &pb.UpdateNodeRequest{
 | 
			
		||||
		NodeId:    params.NodeId,
 | 
			
		||||
		Name:      params.Name,
 | 
			
		||||
		ClusterId: params.ClusterId,
 | 
			
		||||
		Login:     loginInfo,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.ErrorPage(err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.Success()
 | 
			
		||||
}
 | 
			
		||||
@@ -208,6 +208,9 @@ td .label.tiny {
 | 
			
		||||
  padding: 2px;
 | 
			
		||||
  font-size: 0.9em;
 | 
			
		||||
}
 | 
			
		||||
td .label.small {
 | 
			
		||||
  margin-bottom: 0.6em;
 | 
			
		||||
}
 | 
			
		||||
/** Menu **/
 | 
			
		||||
.first-menu .menu.text {
 | 
			
		||||
  margin-top: 0 !important;
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
{"version":3,"sources":["@layout_popup.less"],"names":[],"mappings":";AACA;EACC,WAAA;;AAGD;EACC,aAAA;;AAGD;EACC,qBAAA;;AAGD,CAAC;AAAW,CAAC,SAAS;AAAQ,CAAC,SAAS;AAAS,IAAI;EACpD,sBAAA;;AAGD,CAAC;AAAU,IAAI;AAAU,IAAI;EAC5B,cAAA;;AAGD,IAAI;AAAO,KAAK;AAAO,CAAC;EACvB,sBAAA;;AAGD,CAAC;EACA,iBAAA;;AAGD,IAAI;AAAM,GAAG;EACZ,cAAA;;AAGD,GAAG,IAAI;EACN,mBAAmB,8CAAnB;;AAGD;EACC,uBAAA;;AAGD,MAAM;EACL,sBAAA;;AAGD,MAAM;EACL,sBAAA;;AAGD,MAAM;EACL,sBAAA;;AAGD,MAAO;AAAI,MAAO;EACjB,2BAAA;;AAGD,CAAC;AAAU,GAAG;EACb,yBAAA;EACA,kBAAA;;AAGD,CAAC,QAAS;AAAI,GAAG,QAAS;EACzB,6BAAA;;AAGD;EACC,mBAAA;EACA,2BAAA;EACA,gBAAA;EACA,uBAAA;;AAGD,GAAG;AAAS,CAAC;EACZ,eAAA;;;AAID,GAAG;EACF,UAAA;;AAGD,GAAG;EACF,YAAA;;AAGD,GAAG;EACF,UAAA;;AAGD,GAAG;EACF,WAAA;;;AAID,MAAM;EACL,aAAA;;;AAID;EACC,kBAAA;EACA,UAAA;EACA,UAAA;EACA,mBAAA;EACA,kBAAA;EACA,UAAA;;AASD,mBANqC;EACpC;IACC,SAAA;;;AAIF,KAAK;EACJ,SAAA;;AAGD,KAAK;EACJ,UAAA;;AASD,mBANqC;EACpC,KAAK;IACJ,SAAA;;;AAIF,KAAM,MAAM,GAAE;EACb,WAAA;;AAGD,KAAM,MAAM,GAAE;EACb,WAAA;;AAGD,KAAM,MAAM;EACX,mBAAA;;AAGD,KAAM,MAAM,GAAE;EACb,yCAAA;;AAGD,KAAM,MAAM,GAAE;EACb,mBAAA;;AAGD,KAAM,MAAM,GAAE;EACb,sBAAA;;AAGD,KAAM,MAAM,GAAE,aAAc;EAC3B,mBAAA;;AAGD,KAAM,MAAM,GAAG;EACd,mBAAA;EACA,kBAAA;EACA,gBAAA;;AAGD,KAAM;EACL,mBAAA;EACA,4BAAA;;AAGD,KAAM,GAAG;EACR,gBAAA;;AAGD,KAAM,GAAG,KAAI;EACZ,cAAA;;AAGD,KAAM,GAAG;EACR,gBAAA;EACA,0BAAA;EACA,UAAA;;AAGD,KAAM,GAAG,EAAC;EACT,SAAS,GAAT;;AAGD,KAAM,GAAG,EAAC;EACT,SAAS,GAAT;;AAGD,KAAM;EACL,mBAAA;;AAGD,KAAM,GAAG,KAAI;EACZ,gBAAA;;AAGD,KAAM,QAAO;EACZ,gBAAA;EACA,cAAA;EACA,gBAAA;;;AAID,KAAK;EACJ,gBAAA;;AAGD,KAAK,KAAK;EACT,UAAA;EACA,WAAA;;;AAID;EACC,wBAAA;;;AAID,iBAAkB;EACjB,2BAAA;;AAGD,iBAAkB,MAAK;EACtB,UAAA;;AAGD,iBAAkB,MAAM;EACvB,2BAAA;;;AAcD,mBAPqC;EACpC,OAAO,IAAI;IACV,sBAAA;;;;AAKF,KAAK;EACJ,0BAAA;;AAGD,KAAK;EACJ,yBAAA;;AAGD,EAAG,OAAM;EACR,YAAA;EACA,gBAAA;;;AAID,WAAY,MAAK;EAChB,wBAAA;EACA,2BAAA;;AAGD,WAAY;EACX,wBAAA;EACA,2BAAA;;AAGD,YAAa,MAAK;EACjB,wBAAA;EACA,2BAAA;;AAGD,YAAa,MAAK,KAAM;EACvB,kBAAA;;AAGD,YAAa;EACZ,wBAAA;;AAGD,KAAM;EACL,aAAA;;;AAID,IAAI;AAAQ,GAAG;EACd,yBAAA;;AAGD,GAAG;EACF,8BAAA;;;AAID,QAAS;EACR,WAAA;EACA,kBAAA;;;AAID,SAAU,MAAM;AAAG,SAAU;EAC5B,2BAAA;;;AAID;EACC,eAAA;EAEA,2BAAA;;AAHD,KAKC;EACC,qBAAA;EACA,mBAAA;EACA,WAAA;EACA,iBAAA;EACA,SAAA;EACA,gBAAA;EACA,sBAAA;EACA,cAAA;;AAbF,KAgBC,EAAC;EACA,8BAAA;EACA,YAAA;;AAlBF,KAqBC,EAAC;EACA,gBAAA;;;AAKF;EACC,kBAAA;;AAGD,cAAc;AAAQ,aAAa;AAAQ,YAAY;EACtD,iCAAA;;AAGD;AAAgB;AAAe;EAC9B,iCAAA;;AAGD;EACC,2BAAA","file":"@layout_popup.css"}
 | 
			
		||||
{"version":3,"sources":["@layout_popup.less"],"names":[],"mappings":";AACA;EACC,WAAA;;AAGD;EACC,aAAA;;AAGD;EACC,qBAAA;;AAGD,CAAC;AAAW,CAAC,SAAS;AAAQ,CAAC,SAAS;AAAS,IAAI;EACpD,sBAAA;;AAGD,CAAC;AAAU,IAAI;AAAU,IAAI;EAC5B,cAAA;;AAGD,IAAI;AAAO,KAAK;AAAO,CAAC;EACvB,sBAAA;;AAGD,CAAC;EACA,iBAAA;;AAGD,IAAI;AAAM,GAAG;EACZ,cAAA;;AAGD,GAAG,IAAI;EACN,mBAAmB,8CAAnB;;AAGD;EACC,uBAAA;;AAGD,MAAM;EACL,sBAAA;;AAGD,MAAM;EACL,sBAAA;;AAGD,MAAM;EACL,sBAAA;;AAGD,MAAO;AAAI,MAAO;EACjB,2BAAA;;AAGD,CAAC;AAAU,GAAG;EACb,yBAAA;EACA,kBAAA;;AAGD,CAAC,QAAS;AAAI,GAAG,QAAS;EACzB,6BAAA;;AAGD;EACC,mBAAA;EACA,2BAAA;EACA,gBAAA;EACA,uBAAA;;AAGD,GAAG;AAAS,CAAC;EACZ,eAAA;;;AAID,GAAG;EACF,UAAA;;AAGD,GAAG;EACF,YAAA;;AAGD,GAAG;EACF,UAAA;;AAGD,GAAG;EACF,WAAA;;;AAID,MAAM;EACL,aAAA;;;AAID;EACC,kBAAA;EACA,UAAA;EACA,UAAA;EACA,mBAAA;EACA,kBAAA;EACA,UAAA;;AASD,mBANqC;EACpC;IACC,SAAA;;;AAIF,KAAK;EACJ,SAAA;;AAGD,KAAK;EACJ,UAAA;;AASD,mBANqC;EACpC,KAAK;IACJ,SAAA;;;AAIF,KAAM,MAAM,GAAE;EACb,WAAA;;AAGD,KAAM,MAAM,GAAE;EACb,WAAA;;AAGD,KAAM,MAAM;EACX,mBAAA;;AAGD,KAAM,MAAM,GAAE;EACb,yCAAA;;AAGD,KAAM,MAAM,GAAE;EACb,mBAAA;;AAGD,KAAM,MAAM,GAAE;EACb,sBAAA;;AAGD,KAAM,MAAM,GAAE,aAAc;EAC3B,mBAAA;;AAGD,KAAM,MAAM,GAAG;EACd,mBAAA;EACA,kBAAA;EACA,gBAAA;;AAGD,KAAM;EACL,mBAAA;EACA,4BAAA;;AAGD,KAAM,GAAG;EACR,gBAAA;;AAGD,KAAM,GAAG,KAAI;EACZ,cAAA;;AAGD,KAAM,GAAG;EACR,gBAAA;EACA,0BAAA;EACA,UAAA;;AAGD,KAAM,GAAG,EAAC;EACT,SAAS,GAAT;;AAGD,KAAM,GAAG,EAAC;EACT,SAAS,GAAT;;AAGD,KAAM;EACL,mBAAA;;AAGD,KAAM,GAAG,KAAI;EACZ,gBAAA;;AAGD,KAAM,QAAO;EACZ,gBAAA;EACA,cAAA;EACA,gBAAA;;;AAID,KAAK;EACJ,gBAAA;;AAGD,KAAK,KAAK;EACT,UAAA;EACA,WAAA;;;AAID;EACC,wBAAA;;;AAID,iBAAkB;EACjB,2BAAA;;AAGD,iBAAkB,MAAK;EACtB,UAAA;;AAGD,iBAAkB,MAAM;EACvB,2BAAA;;;AAcD,mBAPqC;EACpC,OAAO,IAAI;IACV,sBAAA;;;;AAKF,KAAK;EACJ,0BAAA;;AAGD,KAAK;EACJ,yBAAA;;AAGD,EAAG,OAAM;EACR,YAAA;EACA,gBAAA;;AAGD,EAAG,OAAM;EACR,oBAAA;;;AAID,WAAY,MAAK;EAChB,wBAAA;EACA,2BAAA;;AAGD,WAAY;EACX,wBAAA;EACA,2BAAA;;AAGD,YAAa,MAAK;EACjB,wBAAA;EACA,2BAAA;;AAGD,YAAa,MAAK,KAAM;EACvB,kBAAA;;AAGD,YAAa;EACZ,wBAAA;;AAGD,KAAM;EACL,aAAA;;;AAID,IAAI;AAAQ,GAAG;EACd,yBAAA;;AAGD,GAAG;EACF,8BAAA;;;AAID,QAAS;EACR,WAAA;EACA,kBAAA;;;AAID,SAAU,MAAM;AAAG,SAAU;EAC5B,2BAAA;;;AAID;EACC,eAAA;EAEA,2BAAA;;AAHD,KAKC;EACC,qBAAA;EACA,mBAAA;EACA,WAAA;EACA,iBAAA;EACA,SAAA;EACA,gBAAA;EACA,sBAAA;EACA,cAAA;;AAbF,KAgBC,EAAC;EACA,8BAAA;EACA,YAAA;;AAlBF,KAqBC,EAAC;EACA,gBAAA;;;AAKF;EACC,kBAAA;;AAGD,cAAc;AAAQ,aAAa;AAAQ,YAAY;EACtD,iCAAA;;AAGD;AAAgB;AAAe;EAC9B,iCAAA;;AAGD;EACC,2BAAA","file":"@layout_popup.css"}
 | 
			
		||||
@@ -254,6 +254,10 @@ td .label.tiny {
 | 
			
		||||
	font-size: 0.9em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
td .label.small {
 | 
			
		||||
	margin-bottom: 0.6em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/** Menu **/
 | 
			
		||||
.first-menu .menu.text {
 | 
			
		||||
	margin-top: 0 !important;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@
 | 
			
		||||
{$template "menu"}
 | 
			
		||||
<div class="margin"></div>
 | 
			
		||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
 | 
			
		||||
	<input type="hidden" name="grantId" :value="grantId"/>
 | 
			
		||||
	<table class="ui table definition selectable">
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td class="title">节点名称 *</td>
 | 
			
		||||
@@ -18,9 +19,26 @@
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>SSH登录授权</td>
 | 
			
		||||
			<td>SSH主机地址</td>
 | 
			
		||||
			<td>
 | 
			
		||||
 | 
			
		||||
				<input type="text" name="sshHost" maxlength="64"/>
 | 
			
		||||
				<p class="comment">比如192.168.1.100</p>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>SSH主机端口</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<input type="text" name="sshPort" maxlength="5"/>
 | 
			
		||||
				<p class="comment">比如22。</p>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>SSH登录认证</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<div class="ui label small" v-if="grant != null">{{grant.name}}<span class="small">({{grant.methodName}})</span> <a href="" title="删除" @click.prevent="removeGrant()"><i class="icon remove"></i></a> </div>
 | 
			
		||||
				<div v-if="grant == null">
 | 
			
		||||
					<a href="" @click.prevent="selectGrant()">[选择已有认证]</a>     <a href="" @click.prevent="createGrant()">[添加新认证]</a>
 | 
			
		||||
				</div>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
	</table>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,36 @@
 | 
			
		||||
Tea.context(function () {
 | 
			
		||||
	this.grantId = 0;
 | 
			
		||||
	this.grant = null;
 | 
			
		||||
 | 
			
		||||
	this.success = NotifySuccess("保存成功", "/nodes");
 | 
			
		||||
 | 
			
		||||
	this.selectGrant = function () {
 | 
			
		||||
		var that = this;
 | 
			
		||||
		teaweb.popup("/nodes/grants/selectPopup", {
 | 
			
		||||
			callback: function (resp) {
 | 
			
		||||
				that.grantId = resp.data.grant.id;
 | 
			
		||||
				if (that.grantId > 0) {
 | 
			
		||||
					that.grant = resp.data.grant;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	this.createGrant = function () {
 | 
			
		||||
		var that = this;
 | 
			
		||||
		teaweb.popup("/nodes/grants/createPopup", {
 | 
			
		||||
			height: "31em",
 | 
			
		||||
			callback: function (resp) {
 | 
			
		||||
				that.grantId = resp.data.grant.id;
 | 
			
		||||
				if (that.grantId > 0) {
 | 
			
		||||
					that.grant = resp.data.grant;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	this.removeGrant = function () {
 | 
			
		||||
		this.grant = null;
 | 
			
		||||
		this.grantId = 0;
 | 
			
		||||
	};
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										57
									
								
								web/views/@default/nodes/grants/createPopup.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								web/views/@default/nodes/grants/createPopup.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
{$layout "layout_popup"}
 | 
			
		||||
 | 
			
		||||
<h3>添加新认证</h3>
 | 
			
		||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
 | 
			
		||||
	<table class="ui table selectable definition">
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>名称 *</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<input type="text" name="name" maxlength="100" ref="focus"/>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td class="title">认证方式</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<select class="ui dropdown" style="width:10em" name="method" v-model="method">
 | 
			
		||||
					<option v-for="method in methods" :value="method.value">{{method.name}}</option>
 | 
			
		||||
				</select>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
 | 
			
		||||
		<!-- 用户名/密码 -->
 | 
			
		||||
		<tbody v-if="method == 'user'">
 | 
			
		||||
			<tr>
 | 
			
		||||
				<td>SSH用户名 *</td>
 | 
			
		||||
				<td>
 | 
			
		||||
					<input type="text" name="username" maxlength="100"/>
 | 
			
		||||
					<p class="comment">SSH登录用户名。</p>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			<tr>
 | 
			
		||||
				<td>SSH密码</td>
 | 
			
		||||
				<td><input type="password" name="password" maxlength="100"/>
 | 
			
		||||
				<p class="comment">SSH登录用户密码。</p> </td>
 | 
			
		||||
			</tr>
 | 
			
		||||
		</tbody>
 | 
			
		||||
 | 
			
		||||
		<!-- 私钥 -->
 | 
			
		||||
		<tbody v-if="method == 'privateKey'">
 | 
			
		||||
			<tr>
 | 
			
		||||
				<td>RSA私钥 *</td>
 | 
			
		||||
				<td>
 | 
			
		||||
					<textarea name="privateKey"></textarea>
 | 
			
		||||
					<p class="comment">用来生成登录SSH公钥的私钥</p>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
		</tbody>
 | 
			
		||||
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>描述</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<textarea name="description" rows="3"></textarea>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
	</table>
 | 
			
		||||
	<submit-btn></submit-btn>
 | 
			
		||||
</form>
 | 
			
		||||
							
								
								
									
										5
									
								
								web/views/@default/nodes/grants/createPopup.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								web/views/@default/nodes/grants/createPopup.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
Tea.context(function () {
 | 
			
		||||
	this.method = "user";
 | 
			
		||||
 | 
			
		||||
	this.success = NotifyPopup;
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										18
									
								
								web/views/@default/nodes/grants/selectPopup.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								web/views/@default/nodes/grants/selectPopup.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
{$layout "layout_popup"}
 | 
			
		||||
 | 
			
		||||
<h3>选择认证</h3>
 | 
			
		||||
 | 
			
		||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
 | 
			
		||||
	<input type="hidden" name="grantId" :value="grantId"/>
 | 
			
		||||
	<table class="ui table selectable definition">
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td class="title">选择认证</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<span v-if="grants.length == 0">暂时还没有可用的认证。</span>
 | 
			
		||||
				<a class="ui label small" v-for="grant in grants" :class="{blue:grantId == grant.id}" @click.prevent="selectGrant(grant)">{{grant.name}} <span class="small">({{grant.methodName}})</span></a>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
	</table>
 | 
			
		||||
 | 
			
		||||
	<submit-btn>确定</submit-btn>
 | 
			
		||||
</form>
 | 
			
		||||
							
								
								
									
										9
									
								
								web/views/@default/nodes/grants/selectPopup.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								web/views/@default/nodes/grants/selectPopup.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
Tea.context(function () {
 | 
			
		||||
	this.grantId = 0;
 | 
			
		||||
 | 
			
		||||
	this.selectGrant = function (grant) {
 | 
			
		||||
		this.grantId = grant.id;
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	this.success = NotifyPopup;
 | 
			
		||||
});
 | 
			
		||||
@@ -8,20 +8,30 @@
 | 
			
		||||
		<tr>
 | 
			
		||||
			<th>ID</th>
 | 
			
		||||
			<th>节点名称</th>
 | 
			
		||||
			<th>IP</th>
 | 
			
		||||
			<th>所属集群</th>
 | 
			
		||||
			<th>状态</th>
 | 
			
		||||
			<th>CPU</th>
 | 
			
		||||
			<th>内存</th>
 | 
			
		||||
			<th>流量</th>
 | 
			
		||||
			<th>连接数</th>
 | 
			
		||||
			<th class="two op">操作</th>
 | 
			
		||||
		</tr>
 | 
			
		||||
	</thead>
 | 
			
		||||
	<tr v-for="node in nodes">
 | 
			
		||||
		<td>{{node.id}}</td>
 | 
			
		||||
		<td>{{node.name}}</td>
 | 
			
		||||
		<td></td>
 | 
			
		||||
		<td>{{node.cluster.name}}</td>
 | 
			
		||||
		<td>
 | 
			
		||||
			已安装|安装中|安装错误|运行中|失去连接
 | 
			
		||||
		</td>
 | 
			
		||||
		<td></td>
 | 
			
		||||
		<td></td>
 | 
			
		||||
		<td></td>
 | 
			
		||||
		<td></td>
 | 
			
		||||
		<td>
 | 
			
		||||
			<a href="">详情</a>   <a href="">删除</a>
 | 
			
		||||
			<a :href="'/nodes/node?nodeId=' + node.id">详情</a>   <a href="" @click.prevent="deleteNode(node.id)">删除</a>
 | 
			
		||||
		</td>
 | 
			
		||||
	</tr>
 | 
			
		||||
</table>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								web/views/@default/nodes/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								web/views/@default/nodes/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
Tea.context(function () {
 | 
			
		||||
	this.deleteNode = function (nodeId) {
 | 
			
		||||
		teaweb.confirm("确定要删除这个节点吗?", function () {
 | 
			
		||||
			this.$post(".delete")
 | 
			
		||||
				.params({
 | 
			
		||||
					nodeId: nodeId
 | 
			
		||||
				})
 | 
			
		||||
				.refresh();
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										57
									
								
								web/views/@default/nodes/node.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								web/views/@default/nodes/node.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
{$layout}
 | 
			
		||||
 | 
			
		||||
<second-menu>
 | 
			
		||||
	<menu-item :href="'/nodes/node?nodeId=' + nodeId" active="true">详情</menu-item>
 | 
			
		||||
	<menu-item :href="'/nodes/update?nodeId=' + nodeId">修改</menu-item>
 | 
			
		||||
</second-menu>
 | 
			
		||||
 | 
			
		||||
<table class="ui table definition selectable">
 | 
			
		||||
	<tr>
 | 
			
		||||
		<td class="title">节点名称</td>
 | 
			
		||||
		<td>{{node.name}}</td>
 | 
			
		||||
	</tr>
 | 
			
		||||
	<tr>
 | 
			
		||||
		<td>所属集群</td>
 | 
			
		||||
		<td>
 | 
			
		||||
			<span v-if="node.cluster == null">还没有设置集群。</span>
 | 
			
		||||
			<div v-if="node.cluster != null">
 | 
			
		||||
				{{node.cluster.name}}
 | 
			
		||||
			</div>
 | 
			
		||||
		</td>
 | 
			
		||||
	</tr>
 | 
			
		||||
	<tr>
 | 
			
		||||
		<td>SSH主机地址</td>
 | 
			
		||||
		<td>
 | 
			
		||||
			<div v-if="node.login != null && node.login.params != null && node.login.params.host != null">
 | 
			
		||||
				<span v-if="node.login.params.host.length > 0">{{node.login.params.host}}</span>
 | 
			
		||||
				<span v-if="node.login.params.host.length == 0">尚未设置</span>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div v-if="!(node.login != null && node.login.params != null && node.login.params.host != null)">
 | 
			
		||||
				尚未设置
 | 
			
		||||
			</div>
 | 
			
		||||
		</td>
 | 
			
		||||
	</tr>
 | 
			
		||||
	<tr>
 | 
			
		||||
		<td>SSH主机端口</td>
 | 
			
		||||
		<td>
 | 
			
		||||
			<div v-if="node.login != null && node.login.params != null && node.login.params.host != null">
 | 
			
		||||
				<span v-if="node.login.params.port > 0">{{node.login.params.port}}</span>
 | 
			
		||||
				<span v-if="node.login.params.port <= 0">尚未设置</span>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div v-if="!(node.login != null && node.login.params != null && node.login.params.port != null)">
 | 
			
		||||
				尚未设置
 | 
			
		||||
			</div>
 | 
			
		||||
		</td>
 | 
			
		||||
	</tr>
 | 
			
		||||
	<tr>
 | 
			
		||||
		<td>SSH登录认证</td>
 | 
			
		||||
		<td>
 | 
			
		||||
			<div v-if="node.login != null && node.login.grant != null && node.login.grant.id > 0">
 | 
			
		||||
				{{node.login.grant.name}}<span class="small">({{node.login.grant.methodName}})</span>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div v-if="!(node.login != null && node.login.grant != null && node.login.grant.id > 0)">
 | 
			
		||||
				尚未设置
 | 
			
		||||
			</div>
 | 
			
		||||
		</td>
 | 
			
		||||
	</tr>
 | 
			
		||||
</table>
 | 
			
		||||
							
								
								
									
										54
									
								
								web/views/@default/nodes/update.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								web/views/@default/nodes/update.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
{$layout}
 | 
			
		||||
{$template "menu"}
 | 
			
		||||
 | 
			
		||||
<second-menu>
 | 
			
		||||
	<menu-item :href="'/nodes/node?nodeId=' + nodeId">详情</menu-item>
 | 
			
		||||
	<menu-item :href="'/nodes/update?nodeId=' + nodeId" active="true">修改</menu-item>
 | 
			
		||||
</second-menu>
 | 
			
		||||
 | 
			
		||||
<div class="margin"></div>
 | 
			
		||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
 | 
			
		||||
	<input type="hidden" name="nodeId" :value="node.id"/>
 | 
			
		||||
	<input type="hidden" name="loginId" :value="loginId"/>
 | 
			
		||||
	<input type="hidden" name="grantId" :value="grantId"/>
 | 
			
		||||
	<table class="ui table definition selectable">
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td class="title">节点名称 *</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<input type="text" name="name" maxlength="50" ref="focus" v-model="node.name"/>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>所属集群</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<select class="ui dropdown" name="clusterId" style="width:10em" v-model="clusterId">
 | 
			
		||||
					<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
 | 
			
		||||
				</select>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>SSH主机地址</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<input type="text" name="sshHost" maxlength="64" v-model="sshHost"/>
 | 
			
		||||
				<p class="comment">比如192.168.1.100</p>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>SSH主机端口</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<input type="text" name="sshPort" maxlength="5" v-model="sshPort"/>
 | 
			
		||||
				<p class="comment">比如22。</p>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
		<tr>
 | 
			
		||||
			<td>SSH登录认证</td>
 | 
			
		||||
			<td>
 | 
			
		||||
				<div class="ui label small" v-if="grant != null">{{grant.name}}<span class="small">({{grant.methodName}})</span> <a href="" title="删除" @click.prevent="removeGrant()"><i class="icon remove"></i></a> </div>
 | 
			
		||||
				<div v-if="grant == null">
 | 
			
		||||
					<a href="" @click.prevent="selectGrant()">[选择已有认证]</a>     <a href="" @click.prevent="createGrant()">[添加新认证]</a>
 | 
			
		||||
				</div>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
	</table>
 | 
			
		||||
	<submit-btn></submit-btn>
 | 
			
		||||
</form>
 | 
			
		||||
							
								
								
									
										64
									
								
								web/views/@default/nodes/update.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								web/views/@default/nodes/update.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
Tea.context(function () {
 | 
			
		||||
	this.grantId = 0;
 | 
			
		||||
	this.grant = null;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	this.clusterId = 0;
 | 
			
		||||
	if (this.node.cluster != null && this.node.cluster.id > 0) {
 | 
			
		||||
		this.clusterId = this.node.cluster.id;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.sshHost = "";
 | 
			
		||||
	this.sshPort = "";
 | 
			
		||||
	this.loginId = 0;
 | 
			
		||||
	if (this.node.login != null) {
 | 
			
		||||
		this.loginId = this.node.login.id;
 | 
			
		||||
 | 
			
		||||
		if (this.node.login.params != null) {
 | 
			
		||||
			this.sshHost = this.node.login.params.host;
 | 
			
		||||
			this.sshPort = this.node.login.params.port;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (this.node.login.grant != null) {
 | 
			
		||||
			this.grantId = this.node.login.grant.id;
 | 
			
		||||
			this.grant = {
 | 
			
		||||
				id: this.node.login.grant.id,
 | 
			
		||||
				name: this.node.login.grant.name,
 | 
			
		||||
				method: this.node.login.grant.method,
 | 
			
		||||
				methodName: this.node.login.grant.methodName
 | 
			
		||||
			};
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	this.success = NotifySuccess("保存成功", "/nodes/node?nodeId=" + this.node.id);
 | 
			
		||||
 | 
			
		||||
	this.selectGrant = function () {
 | 
			
		||||
		var that = this;
 | 
			
		||||
		teaweb.popup("/nodes/grants/selectPopup", {
 | 
			
		||||
			callback: function (resp) {
 | 
			
		||||
				that.grantId = resp.data.grant.id;
 | 
			
		||||
				if (that.grantId > 0) {
 | 
			
		||||
					that.grant = resp.data.grant;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	this.createGrant = function () {
 | 
			
		||||
		var that = this;
 | 
			
		||||
		teaweb.popup("/nodes/grants/createPopup", {
 | 
			
		||||
			height: "31em",
 | 
			
		||||
			callback: function (resp) {
 | 
			
		||||
				that.grantId = resp.data.grant.id;
 | 
			
		||||
				if (that.grantId > 0) {
 | 
			
		||||
					that.grant = resp.data.grant;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	this.removeGrant = function () {
 | 
			
		||||
		this.grant = null;
 | 
			
		||||
		this.grantId = 0;
 | 
			
		||||
	};
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user