Files
waf-platform/EdgeAdmin/internal/web/actions/default/httpdns/ech/index.go
2026-02-24 11:33:44 +08:00

48 lines
1.2 KiB
Go

package ech
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
)
type IndexAction struct {
actionutils.ParentAction
}
func (this *IndexAction) Init() {
this.Nav("httpdns", "ech", "")
}
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()
}