Skip to content

Commit

Permalink
mittnitectl: only list controllable jobs (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmw authored Jan 10, 2023
1 parent 7d7eea8 commit cd149c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/proc/runner_api_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ func (r *Runner) apiV1JobStatus(writer http.ResponseWriter, req *http.Request) {
func (r *Runner) apiV1JobList(writer http.ResponseWriter, _ *http.Request) {
var jobs []string
for _, job := range r.jobs {
commonJob, ok := job.(*CommonJob)
if !ok {
continue
}
if !commonJob.IsControllable() {
continue
}
jobs = append(jobs, job.GetName())
}
out, err := json.Marshal(jobs)
Expand Down

0 comments on commit cd149c3

Please sign in to comment.