mirror of https://github.com/statping/statping
remove .Online from notifiers and toggle service.Online when needed. fixes #118
parent
85b4129b08
commit
30a1216f23
|
@ -243,7 +243,6 @@ func (s *Service) checkHttp(record bool) *Service {
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
s.Online = true
|
|
||||||
if record {
|
if record {
|
||||||
recordSuccess(s)
|
recordSuccess(s)
|
||||||
}
|
}
|
||||||
|
@ -252,7 +251,6 @@ func (s *Service) checkHttp(record bool) *Service {
|
||||||
|
|
||||||
// recordSuccess will create a new 'hit' record in the database for a successful/online service
|
// recordSuccess will create a new 'hit' record in the database for a successful/online service
|
||||||
func recordSuccess(s *Service) {
|
func recordSuccess(s *Service) {
|
||||||
s.Online = true
|
|
||||||
s.LastOnline = utils.Timezoner(time.Now().UTC(), CoreApp.Timezone)
|
s.LastOnline = utils.Timezoner(time.Now().UTC(), CoreApp.Timezone)
|
||||||
hit := &types.Hit{
|
hit := &types.Hit{
|
||||||
Service: s.Id,
|
Service: s.Id,
|
||||||
|
@ -263,11 +261,11 @@ func recordSuccess(s *Service) {
|
||||||
utils.Log(1, fmt.Sprintf("Service %v Successful Response: %0.2f ms | Lookup in: %0.2f ms", s.Name, hit.Latency*1000, hit.PingTime*1000))
|
utils.Log(1, fmt.Sprintf("Service %v Successful Response: %0.2f ms | Lookup in: %0.2f ms", s.Name, hit.Latency*1000, hit.PingTime*1000))
|
||||||
s.CreateHit(hit)
|
s.CreateHit(hit)
|
||||||
notifier.OnSuccess(s.Service)
|
notifier.OnSuccess(s.Service)
|
||||||
|
s.Online = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// recordFailure will create a new 'Failure' record in the database for a offline service
|
// recordFailure will create a new 'Failure' record in the database for a offline service
|
||||||
func recordFailure(s *Service, issue string) {
|
func recordFailure(s *Service, issue string) {
|
||||||
s.Online = false
|
|
||||||
fail := &Failure{&types.Failure{
|
fail := &Failure{&types.Failure{
|
||||||
Service: s.Id,
|
Service: s.Id,
|
||||||
Issue: issue,
|
Issue: issue,
|
||||||
|
@ -278,4 +276,6 @@ func recordFailure(s *Service, issue string) {
|
||||||
utils.Log(2, fmt.Sprintf("Service %v Failing: %v | Lookup in: %0.2f ms", s.Name, issue, fail.PingTime*1000))
|
utils.Log(2, fmt.Sprintf("Service %v Failing: %v | Lookup in: %0.2f ms", s.Name, issue, fail.PingTime*1000))
|
||||||
s.CreateFailure(fail)
|
s.CreateFailure(fail)
|
||||||
notifier.OnFailure(s.Service, fail.Failure)
|
notifier.OnFailure(s.Service, fail.Failure)
|
||||||
|
s.Online = false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ func OnFailure(s *types.Service, f *types.Failure) {
|
||||||
comm.(BasicEvents).OnFailure(s, f)
|
comm.(BasicEvents).OnFailure(s, f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will be triggered when a service is successful - BasicEvents interface
|
// OnSuccess will be triggered when a service is successful - BasicEvents interface
|
||||||
|
@ -51,6 +52,7 @@ func OnSuccess(s *types.Service) {
|
||||||
comm.(BasicEvents).OnSuccess(s)
|
comm.(BasicEvents).OnSuccess(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnNewService is triggered when a new service is created - ServiceEvents interface
|
// OnNewService is triggered when a new service is created - ServiceEvents interface
|
||||||
|
|
|
@ -62,7 +62,6 @@ type Notification struct {
|
||||||
Delay time.Duration `gorm:"-" json:"delay,string"`
|
Delay time.Duration `gorm:"-" json:"delay,string"`
|
||||||
Queue []*QueueData `gorm:"-" json:"-"`
|
Queue []*QueueData `gorm:"-" json:"-"`
|
||||||
Running chan bool `gorm:"-" json:"-"`
|
Running chan bool `gorm:"-" json:"-"`
|
||||||
Online bool `gorm:"-" json:"online"`
|
|
||||||
testable bool `gorm:"-" json:"testable"`
|
testable bool `gorm:"-" json:"testable"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -77,16 +77,14 @@ func (u *commandLine) Select() *notifier.Notification {
|
||||||
// OnFailure for commandLine will trigger failing service
|
// OnFailure for commandLine will trigger failing service
|
||||||
func (u *commandLine) OnFailure(s *types.Service, f *types.Failure) {
|
func (u *commandLine) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), u.Var2)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), u.Var2)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess for commandLine will trigger successful service
|
// OnSuccess for commandLine will trigger successful service
|
||||||
func (u *commandLine) OnSuccess(s *types.Service) {
|
func (u *commandLine) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), u.Var1)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), u.Var1)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave for commandLine triggers when this notifier has been saved
|
// OnSave for commandLine triggers when this notifier has been saved
|
||||||
|
|
|
@ -74,7 +74,7 @@ func TestCommandNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("command Check Offline", func(t *testing.T) {
|
t.Run("command Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, command.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("command OnSuccess", func(t *testing.T) {
|
t.Run("command OnSuccess", func(t *testing.T) {
|
||||||
|
@ -83,12 +83,12 @@ func TestCommandNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("command Queue after being online", func(t *testing.T) {
|
t.Run("command Queue after being online", func(t *testing.T) {
|
||||||
assert.True(t, command.Online)
|
assert.True(t, TestService.Online)
|
||||||
assert.Equal(t, 1, len(command.Queue))
|
assert.Equal(t, 1, len(command.Queue))
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("command OnSuccess Again", func(t *testing.T) {
|
t.Run("command OnSuccess Again", func(t *testing.T) {
|
||||||
assert.True(t, command.Online)
|
assert.True(t, TestService.Online)
|
||||||
command.OnSuccess(TestService)
|
command.OnSuccess(TestService)
|
||||||
assert.Equal(t, 1, len(command.Queue))
|
assert.Equal(t, 1, len(command.Queue))
|
||||||
go notifier.Queue(command)
|
go notifier.Queue(command)
|
||||||
|
|
|
@ -71,17 +71,15 @@ func (u *discord) Select() *notifier.Notification {
|
||||||
func (u *discord) OnFailure(s *types.Service, f *types.Failure) {
|
func (u *discord) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
msg := fmt.Sprintf(`{"content": "Your service '%v' is currently failing! Reason: %v"}`, s.Name, f.Issue)
|
msg := fmt.Sprintf(`{"content": "Your service '%v' is currently failing! Reason: %v"}`, s.Name, f.Issue)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *discord) OnSuccess(s *types.Service) {
|
func (u *discord) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
msg := fmt.Sprintf(`{"content": "Your service '%v' is back online!"}`, s.Name)
|
msg := fmt.Sprintf(`{"content": "Your service '%v' is back online!"}`, s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -70,7 +70,7 @@ func TestDiscordNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("discord Check Offline", func(t *testing.T) {
|
t.Run("discord Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, discorder.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("discord OnSuccess", func(t *testing.T) {
|
t.Run("discord OnSuccess", func(t *testing.T) {
|
||||||
|
@ -79,7 +79,7 @@ func TestDiscordNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("discord Check Back Online", func(t *testing.T) {
|
t.Run("discord Check Back Online", func(t *testing.T) {
|
||||||
assert.True(t, discorder.Online)
|
assert.True(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("discord OnSuccess Again", func(t *testing.T) {
|
t.Run("discord OnSuccess Again", func(t *testing.T) {
|
||||||
|
|
|
@ -195,12 +195,11 @@ func (u *email) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
From: u.Var1,
|
From: u.Var1,
|
||||||
}
|
}
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), email)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), email)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *email) OnSuccess(s *types.Service) {
|
func (u *email) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
email := &emailOutgoing{
|
email := &emailOutgoing{
|
||||||
To: u.Var2,
|
To: u.Var2,
|
||||||
|
@ -211,7 +210,6 @@ func (u *email) OnSuccess(s *types.Service) {
|
||||||
}
|
}
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), email)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), email)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *email) Select() *notifier.Notification {
|
func (u *email) Select() *notifier.Notification {
|
||||||
|
|
|
@ -106,7 +106,7 @@ func TestEmailNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("email Check Offline", func(t *testing.T) {
|
t.Run("email Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, emailer.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("email OnSuccess", func(t *testing.T) {
|
t.Run("email OnSuccess", func(t *testing.T) {
|
||||||
|
@ -115,7 +115,7 @@ func TestEmailNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("email Check Back Online", func(t *testing.T) {
|
t.Run("email Check Back Online", func(t *testing.T) {
|
||||||
assert.True(t, emailer.Online)
|
assert.True(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("email OnSuccess Again", func(t *testing.T) {
|
t.Run("email OnSuccess Again", func(t *testing.T) {
|
||||||
|
|
|
@ -74,17 +74,15 @@ func (u *lineNotifier) Select() *notifier.Notification {
|
||||||
func (u *lineNotifier) OnFailure(s *types.Service, f *types.Failure) {
|
func (u *lineNotifier) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
msg := fmt.Sprintf("Your service '%v' is currently offline!", s.Name)
|
msg := fmt.Sprintf("Your service '%v' is currently offline!", s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *lineNotifier) OnSuccess(s *types.Service) {
|
func (u *lineNotifier) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
msg := fmt.Sprintf("Your service '%v' is back online!", s.Name)
|
msg := fmt.Sprintf("Your service '%v' is back online!", s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -100,13 +100,12 @@ func (u *mobilePush) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
Data: data,
|
Data: data,
|
||||||
}
|
}
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *mobilePush) OnSuccess(s *types.Service) {
|
func (u *mobilePush) OnSuccess(s *types.Service) {
|
||||||
data := dataJson(s, nil)
|
data := dataJson(s, nil)
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
msg := &pushArray{
|
msg := &pushArray{
|
||||||
Message: fmt.Sprintf("Your service '%v' is back online!", s.Name),
|
Message: fmt.Sprintf("Your service '%v' is back online!", s.Name),
|
||||||
|
@ -116,7 +115,6 @@ func (u *mobilePush) OnSuccess(s *types.Service) {
|
||||||
}
|
}
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -83,7 +83,7 @@ func TestMobileNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("mobile Check Offline", func(t *testing.T) {
|
t.Run("mobile Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, mobile.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("mobile OnSuccess", func(t *testing.T) {
|
t.Run("mobile OnSuccess", func(t *testing.T) {
|
||||||
|
@ -92,13 +92,13 @@ func TestMobileNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("mobile Queue after being online", func(t *testing.T) {
|
t.Run("mobile Queue after being online", func(t *testing.T) {
|
||||||
assert.True(t, mobile.Online)
|
assert.True(t, TestService.Online)
|
||||||
assert.Equal(t, 1, len(mobile.Queue))
|
assert.Equal(t, 1, len(mobile.Queue))
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("mobile OnSuccess Again", func(t *testing.T) {
|
t.Run("mobile OnSuccess Again", func(t *testing.T) {
|
||||||
t.SkipNow()
|
t.SkipNow()
|
||||||
assert.True(t, mobile.Online)
|
assert.True(t, TestService.Online)
|
||||||
mobile.OnSuccess(TestService)
|
mobile.OnSuccess(TestService)
|
||||||
assert.Equal(t, 1, len(mobile.Queue))
|
assert.Equal(t, 1, len(mobile.Queue))
|
||||||
go notifier.Queue(mobile)
|
go notifier.Queue(mobile)
|
||||||
|
|
|
@ -108,12 +108,11 @@ func (u *slack) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
Time: time.Now().Unix(),
|
Time: time.Now().Unix(),
|
||||||
}
|
}
|
||||||
parseSlackMessage(s.Id, failingTemplate, message)
|
parseSlackMessage(s.Id, failingTemplate, message)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *slack) OnSuccess(s *types.Service) {
|
func (u *slack) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
message := slackMessage{
|
message := slackMessage{
|
||||||
Service: s,
|
Service: s,
|
||||||
|
@ -122,7 +121,6 @@ func (u *slack) OnSuccess(s *types.Service) {
|
||||||
}
|
}
|
||||||
parseSlackMessage(s.Id, successTemplate, message)
|
parseSlackMessage(s.Id, successTemplate, message)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -86,7 +86,7 @@ func TestSlackNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("slack Check Offline", func(t *testing.T) {
|
t.Run("slack Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, slacker.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("slack OnSuccess", func(t *testing.T) {
|
t.Run("slack OnSuccess", func(t *testing.T) {
|
||||||
|
@ -95,12 +95,12 @@ func TestSlackNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("slack Queue after being online", func(t *testing.T) {
|
t.Run("slack Queue after being online", func(t *testing.T) {
|
||||||
assert.True(t, slacker.Online)
|
assert.True(t, TestService.Online)
|
||||||
assert.Equal(t, 1, len(slacker.Queue))
|
assert.Equal(t, 1, len(slacker.Queue))
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("slack OnSuccess Again", func(t *testing.T) {
|
t.Run("slack OnSuccess Again", func(t *testing.T) {
|
||||||
assert.True(t, slacker.Online)
|
assert.True(t, TestService.Online)
|
||||||
slacker.OnSuccess(TestService)
|
slacker.OnSuccess(TestService)
|
||||||
assert.Equal(t, 1, len(slacker.Queue))
|
assert.Equal(t, 1, len(slacker.Queue))
|
||||||
go notifier.Queue(slacker)
|
go notifier.Queue(slacker)
|
||||||
|
|
|
@ -93,17 +93,15 @@ func (u *telegram) Send(msg interface{}) error {
|
||||||
func (u *telegram) OnFailure(s *types.Service, f *types.Failure) {
|
func (u *telegram) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
msg := fmt.Sprintf("Your service '%v' is currently offline!", s.Name)
|
msg := fmt.Sprintf("Your service '%v' is currently offline!", s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *telegram) OnSuccess(s *types.Service) {
|
func (u *telegram) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
msg := fmt.Sprintf("Your service '%v' is back online!", s.Name)
|
msg := fmt.Sprintf("Your service '%v' is back online!", s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -71,7 +71,7 @@ func TestTelegramNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Telegram Check Offline", func(t *testing.T) {
|
t.Run("Telegram Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, telegramNotifier.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Telegram OnSuccess", func(t *testing.T) {
|
t.Run("Telegram OnSuccess", func(t *testing.T) {
|
||||||
|
@ -80,7 +80,7 @@ func TestTelegramNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Telegram Check Back Online", func(t *testing.T) {
|
t.Run("Telegram Check Back Online", func(t *testing.T) {
|
||||||
assert.True(t, telegramNotifier.Online)
|
assert.True(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Telegram OnSuccess Again", func(t *testing.T) {
|
t.Run("Telegram OnSuccess Again", func(t *testing.T) {
|
||||||
|
|
|
@ -103,17 +103,15 @@ func (u *twilio) Send(msg interface{}) error {
|
||||||
func (u *twilio) OnFailure(s *types.Service, f *types.Failure) {
|
func (u *twilio) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
msg := fmt.Sprintf("Your service '%v' is currently offline!", s.Name)
|
msg := fmt.Sprintf("Your service '%v' is currently offline!", s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
u.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (u *twilio) OnSuccess(s *types.Service) {
|
func (u *twilio) OnSuccess(s *types.Service) {
|
||||||
if !u.Online {
|
if !s.Online {
|
||||||
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
u.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
msg := fmt.Sprintf("Your service '%v' is back online!", s.Name)
|
msg := fmt.Sprintf("Your service '%v' is back online!", s.Name)
|
||||||
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
u.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
}
|
}
|
||||||
u.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -77,7 +77,7 @@ func TestTwilioNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Twilio Check Offline", func(t *testing.T) {
|
t.Run("Twilio Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, twilioNotifier.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Twilio OnSuccess", func(t *testing.T) {
|
t.Run("Twilio OnSuccess", func(t *testing.T) {
|
||||||
|
@ -86,7 +86,7 @@ func TestTwilioNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Twilio Check Back Online", func(t *testing.T) {
|
t.Run("Twilio Check Back Online", func(t *testing.T) {
|
||||||
assert.True(t, twilioNotifier.Online)
|
assert.True(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Twilio OnSuccess Again", func(t *testing.T) {
|
t.Run("Twilio OnSuccess Again", func(t *testing.T) {
|
||||||
|
|
|
@ -166,17 +166,15 @@ func (w *webhooker) OnTest() error {
|
||||||
func (w *webhooker) OnFailure(s *types.Service, f *types.Failure) {
|
func (w *webhooker) OnFailure(s *types.Service, f *types.Failure) {
|
||||||
msg := replaceBodyText(w.Var2, s, f)
|
msg := replaceBodyText(w.Var2, s, f)
|
||||||
w.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
w.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
w.Online = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSuccess will trigger successful service
|
// OnSuccess will trigger successful service
|
||||||
func (w *webhooker) OnSuccess(s *types.Service) {
|
func (w *webhooker) OnSuccess(s *types.Service) {
|
||||||
if !w.Online {
|
if !s.Online {
|
||||||
w.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
w.ResetUniqueQueue(fmt.Sprintf("service_%v", s.Id))
|
||||||
msg := replaceBodyText(w.Var2, s, nil)
|
msg := replaceBodyText(w.Var2, s, nil)
|
||||||
w.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
w.AddQueue(fmt.Sprintf("service_%v", s.Id), msg)
|
||||||
}
|
}
|
||||||
w.Online = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSave triggers when this notifier has been saved
|
// OnSave triggers when this notifier has been saved
|
||||||
|
|
|
@ -80,7 +80,7 @@ func TestWebhookNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("webhooker Check Offline", func(t *testing.T) {
|
t.Run("webhooker Check Offline", func(t *testing.T) {
|
||||||
assert.False(t, webhook.Online)
|
assert.False(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("webhooker OnSuccess", func(t *testing.T) {
|
t.Run("webhooker OnSuccess", func(t *testing.T) {
|
||||||
|
@ -89,7 +89,7 @@ func TestWebhookNotifier(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("webhooker Check Back Online", func(t *testing.T) {
|
t.Run("webhooker Check Back Online", func(t *testing.T) {
|
||||||
assert.True(t, webhook.Online)
|
assert.True(t, TestService.Online)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("webhooker OnSuccess Again", func(t *testing.T) {
|
t.Run("webhooker OnSuccess Again", func(t *testing.T) {
|
||||||
|
|
|
@ -7,66 +7,54 @@
|
||||||
/* Mobile Service Container */
|
/* Mobile Service Container */
|
||||||
HTML, BODY {
|
HTML, BODY {
|
||||||
background-color: #fcfcfc;
|
background-color: #fcfcfc;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px; }
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
padding-bottom: 25px;
|
padding-bottom: 25px;
|
||||||
max-width: 860px;
|
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 {
|
.header-title {
|
||||||
color: #464646;
|
color: #464646; }
|
||||||
}
|
|
||||||
|
|
||||||
.header-desc {
|
.header-desc {
|
||||||
color: #939393;
|
color: #939393; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.online_list .badge {
|
.online_list .badge {
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn-sm {
|
.btn-sm {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.view_service_btn {
|
.view_service_btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -40px;
|
bottom: -40px;
|
||||||
right: 40px;
|
right: 40px; }
|
||||||
}
|
|
||||||
|
|
||||||
.service_lower_info {
|
.service_lower_info {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -40px;
|
bottom: -40px;
|
||||||
left: 40px;
|
left: 40px;
|
||||||
color: #d1ffca;
|
color: #d1ffca;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.lg_number {
|
.lg_number {
|
||||||
font-size: 2.3rem;
|
font-size: 2.3rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: block;
|
display: block;
|
||||||
color: #4f4f4f;
|
color: #4f4f4f; }
|
||||||
}
|
|
||||||
|
|
||||||
.stats_area {
|
.stats_area {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #a5a5a5;
|
color: #a5a5a5; }
|
||||||
}
|
|
||||||
|
|
||||||
.lower_canvas {
|
.lower_canvas {
|
||||||
height: 3.4rem;
|
height: 3.4rem;
|
||||||
|
@ -74,101 +62,82 @@ HTML, BODY {
|
||||||
background-color: #48d338;
|
background-color: #48d338;
|
||||||
padding: 15px 10px;
|
padding: 15px 10px;
|
||||||
margin-left: 0px !important;
|
margin-left: 0px !important;
|
||||||
margin-right: 0px !important;
|
margin-right: 0px !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.lower_canvas SPAN {
|
.lower_canvas SPAN {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: #fff;
|
color: #fff; }
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-top: 20px;
|
margin-top: 20px; }
|
||||||
}
|
|
||||||
|
|
||||||
.footer A {
|
.footer A {
|
||||||
color: #8d8d8d;
|
color: #8d8d8d;
|
||||||
text-decoration: none;
|
text-decoration: none; }
|
||||||
}
|
|
||||||
|
|
||||||
.footer A:HOVER {
|
.footer A:HOVER {
|
||||||
color: #6d6d6d;
|
color: #6d6d6d; }
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn-group {
|
.btn-group {
|
||||||
height: 25px;
|
height: 25px; }
|
||||||
}
|
|
||||||
.btn-group A {
|
.btn-group A {
|
||||||
padding: 0.1rem 0.75rem;
|
padding: 0.1rem .75rem;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.card-body .badge {
|
.card-body .badge {
|
||||||
color: #fff;
|
color: #fff; }
|
||||||
}
|
|
||||||
|
|
||||||
.nav-pills .nav-link {
|
.nav-pills .nav-link {
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.form-control {
|
.form-control {
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border: 1px solid rgba(0, 0, 0, 0.125);
|
border: 1px solid rgba(0, 0, 0, 0.125); }
|
||||||
}
|
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
overflow: hidden;
|
overflow: hidden; }
|
||||||
}
|
|
||||||
|
|
||||||
.card-body H4 A {
|
.card-body H4 A {
|
||||||
color: #444444;
|
color: #444444;
|
||||||
text-decoration: none;
|
text-decoration: none; }
|
||||||
}
|
|
||||||
|
|
||||||
.chart-container {
|
.chart-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 170px;
|
height: 170px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden; }
|
||||||
}
|
|
||||||
|
|
||||||
.service-chart-container {
|
.service-chart-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
width: 100%;
|
width: 100%; }
|
||||||
}
|
|
||||||
|
|
||||||
.service-chart-heatmap {
|
.service-chart-heatmap {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
width: 100%;
|
width: 100%; }
|
||||||
}
|
|
||||||
|
|
||||||
.inputTags-field {
|
.inputTags-field {
|
||||||
border: 0;
|
border: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding-top: 0.13rem;
|
padding-top: .13rem; }
|
||||||
}
|
|
||||||
|
|
||||||
input.inputTags-field:focus {
|
input.inputTags-field:focus {
|
||||||
outline-width: 0;
|
outline-width: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.inputTags-list {
|
.inputTags-list {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: calc(2.25rem + 2px);
|
min-height: calc(2.25rem + 2px);
|
||||||
padding: 0.2rem 0.35rem;
|
padding: .2rem .35rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
@ -176,9 +145,8 @@ input.inputTags-field:focus {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border: 1px solid #ced4da;
|
border: 1px solid #ced4da;
|
||||||
border-radius: 0.25rem;
|
border-radius: .25rem;
|
||||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; }
|
||||||
}
|
|
||||||
|
|
||||||
.inputTags-item {
|
.inputTags-item {
|
||||||
background-color: #3aba39;
|
background-color: #3aba39;
|
||||||
|
@ -186,81 +154,63 @@ input.inputTags-field:focus {
|
||||||
padding: 5px 8px;
|
padding: 5px 8px;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 4px;
|
border-radius: 4px; }
|
||||||
}
|
|
||||||
|
|
||||||
.inputTags-item .close-item {
|
.inputTags-item .close-item {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
font-size: 13pt;
|
font-size: 13pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background-color: #3e9bff;
|
background-color: #3e9bff;
|
||||||
border-color: #006fe6;
|
border-color: #006fe6;
|
||||||
color: white;
|
color: white; }
|
||||||
}
|
|
||||||
.btn-primary.dyn-dark {
|
.btn-primary.dyn-dark {
|
||||||
background-color: #32a825 !important;
|
background-color: #32a825 !important;
|
||||||
border-color: #2c9320 !important;
|
border-color: #2c9320 !important; }
|
||||||
}
|
|
||||||
.btn-primary.dyn-light {
|
.btn-primary.dyn-light {
|
||||||
background-color: #75de69 !important;
|
background-color: #75de69 !important;
|
||||||
border-color: #88e37e !important;
|
border-color: #88e37e !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn-success {
|
.btn-success {
|
||||||
background-color: #47d337;
|
background-color: #47d337; }
|
||||||
}
|
|
||||||
.btn-success.dyn-dark {
|
.btn-success.dyn-dark {
|
||||||
background-color: #32a825 !important;
|
background-color: #32a825 !important;
|
||||||
border-color: #2c9320 !important;
|
border-color: #2c9320 !important; }
|
||||||
}
|
|
||||||
.btn-success.dyn-light {
|
.btn-success.dyn-light {
|
||||||
background-color: #75de69 !important;
|
background-color: #75de69 !important;
|
||||||
border-color: #88e37e !important;
|
border-color: #88e37e !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
background-color: #dd3545;
|
background-color: #dd3545; }
|
||||||
}
|
|
||||||
.btn-danger.dyn-dark {
|
.btn-danger.dyn-dark {
|
||||||
background-color: #b61f2d !important;
|
background-color: #b61f2d !important;
|
||||||
border-color: #a01b28 !important;
|
border-color: #a01b28 !important; }
|
||||||
}
|
|
||||||
.btn-danger.dyn-light {
|
.btn-danger.dyn-light {
|
||||||
background-color: #e66975 !important;
|
background-color: #e66975 !important;
|
||||||
border-color: #e97f89 !important;
|
border-color: #e97f89 !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.bg-success {
|
.bg-success {
|
||||||
background-color: #47d337 !important;
|
background-color: #47d337 !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.bg-danger {
|
.bg-danger {
|
||||||
background-color: #dd3545 !important;
|
background-color: #dd3545 !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.bg-success .dyn-dark {
|
.bg-success .dyn-dark {
|
||||||
background-color: #35b027 !important;
|
background-color: #35b027 !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.bg-danger .dyn-dark {
|
.bg-danger .dyn-dark {
|
||||||
background-color: #bf202f !important;
|
background-color: #bf202f !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||||
background-color: #13a00d;
|
background-color: #13a00d; }
|
||||||
}
|
|
||||||
|
|
||||||
.nav-pills A {
|
.nav-pills A {
|
||||||
color: #424242;
|
color: #424242; }
|
||||||
}
|
|
||||||
|
|
||||||
.nav-pills I {
|
.nav-pills I {
|
||||||
margin-right: 10px;
|
margin-right: 10px; }
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror {
|
.CodeMirror {
|
||||||
/* Bootstrap Settings */
|
/* Bootstrap Settings */
|
||||||
|
@ -280,26 +230,23 @@ input.inputTags-field:focus {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||||
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||||
/* Code Mirror Settings */
|
/* Code Mirror Settings */
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 80vh;
|
height: 80vh; }
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror-focused {
|
.CodeMirror-focused {
|
||||||
/* Bootstrap Settings */
|
/* Bootstrap Settings */
|
||||||
border-color: #66afe9;
|
border-color: #66afe9;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
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 0.15s, box-shadow ease-in-out 0.15s;
|
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch {
|
.switch {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
position: relative;
|
position: relative; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input {
|
.switch input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -310,8 +257,7 @@ input.inputTags-field:focus {
|
||||||
clip: rect(0 0 0 0);
|
clip: rect(0 0 0 0);
|
||||||
clip-path: inset(50%);
|
clip-path: inset(50%);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0;
|
padding: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input + label {
|
.switch input + label {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -324,26 +270,23 @@ input.inputTags-field:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
vertical-align: middle;
|
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::before,
|
||||||
.switch input + label::after {
|
.switch input + label::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: calc(calc(2.375rem * .8) * 2);
|
width: calc(calc(2.375rem * .8) * 2);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: block;
|
display: block; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input + label::before {
|
.switch input + label::before {
|
||||||
right: 0;
|
right: 0;
|
||||||
background-color: #dee2e6;
|
background-color: #dee2e6;
|
||||||
border-radius: calc(2.375rem * .8);
|
border-radius: calc(2.375rem * .8);
|
||||||
transition: 0.2s all;
|
transition: 0.2s all; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input + label::after {
|
.switch input + label::after {
|
||||||
top: 2px;
|
top: 2px;
|
||||||
|
@ -352,137 +295,105 @@ input.inputTags-field:focus {
|
||||||
height: calc(calc(2.375rem * .8) - calc(2px * 2));
|
height: calc(calc(2.375rem * .8) - calc(2px * 2));
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
transition: 0.2s all;
|
transition: 0.2s all; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input:checked + label::before {
|
.switch input:checked + label::before {
|
||||||
background-color: #08d;
|
background-color: #08d; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input:checked + label::after {
|
.switch input:checked + label::after {
|
||||||
margin-left: calc(2.375rem * .8);
|
margin-left: calc(2.375rem * .8); }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input:focus + label::before {
|
.switch input:focus + label::before {
|
||||||
outline: none;
|
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 {
|
.switch input:disabled + label {
|
||||||
color: #868e96;
|
color: #868e96;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch input:disabled + label::before {
|
.switch input:disabled + label::before {
|
||||||
background-color: #e9ecef;
|
background-color: #e9ecef; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch.switch-sm {
|
.switch.switch-sm {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch.switch-sm input + label {
|
.switch.switch-sm input + label {
|
||||||
min-width: calc(calc(1.9375rem * .8) * 2);
|
min-width: calc(calc(1.9375rem * .8) * 2);
|
||||||
height: calc(1.9375rem * .8);
|
height: calc(1.9375rem * .8);
|
||||||
line-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 {
|
.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 {
|
.switch.switch-sm input + label::after {
|
||||||
width: calc(calc(1.9375rem * .8) - calc(2px * 2));
|
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 {
|
.switch.switch-sm input:checked + label::after {
|
||||||
margin-left: calc(1.9375rem * .8);
|
margin-left: calc(1.9375rem * .8); }
|
||||||
}
|
|
||||||
|
|
||||||
.switch.switch-lg {
|
.switch.switch-lg {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch.switch-lg input + label {
|
.switch.switch-lg input + label {
|
||||||
min-width: calc(calc(3rem * .8) * 2);
|
min-width: calc(calc(3rem * .8) * 2);
|
||||||
height: calc(3rem * .8);
|
height: calc(3rem * .8);
|
||||||
line-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 {
|
.switch.switch-lg input + label::before {
|
||||||
width: calc(calc(3rem * .8) * 2);
|
width: calc(calc(3rem * .8) * 2); }
|
||||||
}
|
|
||||||
|
|
||||||
.switch.switch-lg input + label::after {
|
.switch.switch-lg input + label::after {
|
||||||
width: calc(calc(3rem * .8) - calc(2px * 2));
|
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 {
|
.switch.switch-lg input:checked + label::after {
|
||||||
margin-left: calc(3rem * .8);
|
margin-left: calc(3rem * .8); }
|
||||||
}
|
|
||||||
|
|
||||||
.switch + .switch {
|
.switch + .switch {
|
||||||
margin-left: 1rem;
|
margin-left: 1rem; }
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse_animation {
|
@keyframes pulse_animation {
|
||||||
0% {
|
0% {
|
||||||
transform: scale(1);
|
transform: scale(1); }
|
||||||
}
|
|
||||||
30% {
|
30% {
|
||||||
transform: scale(1);
|
transform: scale(1); }
|
||||||
}
|
|
||||||
40% {
|
40% {
|
||||||
transform: scale(1.02);
|
transform: scale(1.02); }
|
||||||
}
|
|
||||||
50% {
|
50% {
|
||||||
transform: scale(1);
|
transform: scale(1); }
|
||||||
}
|
|
||||||
60% {
|
60% {
|
||||||
transform: scale(1);
|
transform: scale(1); }
|
||||||
}
|
|
||||||
70% {
|
70% {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05); }
|
||||||
}
|
|
||||||
80% {
|
80% {
|
||||||
transform: scale(1);
|
transform: scale(1); }
|
||||||
}
|
|
||||||
100% {
|
100% {
|
||||||
transform: scale(1);
|
transform: scale(1); } }
|
||||||
}
|
|
||||||
}
|
|
||||||
.pulse {
|
.pulse {
|
||||||
animation-name: pulse_animation;
|
animation-name: pulse_animation;
|
||||||
animation-duration: 1500ms;
|
animation-duration: 1500ms;
|
||||||
transform-origin: 70% 70%;
|
transform-origin: 70% 70%;
|
||||||
animation-iteration-count: infinite;
|
animation-iteration-count: infinite;
|
||||||
animation-timing-function: linear;
|
animation-timing-function: linear; }
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes glow-grow {
|
@keyframes glow-grow {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: scale(1);
|
transform: scale(1); }
|
||||||
}
|
|
||||||
80% {
|
80% {
|
||||||
opacity: 1;
|
opacity: 1; }
|
||||||
}
|
|
||||||
100% {
|
100% {
|
||||||
transform: scale(2);
|
transform: scale(2);
|
||||||
opacity: 0;
|
opacity: 0; } }
|
||||||
}
|
|
||||||
}
|
|
||||||
.pulse-glow {
|
.pulse-glow {
|
||||||
animation-name: glow-grown;
|
animation-name: glow-grown;
|
||||||
animation-duration: 100ms;
|
animation-duration: 100ms;
|
||||||
transform-origin: 70% 30%;
|
transform-origin: 70% 30%;
|
||||||
animation-iteration-count: infinite;
|
animation-iteration-count: infinite;
|
||||||
animation-timing-function: linear;
|
animation-timing-function: linear; }
|
||||||
}
|
|
||||||
|
|
||||||
.pulse-glow:before,
|
.pulse-glow:before,
|
||||||
.pulse-glow:after {
|
.pulse-glow:after {
|
||||||
|
@ -494,12 +405,10 @@ input.inputTags-field:focus {
|
||||||
right: 2.15rem;
|
right: 2.15rem;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: 0 0 6px #47d337;
|
box-shadow: 0 0 6px #47d337;
|
||||||
animation: glow-grow 2s ease-out infinite;
|
animation: glow-grow 2s ease-out infinite; }
|
||||||
}
|
|
||||||
|
|
||||||
.sortable_drag {
|
.sortable_drag {
|
||||||
background-color: #0000000f;
|
background-color: #0000000f; }
|
||||||
}
|
|
||||||
|
|
||||||
.drag_icon {
|
.drag_icon {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
|
@ -513,139 +422,112 @@ input.inputTags-field:focus {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
margin-left: -10px;
|
margin-left: -10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #b1b1b1;
|
color: #b1b1b1; }
|
||||||
}
|
|
||||||
|
|
||||||
/* (Optional) Apply a "closed-hand" cursor during drag operation. */
|
/* (Optional) Apply a "closed-hand" cursor during drag operation. */
|
||||||
.drag_icon:active {
|
.drag_icon:active {
|
||||||
cursor: grabbing;
|
cursor: grabbing;
|
||||||
cursor: -moz-grabbing;
|
cursor: -moz-grabbing;
|
||||||
cursor: -webkit-grabbing;
|
cursor: -webkit-grabbing; }
|
||||||
}
|
|
||||||
|
|
||||||
.switch_btn {
|
.switch_btn {
|
||||||
float: right;
|
float: right;
|
||||||
margin: -1px 0px 0px 0px;
|
margin: -1px 0px 0px 0px;
|
||||||
display: block;
|
display: block; }
|
||||||
}
|
|
||||||
|
|
||||||
#start_container {
|
#start_container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
margin-top: 20px;
|
margin-top: 20px; }
|
||||||
}
|
|
||||||
|
|
||||||
#end_container {
|
#end_container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
right: 0;
|
right: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.pointer {
|
.pointer {
|
||||||
cursor: pointer;
|
cursor: pointer; }
|
||||||
}
|
|
||||||
|
|
||||||
.jumbotron {
|
.jumbotron {
|
||||||
background-color: white;
|
background-color: white; }
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-service {
|
.toggle-service {
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 2px 3px 0 0;
|
margin: 2px 3px 0 0;
|
||||||
cursor: pointer;
|
cursor: pointer; }
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
HTML, BODY {
|
HTML, BODY {
|
||||||
background-color: #fcfcfc;
|
background-color: #fcfcfc; }
|
||||||
}
|
|
||||||
|
|
||||||
.sm-container {
|
.sm-container {
|
||||||
margin-top: 0px !important;
|
margin-top: 0px !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item H5 {
|
.list-group-item H5 {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
padding-top: 15px !important;
|
padding-top: 15px !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.group_header {
|
.group_header {
|
||||||
margin-left: 15px;
|
margin-left: 15px; }
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.btn-sm {
|
.btn-sm {
|
||||||
line-height: 0.9rem;
|
line-height: 0.9rem;
|
||||||
font-size: 0.65rem;
|
font-size: 0.65rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.full-col-12 {
|
.full-col-12 {
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
padding-right: 0px;
|
padding-right: 0px; }
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 0rem;
|
border-radius: 0rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff; }
|
||||||
}
|
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px; }
|
||||||
}
|
|
||||||
|
|
||||||
.lg_number {
|
.lg_number {
|
||||||
font-size: 7.8vw;
|
font-size: 7.8vw; }
|
||||||
}
|
|
||||||
|
|
||||||
.stats_area {
|
.stats_area {
|
||||||
margin-top: 1.5rem !important;
|
margin-top: 1.5rem !important;
|
||||||
margin-bottom: 1.5rem !important;
|
margin-bottom: 1.5rem !important; }
|
||||||
}
|
|
||||||
|
|
||||||
.stats_area .col-4 {
|
.stats_area .col-4 {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item {
|
.list-group-item {
|
||||||
border-top: 1px solid #e4e4e4;
|
border-top: 1px solid #e4e4e4;
|
||||||
border: 0px;
|
border: 0px; }
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item:first-child {
|
.list-group-item:first-child {
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item:last-child {
|
.list-group-item:last-child {
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0; }
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item P {
|
.list-group-item P {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem; }
|
||||||
}
|
|
||||||
|
|
||||||
.service-chart-container {
|
.service-chart-container {
|
||||||
height: 200px;
|
height: 200px; } }
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=base.css.map */
|
/*# sourceMappingURL=base.css.map */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by go generate; DO NOT EDIT.
|
// Code generated by go generate; DO NOT EDIT.
|
||||||
// This file was generated by robots at
|
// This file was generated by robots at
|
||||||
// 2019-06-24 15:19:59.865474 -0700 PDT m=+0.786948198
|
// 2019-08-16 02:17:31.047416 +0300 +03 m=+1.970455580
|
||||||
//
|
//
|
||||||
// This contains the most recently Markdown source for the Statping Wiki.
|
// This contains the most recently Markdown source for the Statping Wiki.
|
||||||
package source
|
package source
|
||||||
|
|
Loading…
Reference in New Issue