mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-28 05:16:34 +08:00
创建服务和修改服务HTTPS设置时也支持批量上传证书
This commit is contained in:
@@ -18,11 +18,30 @@ func (this *UploadPopupAction) Init() {
|
||||
this.Nav("", "", "")
|
||||
}
|
||||
|
||||
func (this *UploadPopupAction) RunGet(params struct{}) {
|
||||
func (this *UploadPopupAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
UserId int64
|
||||
}) {
|
||||
// 读取服务用户
|
||||
if params.ServerId > 0 {
|
||||
serverResp, err := this.RPC().ServerRPC().FindEnabledUserServerBasic(this.AdminContext(), &pb.FindEnabledUserServerBasicRequest{ServerId: params.ServerId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
var server = serverResp.Server
|
||||
if server != nil {
|
||||
params.UserId = server.UserId
|
||||
}
|
||||
}
|
||||
this.Data["userId"] = params.UserId
|
||||
|
||||
this.Show()
|
||||
}
|
||||
|
||||
func (this *UploadPopupAction) RunPost(params struct {
|
||||
UserId int64
|
||||
|
||||
TextMode bool
|
||||
Name string
|
||||
IsCA bool
|
||||
@@ -107,6 +126,7 @@ func (this *UploadPopupAction) RunPost(params struct {
|
||||
// 保存
|
||||
createResp, err := this.RPC().SSLCertRPC().CreateSSLCert(this.AdminContext(), &pb.CreateSSLCertRequest{
|
||||
IsOn: params.IsOn,
|
||||
UserId: params.UserId,
|
||||
Name: params.Name,
|
||||
Description: params.Description,
|
||||
ServerName: "",
|
||||
|
||||
Reference in New Issue
Block a user