管理端全部功能跑通
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package ech
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
|
||||
)
|
||||
import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
|
||||
type AuditAction struct {
|
||||
actionutils.ParentAction
|
||||
@@ -14,15 +11,5 @@ func (this *AuditAction) Init() {
|
||||
}
|
||||
|
||||
func (this *AuditAction) RunGet(params struct{}) {
|
||||
httpdnsutils.AddLeftMenu(this.Parent())
|
||||
this.Data["auditLogs"] = []map[string]interface{}{
|
||||
{
|
||||
"id": 1,
|
||||
"scope": "tenant:1001 -> domain:api.business.com -> region:cn-hz",
|
||||
"operator": "admin",
|
||||
"result": "success",
|
||||
"createdAt": "2026-02-21 10:00:00",
|
||||
},
|
||||
}
|
||||
this.Show()
|
||||
this.RedirectURL("/httpdns/apps")
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package ech
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
|
||||
)
|
||||
import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
@@ -14,34 +11,5 @@ func (this *IndexAction) Init() {
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct{}) {
|
||||
httpdnsutils.AddLeftMenu(this.Parent())
|
||||
this.Data["health"] = map[string]interface{}{
|
||||
"keySyncRate": 0.9995,
|
||||
"decryptFailRate": 0.0001,
|
||||
"isHealthy": true,
|
||||
}
|
||||
|
||||
this.Data["echLogs"] = []map[string]interface{}{
|
||||
{
|
||||
"id": 1024,
|
||||
"version": "ech-v20260221-01",
|
||||
"recordType": "HTTPS(Type65)",
|
||||
"publicKey": "BFCf8h5Qmock_public_key_for_ui_preview_lx9v2k7p0n",
|
||||
"publishTime": "2026-02-21 00:00:00",
|
||||
"syncStatus": "success",
|
||||
"nodesPending": 0,
|
||||
"isCurrent": true,
|
||||
},
|
||||
{
|
||||
"id": 1023,
|
||||
"version": "ech-v20260220-01",
|
||||
"recordType": "TXT",
|
||||
"publicKey": "BE9x3a2Qmock_prev_key_for_ui_preview_vd1n7x5k2c",
|
||||
"publishTime": "2026-02-20 00:00:00",
|
||||
"syncStatus": "success",
|
||||
"nodesPending": 0,
|
||||
"isCurrent": false,
|
||||
},
|
||||
}
|
||||
this.Show()
|
||||
this.RedirectURL("/httpdns/apps")
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@ func (this *RollbackMfaPopupAction) Init() {
|
||||
func (this *RollbackMfaPopupAction) RunGet(params struct {
|
||||
LogId int64
|
||||
}) {
|
||||
this.Data["logId"] = params.LogId
|
||||
this.Show()
|
||||
this.RedirectURL("/httpdns/apps")
|
||||
}
|
||||
|
||||
func (this *RollbackMfaPopupAction) RunPost(params struct {
|
||||
@@ -29,8 +28,5 @@ func (this *RollbackMfaPopupAction) RunPost(params struct {
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
}) {
|
||||
params.Must.Field("reason", params.Reason).Require("please input rollback reason")
|
||||
params.Must.Field("otpCode1", params.OtpCode1).Require("please input first otp code")
|
||||
params.Must.Field("otpCode2", params.OtpCode2).Require("please input second otp code")
|
||||
this.Success()
|
||||
this.Fail("feature removed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user