2020-10-25 21:27:28 +08:00
|
|
|
package clusterutils
|
2020-09-06 16:19:34 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/iwind/TeaGo/actions"
|
2020-10-25 21:27:28 +08:00
|
|
|
"net/http"
|
2020-09-06 16:19:34 +08:00
|
|
|
)
|
|
|
|
|
|
2020-10-25 21:27:28 +08:00
|
|
|
type ClustersHelper struct {
|
2020-09-06 16:19:34 +08:00
|
|
|
}
|
|
|
|
|
|
2020-10-25 21:27:28 +08:00
|
|
|
func NewClustersHelper() *ClustersHelper {
|
|
|
|
|
return &ClustersHelper{}
|
2020-09-06 16:19:34 +08:00
|
|
|
}
|
|
|
|
|
|
2021-10-15 12:54:23 +08:00
|
|
|
func (this *ClustersHelper) BeforeAction(actionPtr actions.ActionWrapper) {
|
|
|
|
|
var action = actionPtr.Object()
|
2020-10-25 21:27:28 +08:00
|
|
|
if action.Request.Method != http.MethodGet {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-06 16:19:34 +08:00
|
|
|
action.Data["teaMenu"] = "clusters"
|
|
|
|
|
}
|