fixed tests - removed database creds from logs

pull/239/head
hunterlong 2019-09-03 14:10:13 -07:00
parent ce90d9d341
commit 50ba485fcd
17 changed files with 337 additions and 265 deletions

103
Gopkg.lock generated
View File

@ -2,8 +2,7 @@
[[projects]]
branch = "master"
digest = "1:a2de8c02990ea7cb28b962d2effa6840cc2c849b298736eef57a9713432cc0d3"
digest = "1:d4bfd57449b0bdfe927ec45c8463afd8f5b6012d4bcd5a9da8581a408c23e57c"
name = "github.com/99designs/gqlgen"
packages = [
"complexity",
@ -12,7 +11,8 @@
"handler",
]
pruneopts = "UT"
revision = "afe33f73875beca92e917742c1f49c1f6145018b"
revision = "a7bc468ca1b184a5ce1b07ea331e0121fc56ae82"
version = "v0.9.3"
[[projects]]
digest = "1:07f7314344b2771963ada0b2a4a426c59d782dac227dcfff2499188a186446c0"
@ -42,12 +42,12 @@
version = "0.0.1"
[[projects]]
digest = "1:86b9f9c54fcddec313009ef19073bf0124bbdae3701080c32f67c0c8817b3b7c"
digest = "1:8e8da6cc8cca12851d4e089d970a0f7387b3a6bcc8c459ff432213b03076a66d"
name = "github.com/daaku/go.zipexe"
packages = ["."]
pruneopts = "UT"
revision = "db7cf2ba330f8c2d28b827826e33d6628ea7e9e0"
version = "v1.0.0"
revision = "74d766ac1dde7458348221869a7d1e7e5fa0597e"
version = "v1.0.1"
[[projects]]
digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
@ -82,20 +82,12 @@
version = "v2.2.2"
[[projects]]
digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1"
name = "github.com/gorilla/context"
packages = ["."]
pruneopts = "UT"
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
version = "v1.1.1"
[[projects]]
digest = "1:d5f97fc268267ec1b61c3453058c738246fc3e746f14b1ae25161513b7367b0c"
digest = "1:cbec35fe4d5a4fba369a656a8cd65e244ea2c743007d8f6c1ccb132acf9d1296"
name = "github.com/gorilla/mux"
packages = ["."]
pruneopts = "UT"
revision = "c5c6c98bc25355028a63748a498942a6398ccd22"
version = "v1.7.1"
revision = "00bdffe0f3c77e27d2cf6f5c70232a2d3e4d9c15"
version = "v1.7.3"
[[projects]]
digest = "1:e72d1ebb8d395cf9f346fd9cbc652e5ae222dd85e0ac842dc57f175abed6d195"
@ -106,34 +98,34 @@
version = "v1.1.1"
[[projects]]
digest = "1:e5bf52fd66a2e984b57b4c0f2c4ee024ed749a19886246240629998dc0cf31ce"
digest = "1:172c862eabc72e90f461bcef223c49869628bec6d989386dfb03281ae3222148"
name = "github.com/gorilla/sessions"
packages = ["."]
pruneopts = "UT"
revision = "f57b7e2d29c6211d16ffa52a0998272f75799030"
version = "v1.1.3"
revision = "4355a998706e83fe1d71c31b07af94e34f68d74a"
version = "v1.2.0"
[[projects]]
digest = "1:7b5c6e2eeaa9ae5907c391a91c132abfd5c9e8a784a341b5625e750c67e6825d"
digest = "1:e62657cca9badaa308d86e7716083e4c5933bb78e30a17743fc67f50be26f6f4"
name = "github.com/gorilla/websocket"
packages = ["."]
pruneopts = "UT"
revision = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d"
version = "v1.4.0"
revision = "c3e18be99d19e6b3e8f1559eea2c161a665c4b6b"
version = "v1.4.1"
[[projects]]
digest = "1:d15ee511aa0f56baacc1eb4c6b922fa1c03b38413b6be18166b996d82a0156ea"
digest = "1:c77361e611524ec8f2ad37c408c3c916111a70b6acf806a1200855696bf8fa4d"
name = "github.com/hashicorp/golang-lru"
packages = [
".",
"simplelru",
]
pruneopts = "UT"
revision = "7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c"
version = "v0.5.1"
revision = "7f827b33c0f158ec5dfbba01bb0b14a4541fd81d"
version = "v0.5.3"
[[projects]]
digest = "1:0731b955911f880c75409845b54203f5127c72e003691e2d34462a0516a9b1f6"
digest = "1:b0c1770be8c52cf00117b98049de1e4df91c8df588102198364b09669bb60178"
name = "github.com/jinzhu/gorm"
packages = [
".",
@ -142,16 +134,16 @@
"dialects/sqlite",
]
pruneopts = "UT"
revision = "e3987fd4b803c16497aa4dfd2e75db7a6a061a4e"
version = "v1.9.4"
revision = "836fb2c19d84dac7b0272958dfb9af7cf0d0ade4"
version = "v1.9.10"
[[projects]]
branch = "master"
digest = "1:fd97437fbb6b7dce04132cf06775bd258cce305c44add58eb55ca86c6c325160"
digest = "1:01ed62f8f4f574d8aff1d88caee113700a2b44c42351943fa73cc1808f736a50"
name = "github.com/jinzhu/inflection"
packages = ["."]
pruneopts = "UT"
revision = "04140366298a54a039076d798123ffa108fff46c"
revision = "f5c5f50e6090ae76a29240b61ae2a90dd810112e"
version = "v1.0.0"
[[projects]]
digest = "1:ecd9aa82687cf31d1585d4ac61d0ba180e42e8a6182b85bd785fcca8dfeefc1b"
@ -162,7 +154,7 @@
version = "v1.3.0"
[[projects]]
digest = "1:226be3582c304c347481157049c862924fdd6277256e854781c5ba4728901215"
digest = "1:0ead8e64fe356bd9221605e3ec40b4438509868018cbbbaaaff3ebae1b69b78b"
name = "github.com/lib/pq"
packages = [
".",
@ -171,16 +163,16 @@
"scram",
]
pruneopts = "UT"
revision = "51e2106eed1cea199c802d2a49e91e2491b02056"
version = "v1.1.0"
revision = "3427c32cb71afc948325f299f040e53c1dd78979"
version = "v1.2.0"
[[projects]]
digest = "1:4a49346ca45376a2bba679ca0e83bec949d780d4e927931317904bad482943ec"
digest = "1:79e87abf06b873987dee86598950f5b51732ac454d5a5cab6445a14330e6c9e3"
name = "github.com/mattn/go-sqlite3"
packages = ["."]
pruneopts = "UT"
revision = "c7c4067b79cc51e6dfdcef5c702e74b1e0fa7c75"
version = "v1.10.0"
revision = "b612a2feea6aa87c6d052d9086572551df06497e"
version = "v1.11.0"
[[projects]]
digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
@ -207,12 +199,12 @@
version = "v1.0.0"
[[projects]]
digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759"
digest = "1:8548c309c65a85933a625be5e7d52b6ac927ca30c56869fae58123b8a77a75e1"
name = "github.com/stretchr/testify"
packages = ["assert"]
pruneopts = "UT"
revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053"
version = "v1.3.0"
revision = "221dbe5ed46703ee255b1da0dec05086f5035f62"
version = "v1.4.0"
[[projects]]
branch = "master"
@ -247,11 +239,11 @@
"blowfish",
]
pruneopts = "UT"
revision = "a29dc8fdc73485234dbef99ebedb95d2eced08de"
revision = "9756ffdc24725223350eb3266ffb92590d28f278"
[[projects]]
branch = "master"
digest = "1:5e22b2014e7cd102e2b41ab7dd38b9c5175e3447b653033987164bebc858e958"
digest = "1:caffb9a4f8c756941de4b3eb577abd167e7fd4b570f2078c05ceb8835a1514cb"
name = "golang.org/x/net"
packages = [
"bpf",
@ -262,15 +254,26 @@
"ipv6",
]
pruneopts = "UT"
revision = "4829fb13d2c62012c17688fa7f629f371014946d"
revision = "ba9fcec4b297b415637633c5a6e8fa592e4a16c3"
[[projects]]
branch = "master"
digest = "1:d94059c196c160bd1c4030d49ffaa39a456be516501e5916bea663f5d79a75ec"
name = "golang.org/x/sys"
packages = [
"unix",
"windows",
]
pruneopts = "UT"
revision = "9109b7679e13aa34a54834cfb4949cac4b96e576"
[[projects]]
digest = "1:c25289f43ac4a68d88b02245742347c94f1e108c534dda442188015ff80669b3"
name = "google.golang.org/appengine"
packages = ["cloudsql"]
pruneopts = "UT"
revision = "54a98f90d1c46b7731eb8fb305d2a321c30ef610"
version = "v1.5.0"
revision = "5f2a59506353b8d5ba8cbbcd9f3c1f41f1eaf079"
version = "v1.6.2"
[[projects]]
branch = "v3"
@ -296,6 +299,14 @@
revision = "d3b5b032dc8e8927d31a5071b56e14c89f045135"
version = "v2.0.1"
[[projects]]
digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = "UT"
revision = "51d6538a90f86fe93ac480b35f37b2be17fef232"
version = "v2.2.2"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1

