2021-06-27 21:59:06 +08:00
|
|
|
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
|
|
|
|
|
|
package metrics
|
|
|
|
|
|
2021-07-03 15:44:49 +08:00
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/metrics/metricutils"
|
|
|
|
|
)
|
2021-06-27 21:59:06 +08:00
|
|
|
|
|
|
|
|
type ItemAction struct {
|
|
|
|
|
actionutils.ParentAction
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *ItemAction) Init() {
|
|
|
|
|
this.Nav("", "", "item")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *ItemAction) RunGet(params struct {
|
|
|
|
|
ItemId int64
|
|
|
|
|
}) {
|
2021-07-03 15:44:49 +08:00
|
|
|
_, err := metricutils.InitItem(this.Parent(), params.ItemId)
|
2021-06-27 21:59:06 +08:00
|
|
|
if err != nil {
|
|
|
|
|
this.ErrorPage(err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.Show()
|
|
|
|
|
}
|