阶段性提交

This commit is contained in:
刘祥超
2020-09-13 20:37:07 +08:00
parent 9093019c73
commit ec3c0cafb3
155 changed files with 1317 additions and 13193 deletions

View File

@@ -1,6 +1,10 @@
package delete
import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/iwind/TeaGo/actions"
)
type IndexAction struct {
actionutils.ParentAction
@@ -14,3 +18,16 @@ func (this *IndexAction) Init() {
func (this *IndexAction) RunGet(params struct{}) {
this.Show()
}
func (this *IndexAction) RunPost(params struct {
ServerId int64
Must *actions.Must
}) {
_, err := this.RPC().ServerRPC().DisableServer(this.AdminContext(), &pb.DisableServerRequest{ServerId: params.ServerId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}