Merge branch 'master' into mysql-patch

pull/191/head
Hunter Long 2019-06-06 12:16:28 -07:00 committed by GitHub
commit 043946245d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 370 additions and 227 deletions

View File

@ -232,6 +232,7 @@ dev-deps:
$(GOGET) github.com/ararog/timeago
$(GOGET) gopkg.in/natefinch/lumberjack.v2
$(GOGET) golang.org/x/crypto/bcrypt
$(GOGET) github.com/99designs/gqlgen
# remove files for a clean compile/build
clean:
@ -261,6 +262,7 @@ tag:
generate:
cd source && go generate
cd handlers/graphql && go generate
# compress built binaries into tar.gz and zip formats
compress:

View File

@ -122,10 +122,18 @@ func (s *Service) dnsCheck() (float64, error) {
return subTime, err
}
func isIPv6(address string) bool {
return strings.Count(address, ":") >= 2
}
// checkIcmp will send a ICMP ping packet to the service
func (s *Service) checkIcmp(record bool) *Service {
p := fastping.NewPinger()
ra, err := net.ResolveIPAddr("ip4:icmp", s.Domain)
resolveIP := "ip4:icmp"
if isIPv6(s.Domain) {
resolveIP = "ip6:icmp"
}
ra, err := net.ResolveIPAddr(resolveIP, s.Domain)
if err != nil {
recordFailure(s, fmt.Sprintf("Could not send ICMP to service %v, %v", s.Domain, err))
return s
@ -158,17 +166,20 @@ func (s *Service) checkTcp(record bool) *Service {
domain := fmt.Sprintf("%v", s.Domain)
if s.Port != 0 {
domain = fmt.Sprintf("%v:%v", s.Domain, s.Port)
if isIPv6(s.Domain) {
domain = fmt.Sprintf("[%v]:%v", s.Domain, s.Port)
}
}
conn, err := net.DialTimeout(s.Type, domain, time.Duration(s.Timeout)*time.Second)
if err != nil {
if record {
recordFailure(s, fmt.Sprintf("%v Dial Error %v", s.Type, err))
recordFailure(s, fmt.Sprintf("Dial Error %v", err))
}
return s
}
if err := conn.Close(); err != nil {
if record {
recordFailure(s, fmt.Sprintf("TCP Socket Close Error %v", err))
recordFailure(s, fmt.Sprintf("%v Socket Close Error %v", strings.ToUpper(s.Type), err))
}
return s
}

View File

@ -2899,7 +2899,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
@ -2923,7 +2923,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
res := resTmp.(*introspection.Schema)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Schema2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionSchema(ctx, field.Selections, res)
return ec.marshalO__Schema2githubcom99designsgqlgengraphqlintrospectionSchema(ctx, field.Selections, res)
}
func (ec *executionContext) _Service_id(ctx context.Context, field graphql.CollectedField, obj *types.Service) graphql.Marshaler {
@ -3970,7 +3970,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
res := resTmp.([]introspection.InputValue)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx, field.Selections, res)
return ec.marshalN__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx, field.Selections, res)
}
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
@ -4150,7 +4150,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
res := resTmp.([]introspection.InputValue)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx, field.Selections, res)
return ec.marshalN__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx, field.Selections, res)
}
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
@ -4177,7 +4177,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
@ -4306,7 +4306,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
@ -4357,7 +4357,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
res := resTmp.([]introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
@ -4384,7 +4384,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
@ -4408,7 +4408,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
@ -4432,7 +4432,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
@ -4459,7 +4459,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap
res := resTmp.([]introspection.Directive)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalN__Directive2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionDirective(ctx, field.Selections, res)
return ec.marshalN__Directive2githubcom99designsgqlgengraphqlintrospectionDirective(ctx, field.Selections, res)
}
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
@ -4565,7 +4565,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
res := resTmp.([]introspection.Field)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Field2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionField(ctx, field.Selections, res)
return ec.marshalO__Field2githubcom99designsgqlgengraphqlintrospectionField(ctx, field.Selections, res)
}
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
@ -4589,7 +4589,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq
res := resTmp.([]introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
@ -4613,7 +4613,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
res := resTmp.([]introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
@ -4644,7 +4644,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
res := resTmp.([]introspection.EnumValue)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__EnumValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionEnumValue(ctx, field.Selections, res)
return ec.marshalO__EnumValue2githubcom99designsgqlgengraphqlintrospectionEnumValue(ctx, field.Selections, res)
}
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
@ -4668,7 +4668,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
res := resTmp.([]introspection.InputValue)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx, field.Selections, res)
return ec.marshalO__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx, field.Selections, res)
}
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
@ -4692,7 +4692,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
res := resTmp.(*introspection.Type)
rctx.Result = res
ctx = ec.Tracer.StartFieldChildExecution(ctx)
return ec.marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
return ec.marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, field.Selections, res)
}
// endregion **************************** field.gotpl *****************************
@ -4710,7 +4710,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
var checkinImplementors = []string{"Checkin"}
func (ec *executionContext) _Checkin(ctx context.Context, sel ast.SelectionSet, obj *types.Checkin) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, checkinImplementors)
fields := graphql.CollectFields(ctx, sel, checkinImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -4804,7 +4804,7 @@ func (ec *executionContext) _Checkin(ctx context.Context, sel ast.SelectionSet,
var checkinHitImplementors = []string{"CheckinHit"}
func (ec *executionContext) _CheckinHit(ctx context.Context, sel ast.SelectionSet, obj *types.CheckinHit) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, checkinHitImplementors)
fields := graphql.CollectFields(ctx, sel, checkinHitImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -4841,7 +4841,7 @@ func (ec *executionContext) _CheckinHit(ctx context.Context, sel ast.SelectionSe
var coreImplementors = []string{"Core"}
func (ec *executionContext) _Core(ctx context.Context, sel ast.SelectionSet, obj *types.Core) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, coreImplementors)
fields := graphql.CollectFields(ctx, sel, coreImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -4940,7 +4940,7 @@ func (ec *executionContext) _Core(ctx context.Context, sel ast.SelectionSet, obj
var failureImplementors = []string{"Failure"}
func (ec *executionContext) _Failure(ctx context.Context, sel ast.SelectionSet, obj *types.Failure) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, failureImplementors)
fields := graphql.CollectFields(ctx, sel, failureImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -4997,7 +4997,7 @@ func (ec *executionContext) _Failure(ctx context.Context, sel ast.SelectionSet,
var groupImplementors = []string{"Group"}
func (ec *executionContext) _Group(ctx context.Context, sel ast.SelectionSet, obj *types.Group) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, groupImplementors)
fields := graphql.CollectFields(ctx, sel, groupImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5058,7 +5058,7 @@ func (ec *executionContext) _Group(ctx context.Context, sel ast.SelectionSet, ob
var messageImplementors = []string{"Message"}
func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, obj *types.Message) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, messageImplementors)
fields := graphql.CollectFields(ctx, sel, messageImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5162,7 +5162,7 @@ func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet,
var queryImplementors = []string{"Query"}
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, queryImplementors)
fields := graphql.CollectFields(ctx, sel, queryImplementors)
ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
Object: "Query",
@ -5328,7 +5328,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
var serviceImplementors = []string{"Service"}
func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, obj *types.Service) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, serviceImplementors)
fields := graphql.CollectFields(ctx, sel, serviceImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5563,7 +5563,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet,
var userImplementors = []string{"User"}
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *types.User) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, userImplementors)
fields := graphql.CollectFields(ctx, sel, userImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5634,7 +5634,7 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
var __DirectiveImplementors = []string{"__Directive"}
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, __DirectiveImplementors)
fields := graphql.CollectFields(ctx, sel, __DirectiveImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5673,7 +5673,7 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS
var __EnumValueImplementors = []string{"__EnumValue"}
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, __EnumValueImplementors)
fields := graphql.CollectFields(ctx, sel, __EnumValueImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5709,7 +5709,7 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
var __FieldImplementors = []string{"__Field"}
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, __FieldImplementors)
fields := graphql.CollectFields(ctx, sel, __FieldImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5755,7 +5755,7 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
var __InputValueImplementors = []string{"__InputValue"}
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, __InputValueImplementors)
fields := graphql.CollectFields(ctx, sel, __InputValueImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5791,7 +5791,7 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
var __SchemaImplementors = []string{"__Schema"}
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, __SchemaImplementors)
fields := graphql.CollectFields(ctx, sel, __SchemaImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -5832,7 +5832,7 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet,
var __TypeImplementors = []string{"__Type"}
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
fields := graphql.CollectFields(ec.RequestContext, sel, __TypeImplementors)
fields := graphql.CollectFields(ctx, sel, __TypeImplementors)
out := graphql.NewFieldSet(fields)
invalid := false
@ -6151,11 +6151,11 @@ func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋhunterlongᚋstatp
return ret
}
func (ec *executionContext) marshalN__Directive2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
func (ec *executionContext) marshalN__Directive2githubcom99designsgqlgengraphqlintrospectionDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
return ec.___Directive(ctx, sel, &v)
}
func (ec *executionContext) marshalN__Directive2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionDirective(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
func (ec *executionContext) marshalN__Directive2githubcom99designsgqlgengraphqlintrospectionDirective(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@ -6179,7 +6179,7 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋhunterlongᚋs
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Directive2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionDirective(ctx, sel, v[i])
ret[i] = ec.marshalN__Directive2githubcom99designsgqlgengraphqlintrospectionDirective(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6257,19 +6257,19 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Co
return ret
}
func (ec *executionContext) marshalN__EnumValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
func (ec *executionContext) marshalN__EnumValue2githubcom99designsgqlgengraphqlintrospectionEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
return ec.___EnumValue(ctx, sel, &v)
}
func (ec *executionContext) marshalN__Field2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
func (ec *executionContext) marshalN__Field2githubcom99designsgqlgengraphqlintrospectionField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
return ec.___Field(ctx, sel, &v)
}
func (ec *executionContext) marshalN__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
func (ec *executionContext) marshalN__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
return ec.___InputValue(ctx, sel, &v)
}
func (ec *executionContext) marshalN__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
func (ec *executionContext) marshalN__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@ -6293,7 +6293,7 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋhunterlongᚋ
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx, sel, v[i])
ret[i] = ec.marshalN__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6306,11 +6306,11 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋhunterlongᚋ
return ret
}
func (ec *executionContext) marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
func (ec *executionContext) marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
return ec.___Type(ctx, sel, &v)
}
func (ec *executionContext) marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
func (ec *executionContext) marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@ -6334,7 +6334,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋhunterlongᚋstatpi
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, sel, v[i])
ret[i] = ec.marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6347,7 +6347,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋhunterlongᚋstatpi
return ret
}
func (ec *executionContext) marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
func (ec *executionContext) marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
if v == nil {
if !ec.HasError(graphql.GetResolverContext(ctx)) {
ec.Errorf(ctx, "must not be null")
@ -6579,7 +6579,7 @@ func (ec *executionContext) marshalOUser2ᚖgithubᚗcomᚋhunterlongᚋstatping
return ec._User(ctx, sel, v)
}
func (ec *executionContext) marshalO__EnumValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionEnumValue(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
func (ec *executionContext) marshalO__EnumValue2githubcom99designsgqlgengraphqlintrospectionEnumValue(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
if v == nil {
return graphql.Null
}
@ -6606,7 +6606,7 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋhunterlongᚋs
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__EnumValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionEnumValue(ctx, sel, v[i])
ret[i] = ec.marshalN__EnumValue2githubcom99designsgqlgengraphqlintrospectionEnumValue(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6619,7 +6619,7 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋhunterlongᚋs
return ret
}
func (ec *executionContext) marshalO__Field2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionField(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
func (ec *executionContext) marshalO__Field2githubcom99designsgqlgengraphqlintrospectionField(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
if v == nil {
return graphql.Null
}
@ -6646,7 +6646,7 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋhunterlongᚋstatp
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Field2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionField(ctx, sel, v[i])
ret[i] = ec.marshalN__Field2githubcom99designsgqlgengraphqlintrospectionField(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6659,7 +6659,7 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋhunterlongᚋstatp
return ret
}
func (ec *executionContext) marshalO__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
func (ec *executionContext) marshalO__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
if v == nil {
return graphql.Null
}
@ -6686,7 +6686,7 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋhunterlongᚋ
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__InputValue2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionInputValue(ctx, sel, v[i])
ret[i] = ec.marshalN__InputValue2githubcom99designsgqlgengraphqlintrospectionInputValue(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6699,22 +6699,22 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋhunterlongᚋ
return ret
}
func (ec *executionContext) marshalO__Schema2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler {
func (ec *executionContext) marshalO__Schema2githubcom99designsgqlgengraphqlintrospectionSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler {
return ec.___Schema(ctx, sel, &v)
}
func (ec *executionContext) marshalO__Schema2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
func (ec *executionContext) marshalO__Schema2githubcom99designsgqlgengraphqlintrospectionSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec.___Schema(ctx, sel, v)
}
func (ec *executionContext) marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
func (ec *executionContext) marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
return ec.___Type(ctx, sel, &v)
}
func (ec *executionContext) marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
func (ec *executionContext) marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
if v == nil {
return graphql.Null
}
@ -6741,7 +6741,7 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋhunterlongᚋstatpi
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx, sel, v[i])
ret[i] = ec.marshalN__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx, sel, v[i])
}
if isLen1 {
f(i)
@ -6754,7 +6754,7 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋhunterlongᚋstatpi
return ret
}
func (ec *executionContext) marshalO__Type2githubcomhunterlongstatpingvendorgithubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
func (ec *executionContext) marshalO__Type2githubcom99designsgqlgengraphqlintrospectionType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
if v == nil {
return graphql.Null
}

View File

@ -88,7 +88,7 @@ func Router() *mux.Router {
r.Handle("/settings/bulk_import", authenticated(bulkImportHandler, true)).Methods("POST")
// SERVICE Routes
r.Handle("/services", http.HandlerFunc(servicesHandler)).Methods("GET")
r.Handle("/services", authenticated(servicesHandler, true)).Methods("GET")
r.Handle("/service/{id}", http.HandlerFunc(servicesViewHandler)).Methods("GET")
r.Handle("/service/{id}/edit", authenticated(servicesViewHandler, true)).Methods("GET")
r.Handle("/service/{id}/delete_failures", authenticated(servicesDeleteFailuresHandler, true)).Methods("GET")
@ -101,7 +101,7 @@ func Router() *mux.Router {
r.Handle("/api/groups/{id}", readOnly(apiGroupHandler, false)).Methods("GET")
r.Handle("/api/groups/{id}", authenticated(apiGroupUpdateHandler, false)).Methods("POST")
r.Handle("/api/groups/{id}", authenticated(apiGroupDeleteHandler, false)).Methods("DELETE")
r.Handle("/api/groups/reorder", authenticated(apiGroupReorderHandler, false)).Methods("POST")
r.Handle("/api/reorder/groups", authenticated(apiGroupReorderHandler, false)).Methods("POST")
// API Routes
r.Handle("/api", authenticated(apiIndexHandler, false))
@ -112,7 +112,7 @@ func Router() *mux.Router {
r.Handle("/api/services", readOnly(apiAllServicesHandler, false)).Methods("GET")
r.Handle("/api/services", authenticated(apiCreateServiceHandler, false)).Methods("POST")
r.Handle("/api/services/{id}", readOnly(apiServiceHandler, false)).Methods("GET")
r.Handle("/api/services/reorder", authenticated(reorderServiceHandler, false)).Methods("POST")
r.Handle("/api/reorder/services", authenticated(reorderServiceHandler, false)).Methods("POST")
r.Handle("/api/services/{id}/running", authenticated(apiServiceRunningHandler, false)).Methods("POST")
r.Handle("/api/services/{id}/data", cached("30s", "application/json", http.HandlerFunc(apiServiceDataHandler))).Methods("GET")
r.Handle("/api/services/{id}/ping", cached("30s", "application/json", http.HandlerFunc(apiServicePingDataHandler))).Methods("GET")

View File

@ -7,54 +7,66 @@
/* Mobile Service Container */
HTML, BODY {
background-color: #fcfcfc;
padding-bottom: 10px; }
padding-bottom: 10px;
}
.container {
padding-top: 20px;
padding-bottom: 25px;
max-width: 860px;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
.header-title {
color: #464646; }
color: #464646;
}
.header-desc {
color: #939393; }
color: #939393;
}
.btn {
border-radius: 0.2rem; }
border-radius: 0.2rem;
}
.online_list .badge {
margin-top: 0.2rem; }
margin-top: 0.2rem;
}
.navbar {
margin-bottom: 30px; }
margin-bottom: 30px;
}
.btn-sm {
line-height: 1.3;
font-size: 0.75rem; }
font-size: 0.75rem;
}
.view_service_btn {
position: absolute;
bottom: -40px;
right: 40px; }
right: 40px;
}
.service_lower_info {
position: absolute;
bottom: -40px;
left: 40px;
color: #d1ffca;
font-size: 0.85rem; }
font-size: 0.85rem;
}
.lg_number {
font-size: 2.3rem;
font-weight: bold;
display: block;
color: #4f4f4f; }
color: #4f4f4f;
}
.stats_area {
text-align: center;
color: #a5a5a5; }
color: #a5a5a5;
}
.lower_canvas {
height: 3.4rem;
@ -62,82 +74,101 @@ HTML, BODY {
background-color: #48d338;
padding: 15px 10px;
margin-left: 0px !important;
margin-right: 0px !important; }
margin-right: 0px !important;
}
.lower_canvas SPAN {
font-size: 1rem;
color: #fff; }
color: #fff;
}
.footer {
text-decoration: none;
margin-top: 20px; }
margin-top: 20px;
}
.footer A {
color: #8d8d8d;
text-decoration: none; }
text-decoration: none;
}
.footer A:HOVER {
color: #6d6d6d; }
color: #6d6d6d;
}
.badge {
color: white;
border-radius: 0.2rem; }
border-radius: 0.2rem;
}
.btn-group {
height: 25px; }
.btn-group A {
padding: 0.1rem .75rem;
font-size: 0.8rem; }
height: 25px;
}
.btn-group A {
padding: 0.1rem 0.75rem;
font-size: 0.8rem;
}
.card-body .badge {
color: #fff; }
color: #fff;
}
.nav-pills .nav-link {
border-radius: 0.2rem; }
border-radius: 0.2rem;
}
.form-control {
border-radius: 0.2rem; }
border-radius: 0.2rem;
}
.card {
background-color: #ffffff;
border: 1px solid rgba(0, 0, 0, 0.125); }
border: 1px solid rgba(0, 0, 0, 0.125);
}
.card-body {
overflow: hidden; }
overflow: hidden;
}
.card-body H4 A {
color: #444444;
text-decoration: none; }
text-decoration: none;
}
.chart-container {
position: relative;
height: 170px;
width: 100%;
overflow: hidden; }
overflow: hidden;
}
.service-chart-container {
position: relative;
height: 400px;
width: 100%; }
width: 100%;
}
.service-chart-heatmap {
position: relative;
height: 300px;
width: 100%; }
width: 100%;
}
.inputTags-field {
border: 0;
background-color: transparent;
padding-top: .13rem; }
padding-top: 0.13rem;
}
input.inputTags-field:focus {
outline-width: 0; }
outline-width: 0;
}
.inputTags-list {
display: block;
width: 100%;
min-height: calc(2.25rem + 2px);
padding: .2rem .35rem;
padding: 0.2rem 0.35rem;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
@ -145,8 +176,9 @@ input.inputTags-field:focus {
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: .25rem;
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; }
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.inputTags-item {
background-color: #3aba39;
@ -154,63 +186,81 @@ input.inputTags-field:focus {
padding: 5px 8px;
font-size: 10pt;
color: white;
border-radius: 4px; }
border-radius: 4px;
}
.inputTags-item .close-item {
margin-left: 6px;
font-size: 13pt;
font-weight: bold;
cursor: pointer; }
cursor: pointer;
}
.btn-primary {
background-color: #3e9bff;
border-color: #006fe6;
color: white; }
.btn-primary.dyn-dark {
background-color: #32a825 !important;
border-color: #2c9320 !important; }
.btn-primary.dyn-light {
background-color: #75de69 !important;
border-color: #88e37e !important; }
color: white;
}
.btn-primary.dyn-dark {
background-color: #32a825 !important;
border-color: #2c9320 !important;
}
.btn-primary.dyn-light {
background-color: #75de69 !important;
border-color: #88e37e !important;
}
.btn-success {
background-color: #47d337; }
.btn-success.dyn-dark {
background-color: #32a825 !important;
border-color: #2c9320 !important; }
.btn-success.dyn-light {
background-color: #75de69 !important;
border-color: #88e37e !important; }
background-color: #47d337;
}
.btn-success.dyn-dark {
background-color: #32a825 !important;
border-color: #2c9320 !important;
}
.btn-success.dyn-light {
background-color: #75de69 !important;
border-color: #88e37e !important;
}
.btn-danger {
background-color: #dd3545; }
.btn-danger.dyn-dark {
background-color: #b61f2d !important;
border-color: #a01b28 !important; }
.btn-danger.dyn-light {
background-color: #e66975 !important;
border-color: #e97f89 !important; }
background-color: #dd3545;
}
.btn-danger.dyn-dark {
background-color: #b61f2d !important;
border-color: #a01b28 !important;
}
.btn-danger.dyn-light {
background-color: #e66975 !important;
border-color: #e97f89 !important;
}
.bg-success {
background-color: #47d337 !important; }
background-color: #47d337 !important;
}
.bg-danger {
background-color: #dd3545 !important; }
background-color: #dd3545 !important;
}
.bg-success .dyn-dark {
background-color: #35b027 !important; }
background-color: #35b027 !important;
}
.bg-danger .dyn-dark {
background-color: #bf202f !important; }
background-color: #bf202f !important;
}
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
background-color: #13a00d; }
background-color: #13a00d;
}
.nav-pills A {
color: #424242; }
color: #424242;
}
.nav-pills I {
margin-right: 10px; }
margin-right: 10px;
}
.CodeMirror {
/* Bootstrap Settings */
@ -230,23 +280,26 @@ input.inputTags-field:focus {
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
/* Code Mirror Settings */
font-family: monospace;
position: relative;
overflow: hidden;
height: 80vh; }
height: 80vh;
}
.CodeMirror-focused {
/* Bootstrap Settings */
border-color: #66afe9;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; }
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
.switch {
font-size: 1rem;
position: relative; }
position: relative;
}
.switch input {
position: absolute;
@ -257,7 +310,8 @@ input.inputTags-field:focus {
clip: rect(0 0 0 0);
clip-path: inset(50%);
overflow: hidden;
padding: 0; }
padding: 0;
}
.switch input + label {
position: relative;
@ -270,23 +324,26 @@ input.inputTags-field:focus {
outline: none;
user-select: none;
vertical-align: middle;
text-indent: calc(calc(calc(2.375rem * .8) * 2) + .5rem); }
text-indent: calc(calc(calc(2.375rem * .8) * 2) + .5rem);
}
.switch input + label::before,
.switch input + label::after {
content: '';
content: "";
position: absolute;
top: 0;
left: 0;
width: calc(calc(2.375rem * .8) * 2);
bottom: 0;
display: block; }
display: block;
}
.switch input + label::before {
right: 0;
background-color: #dee2e6;
border-radius: calc(2.375rem * .8);
transition: 0.2s all; }
transition: 0.2s all;
}
.switch input + label::after {
top: 2px;
@ -295,120 +352,154 @@ input.inputTags-field:focus {
height: calc(calc(2.375rem * .8) - calc(2px * 2));
border-radius: 50%;
background-color: white;
transition: 0.2s all; }
transition: 0.2s all;
}
.switch input:checked + label::before {
background-color: #08d; }
background-color: #08d;
}
.switch input:checked + label::after {
margin-left: calc(2.375rem * .8); }
margin-left: calc(2.375rem * .8);
}
.switch input:focus + label::before {
outline: none;
box-shadow: 0 0 0 0.2rem rgba(0, 136, 221, 0.25); }
box-shadow: 0 0 0 0.2rem rgba(0, 136, 221, 0.25);
}
.switch input:disabled + label {
color: #868e96;
cursor: not-allowed; }
cursor: not-allowed;
}
.switch input:disabled + label::before {
background-color: #e9ecef; }
background-color: #e9ecef;
}
.switch.switch-sm {
font-size: 0.875rem; }
font-size: 0.875rem;
}
.switch.switch-sm input + label {
min-width: calc(calc(1.9375rem * .8) * 2);
height: calc(1.9375rem * .8);
line-height: calc(1.9375rem * .8);
text-indent: calc(calc(calc(1.9375rem * .8) * 2) + .5rem); }
text-indent: calc(calc(calc(1.9375rem * .8) * 2) + .5rem);
}
.switch.switch-sm input + label::before {
width: calc(calc(1.9375rem * .8) * 2); }
width: calc(calc(1.9375rem * .8) * 2);
}
.switch.switch-sm input + label::after {
width: calc(calc(1.9375rem * .8) - calc(2px * 2));
height: calc(calc(1.9375rem * .8) - calc(2px * 2)); }
height: calc(calc(1.9375rem * .8) - calc(2px * 2));
}
.switch.switch-sm input:checked + label::after {
margin-left: calc(1.9375rem * .8); }
margin-left: calc(1.9375rem * .8);
}
.switch.switch-lg {
font-size: 1.25rem; }
font-size: 1.25rem;
}
.switch.switch-lg input + label {
min-width: calc(calc(3rem * .8) * 2);
height: calc(3rem * .8);
line-height: calc(3rem * .8);
text-indent: calc(calc(calc(3rem * .8) * 2) + .5rem); }
text-indent: calc(calc(calc(3rem * .8) * 2) + .5rem);
}
.switch.switch-lg input + label::before {
width: calc(calc(3rem * .8) * 2); }
width: calc(calc(3rem * .8) * 2);
}
.switch.switch-lg input + label::after {
width: calc(calc(3rem * .8) - calc(2px * 2));
height: calc(calc(3rem * .8) - calc(2px * 2)); }
height: calc(calc(3rem * .8) - calc(2px * 2));
}
.switch.switch-lg input:checked + label::after {
margin-left: calc(3rem * .8); }
margin-left: calc(3rem * .8);
}
.switch + .switch {
margin-left: 1rem; }
margin-left: 1rem;
}
@keyframes pulse_animation {
0% {
transform: scale(1); }
transform: scale(1);
}
30% {
transform: scale(1); }
transform: scale(1);
}
40% {
transform: scale(1.02); }
transform: scale(1.02);
}
50% {
transform: scale(1); }
transform: scale(1);
}
60% {
transform: scale(1); }
transform: scale(1);
}
70% {
transform: scale(1.05); }
transform: scale(1.05);
}
80% {
transform: scale(1); }
transform: scale(1);
}
100% {
transform: scale(1); } }
transform: scale(1);
}
}
.pulse {
animation-name: pulse_animation;
animation-duration: 1500ms;
transform-origin: 70% 70%;
animation-iteration-count: infinite;
animation-timing-function: linear; }
animation-timing-function: linear;
}
@keyframes glow-grow {
0% {
opacity: 0;
transform: scale(1); }
transform: scale(1);
}
80% {
opacity: 1; }
opacity: 1;
}
100% {
transform: scale(2);
opacity: 0; } }
opacity: 0;
}
}
.pulse-glow {
animation-name: glow-grown;
animation-duration: 100ms;
transform-origin: 70% 30%;
animation-iteration-count: infinite;
animation-timing-function: linear; }
animation-timing-function: linear;
}
.pulse-glow:before,
.pulse-glow:after {
position: absolute;
content: '';
height: 0.5rem;
width: 1.75rem;
top: 1.2rem;
content: "";
height: 0.4rem;
width: 1.7rem;
top: 1.3rem;
right: 2.15rem;
border-radius: 0;
box-shadow: 0 0 7px #47d337;
animation: glow-grow 2s ease-out infinite; }
box-shadow: 0 0 6px #47d337;
animation: glow-grow 2s ease-out infinite;
}
.sortable_drag {
background-color: #0000000f; }
background-color: #0000000f;
}
.drag_icon {
cursor: move;
@ -422,112 +513,139 @@ input.inputTags-field:focus {
margin-right: 5px;
margin-left: -10px;
text-align: center;
color: #b1b1b1; }
color: #b1b1b1;
}
/* (Optional) Apply a "closed-hand" cursor during drag operation. */
.drag_icon:active {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing; }
cursor: -webkit-grabbing;
}
.switch_btn {
float: right;
margin: -1px 0px 0px 0px;
display: block; }
display: block;
}
#start_container {
position: absolute;
z-index: 99999;
margin-top: 20px; }
margin-top: 20px;
}
#end_container {
position: absolute;
z-index: 99999;
margin-top: 20px;
right: 0; }
right: 0;
}
.pointer {
cursor: pointer; }
cursor: pointer;
}
.jumbotron {
background-color: white; }
background-color: white;
}
.toggle-service {
font-size: 18pt;
float: left;
margin: 2px 3px 0 0;
cursor: pointer; }
cursor: pointer;
}
@media (max-width: 767px) {
HTML, BODY {
background-color: #fcfcfc; }
background-color: #fcfcfc;
}
.sm-container {
margin-top: 0px !important;
padding: 0 !important; }
padding: 0 !important;
}
.list-group-item H5 {
font-size: 0.9rem; }
font-size: 0.9rem;
}
.container {
padding: 0px !important;
padding-top: 15px !important; }
padding-top: 15px !important;
}
.group_header {
margin-left: 15px; }
margin-left: 15px;
}
.navbar {
margin-left: 0px;
margin-top: 0px;
width: 100%;
margin-bottom: 0; }
margin-bottom: 0;
}
.btn-sm {
line-height: 0.9rem;
font-size: 0.65rem; }
font-size: 0.65rem;
}
.full-col-12 {
padding-left: 0px;
padding-right: 0px; }
padding-right: 0px;
}
.card {
border: 0;
border-radius: 0rem;
padding: 0;
background-color: #ffffff; }
background-color: #ffffff;
}
.card-body {
font-size: 10pt;
padding: 0px 10px; }
padding: 0px 10px;
}
.lg_number {
font-size: 7.8vw; }
font-size: 7.8vw;
}
.stats_area {
margin-top: 1.5rem !important;
margin-bottom: 1.5rem !important; }
margin-bottom: 1.5rem !important;
}
.stats_area .col-4 {
padding-left: 0;
padding-right: 0;
font-size: 0.6rem; }
font-size: 0.6rem;
}
.list-group-item {
border-top: 1px solid #e4e4e4;
border: 0px; }
border: 0px;
}
.list-group-item:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0; }
border-top-right-radius: 0;
}
.list-group-item:last-child {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0; }
border-bottom-left-radius: 0;
}
.list-group-item P {
font-size: 0.7rem; }
font-size: 0.7rem;
}
.service-chart-container {
height: 200px; } }
height: 200px;
}
}
/*# sourceMappingURL=base.css.map */

