前端页面

This commit is contained in:
robin
2026-02-24 11:33:44 +08:00
parent f3af234308
commit 60dc87e0f2
141 changed files with 6845 additions and 133 deletions

View File

@@ -0,0 +1,66 @@
package guide
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
httpdnsApps "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/apps"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
httpdnsPolicies "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/policies"
"github.com/iwind/TeaGo/maps"
)
type IndexAction struct {
actionutils.ParentAction
}
func (this *IndexAction) Init() {
this.Nav("httpdns", "guide", "")
}
func (this *IndexAction) RunGet(params struct{}) {
httpdnsutils.AddLeftMenu(this.Parent())
apps := []maps.Map{
{
"id": int64(1),
"name": "主站移动业务",
"appId": "ab12xc34s2",
"clusterId": int64(1),
},
{
"id": int64(2),
"name": "视频网关业务",
"appId": "vd8992ksm1",
"clusterId": int64(2),
},
{
"id": int64(3),
"name": "海外灰度测试",
"appId": "ov7711hkq9",
"clusterId": int64(1),
},
}
for _, app := range apps {
clusterID := app.GetInt64("clusterId")
app["gatewayDomain"] = httpdnsPolicies.LoadClusterGatewayByID(clusterID)
settings := httpdnsApps.LoadAppSettingsByAppID(app.GetString("appId"))
if settings == nil {
app["signSecret"] = ""
app["signSecretMasked"] = ""
app["aesSecret"] = ""
app["aesSecretMasked"] = ""
app["signEnabled"] = false
continue
}
app["signSecret"] = settings.GetString("signSecretPlain")
app["signSecretMasked"] = settings.GetString("signSecretMasked")
app["aesSecret"] = settings.GetString("aesSecretPlain")
app["aesSecretMasked"] = settings.GetString("aesSecretMasked")
app["signEnabled"] = settings.GetBool("signEnabled")
}
this.Data["apps"] = apps
this.Show()
}