2020-02-21 20:59:59 +08:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
2020-02-21 22:43:28 +08:00
|
|
|
"github.com/go-chi/chi"
|
2020-02-21 20:59:59 +08:00
|
|
|
"github.com/goodrain/rainbond/api/handler"
|
|
|
|
httputil "github.com/goodrain/rainbond/util/http"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
//GetRunningServices list all running service ids
|
|
|
|
func GetRunningServices(w http.ResponseWriter, r *http.Request) {
|
2020-02-21 22:43:28 +08:00
|
|
|
enterpriseID := chi.URLParam(r, "enterprise_id")
|
|
|
|
runningList := handler.GetServiceManager().GetEnterpriseRunningServices(enterpriseID)
|
2020-02-21 20:59:59 +08:00
|
|
|
httputil.ReturnNoFomart(r, w, 200, map[string]interface{}{"service_ids": runningList})
|
|
|
|
}
|