Merge branch 'release-0.1'

This commit is contained in:
Fabian Reinartz 2016-03-15 21:50:23 +01:00
commit a024033c89
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,7 @@ CREATE TABLE IF NOT EXISTS alerts (
updated_at timestamp,
timeout integer
);
CREATE INDEX IF NOT EXISTS fingerprint ON alerts (fingerprint);
CREATE INDEX IF NOT EXISTS alerts_start ON alerts (starts_at);
CREATE INDEX IF NOT EXISTS alerts_end ON alerts (ends_at);
CREATE INDEX IF NOT EXISTS alerts_updated ON alerts (updated_at);
@ -600,6 +601,9 @@ func (s *Silences) Set(sil *types.Silence) (uint64, error) {
// Del implements the Silences interface.
func (s *Silences) Del(sid uint64) error {
dbmtx.Lock()
defer dbmtx.Unlock()
tx, err := s.db.Begin()
if err != nil {
return err

4
web.go
View File

@ -17,6 +17,7 @@ import (
"bytes"
"io"
"net/http"
_ "net/http/pprof" // Comment this line to disable pprof endpoint.
"path/filepath"
"github.com/prometheus/client_golang/prometheus"
@ -67,4 +68,7 @@ func RegisterWeb(r *route.Router) {
r.Get("/", ihf("index", func(w http.ResponseWriter, req *http.Request) {
serveAsset(w, req, "ui/app/index.html")
}))
r.Get("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
r.Post("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
}