View File

@ -27,7 +27,7 @@
[[constraint]]
name = "github.com/99designs/gqlgen"
branch = "master"
version = "0.9.3"
[[constraint]]
name = "github.com/GeertJohan/go.rice"
@ -47,15 +47,15 @@
[[constraint]]
name = "github.com/gorilla/mux"
version = "1.7.1"
version = "1.7.3"
[[constraint]]
name = "github.com/gorilla/sessions"
version = "1.1.3"
version = "1.2.0"
[[constraint]]
name = "github.com/jinzhu/gorm"
version = "1.9.4"
version = "1.9.10"
[[constraint]]
name = "github.com/joho/godotenv"
@ -67,7 +67,7 @@
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.3.0"
version = "1.4.0"
[[constraint]]
branch = "master"

View File

@ -40,6 +40,7 @@ func checkServices() {
}
// Check will run checkHttp for HTTP services and checkTcp for TCP services
// if record param is set to true, it will add a record into the database.
func (s *Service) Check(record bool) {
switch s.Type {
case "http":
@ -260,8 +261,8 @@ 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))
s.CreateHit(hit)
notifier.OnSuccess(s.Service)
s.Online = true
notifier.OnSuccess(s.Service)
}
// recordFailure will create a new 'Failure' record in the database for a offline service
@ -275,7 +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))
s.CreateFailure(fail)
notifier.OnFailure(s.Service, fail.Failure)
s.Online = false
notifier.OnFailure(s.Service, fail.Failure)
}

