diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eb49a14..e0127ded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.90.51 (06-15-2020) +- Fix Theme Editor codemirror inputs to show on load +- Added favicon folder for local assets can be used without remote access +- Modified Notifier's to return the response as a string for the frontend +- Modified Notifiers so they can use custom data for their request +- Added Notifier OnSuccess and onFailure custom data on frontend + # 0.90.50 (06-13-2020) - Removed PORT, replaced with SERVER_PORT - Removed HOST/IP, replaced with SERVER_IP diff --git a/handlers/api_test.go b/handlers/api_test.go index 214db7af..2b456acf 100644 --- a/handlers/api_test.go +++ b/handlers/api_test.go @@ -250,7 +250,7 @@ func TestMainApiRoutes(t *testing.T) { `go_memstats_alloc_bytes`, `http_duration_seconds_count`, `http_response_bytes_count`, - `service_request_duration_count`, + `service_success`, }, }, } diff --git a/notifiers/notifiers_test.go b/notifiers/notifiers_test.go index 82dee0f9..a2d56ad6 100644 --- a/notifiers/notifiers_test.go +++ b/notifiers/notifiers_test.go @@ -2,15 +2,17 @@ package notifiers import ( "github.com/magiconair/properties/assert" + "github.com/statping/statping/types/failures" + "github.com/statping/statping/types/services" "testing" ) func TestReplaceTemplate(t *testing.T) { temp := `{"id":{{.Service.Id}},"name":"{{.Service.Name}}"}` - replaced := ReplaceTemplate(temp, replacer{Service: exampleService}) - assert.Equal(t, `{"id":1,"name":"Statping"}`, replaced) + replaced := ReplaceTemplate(temp, replacer{Service: services.Example(true)}) + assert.Equal(t, `{"id":6283,"name":"Statping"}`, replaced) temp = `{"id":{{.Service.Id}},"name":"{{.Service.Name}}","failure":"{{.Failure.Issue}}"}` - replaced = ReplaceTemplate(temp, replacer{Service: exampleService, Failure: exampleFailure}) - assert.Equal(t, `{"id":1,"name":"Statping","failure":"HTTP returned a 500 status code"}`, replaced) + replaced = ReplaceTemplate(temp, replacer{Service: services.Example(false), Failure: failures.Example()}) + assert.Equal(t, `{"id":6283,"name":"Statping","failure":"HTTP returned a 500 status code"}`, replaced) } diff --git a/version.txt b/version.txt index f2a48cdb..dbfd2f3b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.90.50 +0.90.51