func AppCancel(rw http.ResponseWriter, r *http.Request) *httperr.Error { app := mux.Vars(r)["app"] err := models.Provider().AppCancel(app) if provider.ErrorNotFound(err) { return httperr.NotFound(err) } if err != nil { return httperr.Server(err) } return RenderSuccess(rw) }
func ProcessList(rw http.ResponseWriter, r *http.Request) *httperr.Error { app := mux.Vars(r)["app"] ps, err := models.Provider().ProcessList(app) if provider.ErrorNotFound(err) { return httperr.NotFound(err) } if err != nil { return httperr.Server(err) } sort.Sort(ps) return RenderJson(rw, ps) }
func SystemProcesses(rw http.ResponseWriter, r *http.Request) *httperr.Error { all := r.URL.Query().Get("all") ps, err := models.Provider().SystemProcesses(structs.SystemProcessesOptions{ All: (all == "true"), }) if provider.ErrorNotFound(err) { return httperr.NotFound(err) } if err != nil { return httperr.Server(err) } sort.Sort(ps) return RenderJson(rw, ps) }