View File

@ -313,7 +313,6 @@ $('form.ajax_form').on('submit', function() {
arrayData.push(newArr)
});
let sendData = JSON.stringify(newArr);
// console.log('sending '+method.toUpperCase()+' '+action+':', sendData);
$.ajax({
url: action,
type: method,
@ -405,8 +404,24 @@ $(function() {
$('.confirm-btn').on('click', function() {
var r = confirm('Are you sure you want to delete?');
let obj = $(this);
let redirect = obj.attr('data-redirect');
let href = obj.attr('href');
let method = obj.attr('data-method');
let data = obj.attr('data-object');
if (r === true) {
return true;
$.ajax({
url: href,
type: method,
data: data ? data : null,
success: function (data) {
console.log("send to url: ", href);
if (redirect) {
window.location.href = redirect;
}
return false;
}
});
} else {
return false;
}

View File

@ -459,15 +459,15 @@ input.inputTags-field:focus {
.pulse-glow:before,
.pulse-glow:after {
position: absolute;
content: '';
height: 0.5rem;
width: 1.75rem;
top: 1.2rem;
right: 2.15rem;
border-radius: 0;
box-shadow: 0 0 7px #47d337;
animation: glow-grow 2s ease-out infinite;
position: absolute;
content: "";
height: 0.4rem;
width: 1.7rem;
top: 1.3rem;
right: 2.15rem;
border-radius: 0;
box-shadow: 0 0 6px #47d337;
animation: glow-grow 2s ease-out infinite;
}
.sortable_drag {

View File

@ -56,7 +56,7 @@
<div class="form-group row{{if (eq .Type "tcp") or (eq .Type "udp")}} d-none{{end}}">
<label for="headers" class="col-sm-4 col-form-label">HTTP Headers</label>
<div class="col-sm-8">
<input name="headers" class="input-tags form-control" id="headers" autocapitalize="none" spellcheck="false" placeholder='Authorization=1010101,Content-Type=application/json' value="{{.Headers.String}}">
<input name="headers" class="form-control" id="headers" autocapitalize="none" spellcheck="false" placeholder='Authorization=1010101,Content-Type=application/json' value="{{.Headers.String}}">
<small class="form-text text-muted">Comma delimited list of HTTP Headers (KEY=VALUE,KEY=VALUE)</small>
</div>
</div>
@ -74,7 +74,7 @@
<small class="form-text text-muted">A status code of 200 is success, or view all the <a target="_blank" href="https://www.restapitutorial.com/httpstatuscodes.html">HTTP Status Codes</a></small>
</div>
</div>
<div class="form-group row{{if (ne .Type "tcp") and (ne .Type "udp")}} d-none{{end}}">
<div class="form-group row{{if (ne .Type "tcp") and (ne .Type "udp") and (ne .Type "icmp")}} d-none{{end}}">
<label for="port" class="col-sm-4 col-form-label">TCP Port</label>
<div class="col-sm-8">
<input type="number" name="port" class="form-control" value="{{if ne .Port 0}}{{.Port}}{{end}}" id="service_port" placeholder="8080">
@ -146,7 +146,7 @@
</div>
{{if ne .Id 0}}
<div class="col-6">
<a href="/service/{{ .Id }}/delete_failures" class="btn btn-danger btn-block confirm-btn">Delete All Failures</a>
<a href="/service/{{ .Id }}/delete_failures" data-method="GET" data-redirect="/service/{{ .Id }}" class="btn btn-danger btn-block confirm-btn">Delete All Failures</a>
</div>
{{end}}
</div>

View File

@ -205,11 +205,8 @@
{{$s := .Service}}
<script src="/js/flatpickr.js"></script>
<script src="/js/rangePlugin.js"></script>
<script src="/js/inputTags.min.js"></script>
<script>
$(".input-tags").inputTags();
let options = {
chart: {
height: "100%",

View File

@ -83,10 +83,8 @@
{{ else }}
<script src="/js/sortable.min.js"></script>
{{end}}
<script src="/js/inputTags.min.js"></script>
<script>
$(".input-tags").inputTags();
// drag and drop sorting for Services
sortable('.sortable', {
forcePlaceholderSize: true,
hoverClass: 'sortable_drag',
@ -103,14 +101,16 @@
newOrder.push(o);
});
$.ajax({
url: "/api/services/reorder",
type: 'POST',
url: "/api/reorder/services",
type: "POST",
data: JSON.stringify(newOrder),
contentType: "application/json",
dataType: "json",
success: function(data) { }
});
});
// drag and drop sorting for Groups
sortable('.sortable_groups', {
forcePlaceholderSize: true,
hoverClass: 'sortable_drag',
@ -127,8 +127,8 @@
newOrder.push(o);
});
$.ajax({
url: "/api/groups/reorder",
type: 'POST',
url: "/api/reorder/groups",
type: "POST",
data: JSON.stringify(newOrder),
contentType: "application/json",
dataType: "json",

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
0.80.59
0.80.61