mirror of
https://shylinux.com/x/operation
synced 2025-04-24 17:08:04 +08:00
add some
This commit is contained in:
parent
15a1b424b0
commit
7ce1c751aa
@ -2,22 +2,32 @@ package dashboard
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/operation/src/dashboard/model"
|
||||
)
|
||||
|
||||
type cleanup struct {
|
||||
Tables
|
||||
portal Portal
|
||||
order string `data:"3"`
|
||||
placeTrash string `name:"placeTrash" help:"清理"`
|
||||
}
|
||||
|
||||
func (s cleanup) PlaceTrash(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.portal, s.portal.PlaceTrash)
|
||||
m.DisplayTable()
|
||||
m.Cmd("").Table(func(value ice.Maps) {
|
||||
if value[model.AUTH_UID] != "" {
|
||||
s.AutoCmd(m, api.RENZHENGSHOUQUAN_PORTAL, s.portal.PlaceTrash, kit.Dict(model.UID, value[model.AUTH_UID]))
|
||||
}
|
||||
s.AutoCmd(m, value[model.INDEX], s.portal.PlaceTrash, value)
|
||||
})
|
||||
}
|
||||
func (s cleanup) List(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.portal, s.portal.PlaceCheck)
|
||||
// m.Cmdy(s.Prefix(m, "service"))
|
||||
// m.Cmdy("web.code.mysql.cleanup", "mysql").Action()
|
||||
m.Cmd("service").Table(func(value ice.Maps) {
|
||||
s.AutoCmdy(m, value[model.INDEX], s.portal.PlaceCheck)
|
||||
})
|
||||
m.Action(s.PlaceTrash)
|
||||
m.DisplayTable()
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ const (
|
||||
QUERY = "query"
|
||||
VALUE = "value"
|
||||
SCORE = "score"
|
||||
INDEX = "index"
|
||||
)
|
||||
|
||||
type UserDashboard struct {
|
||||
|
@ -1,10 +1,6 @@
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong"
|
||||
"shylinux.com/x/operation/src/operation"
|
||||
)
|
||||
@ -14,16 +10,6 @@ type Portal struct {
|
||||
placeCreate string `name:"placeCreate city_name* company_name* dashboard_name* dashboard_type:select" role:"void"`
|
||||
}
|
||||
|
||||
func (s Portal) PlaceTrash(m *ice.Message, arg ...string) {
|
||||
s.Portal.PlaceTrash(m, arg...)
|
||||
for key, _ := range m.Target().Commands {
|
||||
if strings.HasPrefix(key, "_") {
|
||||
continue
|
||||
}
|
||||
m.Push("command", key)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
gonganxitong.PortalCmd(Portal{Portal: operation.NewPortal(userDashboard{}, dashboard{})})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user