diff --git a/obs-status-service/main.go b/obs-status-service/main.go index 80446fe..31087f1 100644 --- a/obs-status-service/main.go +++ b/obs-status-service/main.go @@ -41,6 +41,7 @@ const ( AppName = "obs-status-service" ) + var obs *common.ObsClient type RepoBuildCounters struct { @@ -271,8 +272,7 @@ func main() { res.WriteHeader(500) return } - res.WriteHeader(404) - res.Write([]byte("404 page not found\n")) + http.ServeFile(res, req, "static/index.html") }) http.HandleFunc("GET /status/{Project}", func(res http.ResponseWriter, req *http.Request) { mime := ParseMimeHeader(req) diff --git a/obs-status-service/static/index.html b/obs-status-service/static/index.html new file mode 100644 index 0000000..6ab8843 --- /dev/null +++ b/obs-status-service/static/index.html @@ -0,0 +1,100 @@ + + +
+ ++ This service reports build results from the openSUSE Build Service (OBS) + as easily embeddable SVG images. Repository build results are cached to + provide low-overhead access. +
+ +Requests for individual build results:
+/status/obs:project/package/repo/arch+
package, repo and arch are optional.
+ +Requests for project results:
+/status/obs:project+ +
+ By default, SVG output is generated. JSON and XML output are available
+ by setting the Accept request header.
+