mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 05:00:25 +08:00
实现节点看板(仅对企业版开放)
This commit is contained in:
15
internal/web/actions/actionutils/action_interface.go
Normal file
15
internal/web/actions/actionutils/action_interface.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package actionutils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type ActionInterface interface {
|
||||
RPC() *rpc.RPCClient
|
||||
|
||||
AdminContext() context.Context
|
||||
|
||||
ViewData() maps.Map
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/dao"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
@@ -126,3 +127,8 @@ func (this *ParentAction) AdminContext() context.Context {
|
||||
}
|
||||
return this.rpcClient.Context(this.AdminId())
|
||||
}
|
||||
|
||||
// ViewData 视图里可以使用的数据
|
||||
func (this *ParentAction) ViewData() maps.Map {
|
||||
return this.Data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user