package microservice

import (
	qu "qfw/util"

	. "../util"

	"github.com/go-xweb/xweb"
)

type Service struct {
	*xweb.Action
	serviceList xweb.Mapper `xweb:"/microservice/list"` //查询所有任务

}

func (s *Service) ServiceList() {
	defer qu.Catch()
	if s.Method() == "POST" {
		data, _ := Mgo.Find("task", `{"delete":false}`, nil, nil, false, -1, -1)
		s.ServeJson(map[string]interface{}{
			"data": data,
		})
	} else {
		s.Render("com/microservice_list.html")
	}
}
