aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/dashapi/dashapi.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go
index 9f90467ef..161794e9f 100644
--- a/dashboard/dashapi/dashapi.go
+++ b/dashboard/dashapi/dashapi.go
@@ -227,6 +227,29 @@ const (
BisectResultInfraError // the bisect failed due to an infrastructure problem
)
+func (flags JobDoneFlags) String() string {
+ if flags&BisectResultInfraError != 0 {
+ return "[infra failure]"
+ }
+ res := ""
+ if flags&BisectResultMerge != 0 {
+ res += "merge "
+ }
+ if flags&BisectResultNoop != 0 {
+ res += "no-op "
+ }
+ if flags&BisectResultRelease != 0 {
+ res += "release "
+ }
+ if flags&BisectResultIgnore != 0 {
+ res += "ignored "
+ }
+ if res == "" {
+ return res
+ }
+ return "[" + res + "commit]"
+}
+
func (dash *Dashboard) JobPoll(req *JobPollReq) (*JobPollResp, error) {
resp := new(JobPollResp)
err := dash.Query("job_poll", req, resp)