Merge pull request #783 from statping/dev

v0.90.62
pull/788/head^2
Hunter Long 2020-08-10 02:53:22 -07:00 committed by GitHub
commit 211ff3bdcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -18,11 +18,11 @@ var (
func (s *Service) Validate() error {
if s.Name == "" {
return errors.New("missing service name")
} else if s.Domain == "" {
} else if s.Domain == "" && s.Type != "static" {
return errors.New("missing domain name")
} else if s.Type == "" {
return errors.New("missing service type")
} else if s.Interval == 0 {
} else if s.Interval == 0 && s.Type != "static" {
return errors.New("missing check interval")
}
return nil

View File

@ -176,6 +176,7 @@ func Samples() error {
s7 := &Service{
Name: "Static Service",
Domain: "none",
Type: "static",
Order: 7,
Public: null.NewNullBool(true),