mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 10:10:28 +08:00
优化证书数量很多时的页面加载速度
This commit is contained in:
@@ -8,14 +8,17 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// 查找Server
|
||||
// FindServer 查找服务信息
|
||||
func FindServer(p *actionutils.ParentAction, serverId int64) (*pb.Server, *serverconfigs.ServerConfig, bool) {
|
||||
serverResp, err := p.RPC().ServerRPC().FindEnabledServer(p.AdminContext(), &pb.FindEnabledServerRequest{ServerId: serverId})
|
||||
serverResp, err := p.RPC().ServerRPC().FindEnabledServer(p.AdminContext(), &pb.FindEnabledServerRequest{
|
||||
ServerId: serverId,
|
||||
IgnoreSSLCertData: true,
|
||||
})
|
||||
if err != nil {
|
||||
p.ErrorPage(err)
|
||||
return nil, nil, false
|
||||
}
|
||||
server := serverResp.Server
|
||||
var server = serverResp.Server
|
||||
if server == nil {
|
||||
p.ErrorPage(errors.New("not found server with id '" + strconv.FormatInt(serverId, 10) + "'"))
|
||||
return nil, nil, false
|
||||
|
||||
Reference in New Issue
Block a user