46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package sandbox
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/policies"
|
|
)
|
|
|
|
type IndexAction struct {
|
|
actionutils.ParentAction
|
|
}
|
|
|
|
func (this *IndexAction) Init() {
|
|
this.Nav("httpdns", "sandbox", "")
|
|
}
|
|
|
|
func (this *IndexAction) RunGet(params struct{}) {
|
|
httpdnsutils.AddLeftMenu(this.Parent())
|
|
|
|
this.Data["clusters"] = policies.LoadAvailableDeployClusters()
|
|
this.Data["apps"] = []map[string]interface{}{
|
|
{
|
|
"id": int64(1),
|
|
"name": "主站移动业务",
|
|
"appId": "ab12xc34s2",
|
|
"clusterId": int64(1),
|
|
"domains": []string{"api.business.com", "www.aliyun.com"},
|
|
},
|
|
{
|
|
"id": int64(2),
|
|
"name": "支付网关业务",
|
|
"appId": "vd8992ksm1",
|
|
"clusterId": int64(2),
|
|
"domains": []string{"payment.business.com"},
|
|
},
|
|
{
|
|
"id": int64(3),
|
|
"name": "海外灰度测试",
|
|
"appId": "ov7711hkq9",
|
|
"clusterId": int64(1),
|
|
"domains": []string{"global.example.com", "edge.example.com"},
|
|
},
|
|
}
|
|
this.Show()
|
|
}
|