Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed Oct 27, 2023
2 parents a8e30c3 + 8a9a727 commit a0f858d
Show file tree
Hide file tree
Showing 27 changed files with 1,140 additions and 202 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.api
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18 as builder
FROM golang:1.19 as builder

COPY go.mod go.sum /go/src/github.com/moira-alert/moira/
WORKDIR /go/src/github.com/moira-alert/moira
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.checker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18 as builder
FROM golang:1.19 as builder

COPY go.mod go.sum /go/src/github.com/moira-alert/moira/
WORKDIR /go/src/github.com/moira-alert/moira
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18 as builder
FROM golang:1.19 as builder

COPY go.mod go.sum /go/src/github.com/moira-alert/moira/
WORKDIR /go/src/github.com/moira-alert/moira
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.filter
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18 as builder
FROM golang:1.19 as builder

COPY go.mod go.sum /go/src/github.com/moira-alert/moira/
WORKDIR /go/src/github.com/moira-alert/moira
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.notifier
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18 as builder
FROM golang:1.19 as builder

COPY go.mod go.sum /go/src/github.com/moira-alert/moira/
WORKDIR /go/src/github.com/moira-alert/moira
Expand Down
2 changes: 1 addition & 1 deletion api/controller/trigger_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func GetTriggerMetrics(dataBase moira.Database, metricSourceProvider *metricSour
for i, l := 0, len(timeSeries.Values); i < l; i++ {
timestamp := timeSeries.StartTime + int64(i)*timeSeries.StepTime
value := timeSeries.GetTimestampValue(timestamp)
if moira.IsValidFloat64(value) {
if moira.IsFiniteNumber(value) {
values = append(values, moira.MetricValue{Value: value, Timestamp: timestamp})
}
}
Expand Down
4 changes: 2 additions & 2 deletions api/handler/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func createNewContact(writer http.ResponseWriter, request *http.Request) {
}
userLogin := middleware.GetLogin(request)

if err := controller.CreateContact(database, contact, userLogin, ""); err != nil {
if err := controller.CreateContact(database, contact, userLogin, contact.TeamID); err != nil {
render.Render(writer, request, err) //nolint
return
}
Expand Down Expand Up @@ -176,7 +176,7 @@ func updateContact(writer http.ResponseWriter, request *http.Request) {
// @router /contact/{contactID} [delete]
func removeContact(writer http.ResponseWriter, request *http.Request) {
contactData := request.Context().Value(contactKey).(moira.ContactData)
err := controller.RemoveContact(database, contactData.ID, contactData.User, "")
err := controller.RemoveContact(database, contactData.ID, contactData.User, contactData.Team)
if err != nil {
render.Render(writer, request, err) //nolint
}
Expand Down
Loading

0 comments on commit a0f858d

Please sign in to comment.