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 (
|
import (
|
||||||
"shylinux.com/x/ice"
|
"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 {
|
type cleanup struct {
|
||||||
Tables
|
Tables
|
||||||
portal Portal
|
portal Portal
|
||||||
order string `data:"3"`
|
order string `data:"3"`
|
||||||
|
placeTrash string `name:"placeTrash" help:"清理"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s cleanup) PlaceTrash(m *ice.Message, arg ...string) {
|
func (s cleanup) PlaceTrash(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(s.portal, s.portal.PlaceTrash)
|
m.Cmd("").Table(func(value ice.Maps) {
|
||||||
m.DisplayTable()
|
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) {
|
func (s cleanup) List(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(s.portal, s.portal.PlaceCheck)
|
m.Cmd("service").Table(func(value ice.Maps) {
|
||||||
// m.Cmdy(s.Prefix(m, "service"))
|
s.AutoCmdy(m, value[model.INDEX], s.portal.PlaceCheck)
|
||||||
// m.Cmdy("web.code.mysql.cleanup", "mysql").Action()
|
})
|
||||||
|
m.Action(s.PlaceTrash)
|
||||||
m.DisplayTable()
|
m.DisplayTable()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ const (
|
|||||||
QUERY = "query"
|
QUERY = "query"
|
||||||
VALUE = "value"
|
VALUE = "value"
|
||||||
SCORE = "score"
|
SCORE = "score"
|
||||||
|
INDEX = "index"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserDashboard struct {
|
type UserDashboard struct {
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
package dashboard
|
package dashboard
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
|
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/community/src/gonganxitong"
|
"shylinux.com/x/community/src/gonganxitong"
|
||||||
"shylinux.com/x/operation/src/operation"
|
"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"`
|
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() {
|
func init() {
|
||||||
gonganxitong.PortalCmd(Portal{Portal: operation.NewPortal(userDashboard{}, dashboard{})})
|
gonganxitong.PortalCmd(Portal{Portal: operation.NewPortal(userDashboard{}, dashboard{})})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user