Files
EdgeAdmin/internal/web/actions/default/clusters/cluster/index.go

29 lines
657 B
Go
Raw Normal View History

2024-05-17 17:56:37 +08:00
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
2020-09-06 16:19:34 +08:00
package cluster
2020-07-22 22:19:39 +08:00
2020-07-29 19:34:54 +08:00
import (
2024-07-27 15:42:58 +08:00
"strconv"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
2020-07-29 19:34:54 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
)
2020-07-22 22:19:39 +08:00
type IndexAction struct {
actionutils.ParentAction
}
func (this *IndexAction) Init() {
this.Nav("", "", "")
2020-07-22 22:19:39 +08:00
}
2020-09-06 16:19:34 +08:00
func (this *IndexAction) RunGet(params struct {
ClusterId int64
2020-09-06 16:19:34 +08:00
}) {
if teaconst.IsPlus {
this.RedirectURL("/clusters/cluster/boards?clusterId=" + strconv.FormatInt(params.ClusterId, 10))
} else {
this.RedirectURL("/clusters/cluster/nodes?clusterId=" + strconv.FormatInt(params.ClusterId, 10))
}
2020-07-22 22:19:39 +08:00
}