Skip to content

Commit

Permalink
fixed webhook notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlong committed May 2, 2019
1 parent a0b955f commit 87c4052
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ $('.toggle-service').on('click',function(e) {
let obj = $(this);
let serviceId = obj.attr("data-id");
let online = obj.attr("data-online");
let d = confirm("Do you want to stop this service?");
let d = confirm("Do you want to "+online ? "stop" : "start"+" checking this service?");
if (d) {
$.ajax({
url: "/api/services/" + serviceId + "/running",
Expand Down
2 changes: 1 addition & 1 deletion source/wiki.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func ToInt(s interface{}) int64 {
// Input: {"name": "%service.Name", "domain": "%service.Domain"}
// Output: {"name": "Google DNS", "domain": "8.8.8.8"}
func ConvertInterface(in string, obj interface{}) string {
if reflect.ValueOf(obj).IsNil() {
return in
}
s := reflect.ValueOf(obj).Elem()
typeOfT := s.Type()
for i := 0; i < s.NumField(); i++ {
Expand Down

0 comments on commit 87c4052

Please sign in to comment.