View File

@ -217,7 +217,7 @@ func (db *DbConfig) Connect(retry bool, location string) error {
dbSession, err := gorm.Open(dbType, conn)
if err != nil {
if retry {
utils.Log(1, fmt.Sprintf("Database connection to '%v' is not available, trying again in 5 seconds...", conn))
utils.Log(1, fmt.Sprintf("Database connection to '%v' is not available, trying again in 5 seconds...", Configs.DbHost))
return db.waitForDb()
} else {
return err
@ -229,7 +229,7 @@ func (db *DbConfig) Connect(retry bool, location string) error {
err = dbSession.DB().Ping()
if err == nil {
DbSession = dbSession
utils.Log(1, fmt.Sprintf("Database %v connection '%v@%v:%v' at %v was successful.", dbType, Configs.DbUser, Configs.DbHost, Configs.DbPort, Configs.DbData))
utils.Log(1, fmt.Sprintf("Database %v connection was successful.", dbType))
}
return err
}

View File

@ -64,18 +64,15 @@ func TestSelectTCPService(t *testing.T) {
func TestUpdateService(t *testing.T) {
service := SelectService(1)
service2 := SelectService(2)
assert.Equal(t, "Google", service.Name)
assert.Equal(t, "Statping Github", service2.Name)
assert.True(t, service.Online)
assert.True(t, service2.Online)
service.Name = "Updated Google"
service.Interval = 5
err := service.Update(true)
assert.Nil(t, err)
// check if updating pointer array shutdown any other service
service2 = SelectService(2)
assert.True(t, service2.Online)
service = SelectService(1)
assert.Equal(t, "Updated Google", service.Name)
assert.Equal(t, 5, service.Interval)
}
func TestUpdateAllServices(t *testing.T) {

View File

@ -66,33 +66,16 @@ func TestCommandNotifier(t *testing.T) {
assert.Equal(t, 1, len(command.Queue))
})
t.Run("command OnFailure multiple times", func(t *testing.T) {
for i := 0; i <= 50; i++ {
command.OnFailure(TestService, TestFailure)
}
assert.Equal(t, 52, len(command.Queue))
})
t.Run("command Check Offline", func(t *testing.T) {
assert.False(t, TestService.Online)
})
t.Run("command OnSuccess", func(t *testing.T) {
command.OnSuccess(TestService)
assert.Equal(t, 1, len(command.Queue))
})
t.Run("command Queue after being online", func(t *testing.T) {
assert.True(t, TestService.Online)
assert.Equal(t, 1, len(command.Queue))
})
t.Run("command OnSuccess Again", func(t *testing.T) {
assert.True(t, TestService.Online)
command.OnSuccess(TestService)
assert.Equal(t, 1, len(command.Queue))
go notifier.Queue(command)
time.Sleep(5 * time.Second)
time.Sleep(20 * time.Second)
assert.Equal(t, 0, len(command.Queue))
})

View File

@ -69,10 +69,6 @@ func TestDiscordNotifier(t *testing.T) {
assert.Equal(t, 1, len(discorder.Queue))
})
t.Run("discord Check Offline", func(t *testing.T) {
assert.False(t, TestService.Online)
})
t.Run("discord OnSuccess", func(t *testing.T) {
discorder.OnSuccess(TestService)
assert.Equal(t, 1, len(discorder.Queue))

View File

@ -105,10 +105,6 @@ func TestEmailNotifier(t *testing.T) {
assert.Equal(t, 1, len(emailer.Queue))
})
t.Run("email Check Offline", func(t *testing.T) {
assert.False(t, TestService.Online)
})
t.Run("email OnSuccess", func(t *testing.T) {
emailer.OnSuccess(TestService)
assert.Equal(t, 1, len(emailer.Queue))

View File

@ -76,24 +76,15 @@ func TestMobileNotifier(t *testing.T) {
})
t.Run("mobile OnFailure multiple times", func(t *testing.T) {
for i := 0; i <= 50; i++ {
for i := 0; i <= 5; i++ {
mobile.OnFailure(TestService, TestFailure)
}
assert.Equal(t, 52, len(mobile.Queue))
})
t.Run("mobile Check Offline", func(t *testing.T) {
assert.False(t, TestService.Online)
assert.Equal(t, 7, len(mobile.Queue))
})
t.Run("mobile OnSuccess", func(t *testing.T) {
mobile.OnSuccess(TestService)
assert.Equal(t, 1, len(mobile.Queue))
})
t.Run("mobile Queue after being online", func(t *testing.T) {
assert.True(t, TestService.Online)
assert.Equal(t, 1, len(mobile.Queue))
assert.Equal(t, 7, len(mobile.Queue))
})
t.Run("mobile OnSuccess Again", func(t *testing.T) {

View File

@ -42,6 +42,7 @@ var TestService = &types.Service{
Method: "GET",
Timeout: 20,
LastStatusCode: 404,
Online: true,
LastResponse: "<html>this is an example response</html>",
CreatedAt: time.Now().Add(-24 * time.Hour),
}

View File

@ -78,33 +78,17 @@ func TestSlackNotifier(t *testing.T) {
assert.Equal(t, 1, len(slacker.Queue))
})
t.Run("slack OnFailure multiple times", func(t *testing.T) {
for i := 0; i <= 50; i++ {
slacker.OnFailure(TestService, TestFailure)
}
assert.Equal(t, 52, len(slacker.Queue))
})
t.Run("slack Check Offline", func(t *testing.T) {
assert.False(t, TestService.Online)
})
t.Run("slack OnSuccess", func(t *testing.T) {
slacker.OnSuccess(TestService)
assert.Equal(t, 1, len(slacker.Queue))
})
t.Run("slack Queue after being online", func(t *testing.T) {
assert.True(t, TestService.Online)
assert.Equal(t, 1, len(slacker.Queue))
})
t.Run("slack OnSuccess Again", func(t *testing.T) {
assert.True(t, TestService.Online)
slacker.OnSuccess(TestService)
assert.Equal(t, 1, len(slacker.Queue))
go notifier.Queue(slacker)
time.Sleep(6 * time.Second)
time.Sleep(15 * time.Second)
assert.Equal(t, 0, len(slacker.Queue))
})
@ -127,7 +111,7 @@ func TestSlackNotifier(t *testing.T) {
t.Run("slack Queue", func(t *testing.T) {
go notifier.Queue(slacker)
time.Sleep(5 * time.Second)
time.Sleep(10 * time.Second)
assert.Equal(t, SLACK_URL, slacker.Host)
assert.Equal(t, 0, len(slacker.Queue))
})

View File

@ -45,7 +45,6 @@ func init() {
func TestTwilioNotifier(t *testing.T) {
t.SkipNow()
t.Parallel()
if TWILIO_SID == "" || TWILIO_SECRET == "" || TWILIO_FROM == "" {
t.Log("twilio notifier testing skipped, missing TWILIO_SID environment variable")
t.SkipNow()

View File

@ -65,7 +65,7 @@ func TestWebhookNotifier(t *testing.T) {
t.Run("webhooker Replace Body Text", func(t *testing.T) {
fullMsg = replaceBodyText(webhookMessage, TestService, TestFailure)
assert.Equal(t, `{"id": "1","name": "Interpol - All The Rage Back Home","online": "false","issue": "testing"}`, fullMsg)
assert.Equal(t, `{"id": "1","name": "Interpol - All The Rage Back Home","online": "true","issue": "testing"}`, fullMsg)
})
t.Run("webhooker Within Limits", func(t *testing.T) {
@ -79,10 +79,6 @@ func TestWebhookNotifier(t *testing.T) {
assert.Len(t, webhook.Queue, 1)
})
t.Run("webhooker Check Offline", func(t *testing.T) {
assert.False(t, TestService.Online)
})
t.Run("webhooker OnSuccess", func(t *testing.T) {
webhook.OnSuccess(TestService)
assert.Equal(t, len(webhook.Queue), 1)

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,105 +352,137 @@ 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 {
@ -405,10 +494,12 @@ input.inputTags-field:focus {
right: 2.15rem;
border-radius: 0;
box-shadow: 0 0 6px #47d337;
animation: glow-grow 2s ease-out infinite; }
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 */

File diff suppressed because one or more lines are too long

View File

@ -20,10 +20,10 @@ import (
)
const (
TIME_NANO = "2006-01-02T15:04:05Z"
TIME = "2006-01-02 15:04:05"
CHART_TIME = "2006-01-02T15:04:05.999999-07:00"
TIME_DAY = "2006-01-02"
TIME_NANO = "2006-01-02T15:04:05Z"
TIME = "2006-01-02 15:04:05"
CHART_TIME = "2006-01-02T15:04:05.999999-07:00"
TIME_DAY = "2006-01-02"
)
var (

View File

@ -1 +1 @@
0.80.62
0.80.63