mirror of https://github.com/statping/statping
				
				
				
			
							parent
							
								
									b4ee5ae514
								
							
						
					
					
						commit
						473419fefb
					
				| 
						 | 
					@ -0,0 +1,33 @@
 | 
				
			||||||
 | 
					###########################
 | 
				
			||||||
 | 
					##  Database Information  #
 | 
				
			||||||
 | 
					###########################
 | 
				
			||||||
 | 
					DB_CONNECTION=postgres
 | 
				
			||||||
 | 
					DB_HOST=localhost
 | 
				
			||||||
 | 
					DB_PORT=5432
 | 
				
			||||||
 | 
					DB_USER=root
 | 
				
			||||||
 | 
					DB_PASS=password123
 | 
				
			||||||
 | 
					DB_DATABASE=root
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					###########################
 | 
				
			||||||
 | 
					##  STATUP PAGE SETTINGS  #
 | 
				
			||||||
 | 
					###########################
 | 
				
			||||||
 | 
					NAME=Demo
 | 
				
			||||||
 | 
					DESCRIPTION=This is an awesome page
 | 
				
			||||||
 | 
					DOMAIN=https://domain.com
 | 
				
			||||||
 | 
					ADMIN_USER=admin
 | 
				
			||||||
 | 
					ADMIN_PASS=admin
 | 
				
			||||||
 | 
					ADMIN_EMAIL=info@admin.com
 | 
				
			||||||
 | 
					USE_CDN=true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					###########################
 | 
				
			||||||
 | 
					##     System Values     ##
 | 
				
			||||||
 | 
					###########################
 | 
				
			||||||
 | 
					IS_DOCKER=true
 | 
				
			||||||
 | 
					IS_AWS=true
 | 
				
			||||||
 | 
					SASS=/usr/local/bin/sass
 | 
				
			||||||
 | 
					BASH_ENV=/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,7 @@ services:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
env:
 | 
					env:
 | 
				
			||||||
  global:
 | 
					  global:
 | 
				
			||||||
     - VERSION=0.27
 | 
					     - VERSION=0.27.1
 | 
				
			||||||
     - DB_HOST=localhost
 | 
					     - DB_HOST=localhost
 | 
				
			||||||
     - DB_USER=travis
 | 
					     - DB_USER=travis
 | 
				
			||||||
     - DB_PASS=
 | 
					     - DB_PASS=
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,9 +2,9 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
APP="statup"
 | 
					APP="statup"
 | 
				
			||||||
REPO="hunterlong/statup"
 | 
					REPO="hunterlong/statup"
 | 
				
			||||||
SASS=1.7.1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# COMPILE BOOTSTRAP
 | 
					# COMPILE BOOTSTRAP
 | 
				
			||||||
 | 
					rm -rf bootstrap
 | 
				
			||||||
git clone https://github.com/twbs/bootstrap.git
 | 
					git clone https://github.com/twbs/bootstrap.git
 | 
				
			||||||
cd bootstrap
 | 
					cd bootstrap
 | 
				
			||||||
npm install
 | 
					npm install
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@ cd ../
 | 
				
			||||||
rm -rf bootstrap
 | 
					rm -rf bootstrap
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# RENDERING CSS
 | 
					# RENDERING CSS
 | 
				
			||||||
gem install sass
 | 
					#gem install sass
 | 
				
			||||||
sass html/scss/base.scss html/css/base.css
 | 
					sass html/scss/base.scss html/css/base.css
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# MIGRATION SQL FILE FOR CURRENT VERSION
 | 
					# MIGRATION SQL FILE FOR CURRENT VERSION
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,6 +15,7 @@ RUN wget https://assets.statup.io/sass && \
 | 
				
			||||||
      chmod +x sass && \
 | 
					      chmod +x sass && \
 | 
				
			||||||
      mv sass /usr/local/bin/sass
 | 
					      mv sass /usr/local/bin/sass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENV SASS=/usr/local/bin/sass
 | 
				
			||||||
ENV CMD_FILE=/usr/bin/cmd
 | 
					ENV CMD_FILE=/usr/bin/cmd
 | 
				
			||||||
RUN printf "#!/usr/bin/env sh\n\$1\n" > $CMD_FILE && \
 | 
					RUN printf "#!/usr/bin/env sh\n\$1\n" > $CMD_FILE && \
 | 
				
			||||||
      chmod +x $CMD_FILE
 | 
					      chmod +x $CMD_FILE
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,9 +30,11 @@ func MakePublicFolder(folder string) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func CompileSASS() {
 | 
					func CompileSASS() {
 | 
				
			||||||
	cmdBin := os.Getenv("CMD_FILE")
 | 
						cmdBin := os.Getenv("SASS")
 | 
				
			||||||
 | 
						shell := os.Getenv("BASH_ENV")
 | 
				
			||||||
	fmt.Println("Compiling SASS into /css/base.css...")
 | 
						fmt.Println("Compiling SASS into /css/base.css...")
 | 
				
			||||||
	testCmd := exec.Command(cmdBin, "sass assets/scss/base.scss assets/css/base.css")
 | 
						command := fmt.Sprintf("%v %v %v", cmdBin, "assets/scss/base.scss", "assets/css/base.css")
 | 
				
			||||||
 | 
						testCmd := exec.Command(shell, command)
 | 
				
			||||||
	_, err := testCmd.Output()
 | 
						_, err := testCmd.Output()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		fmt.Println(err)
 | 
							fmt.Println(err)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										34
									
								
								cli.go
								
								
								
								
							
							
						
						
									
										34
									
								
								cli.go
								
								
								
								
							| 
						 | 
					@ -2,6 +2,7 @@ package main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
						"github.com/joho/godotenv"
 | 
				
			||||||
	"os"
 | 
						"os"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
| 
						 | 
					@ -29,6 +30,39 @@ func CatchCLI(args []string) {
 | 
				
			||||||
		HelpEcho()
 | 
							HelpEcho()
 | 
				
			||||||
	case "update":
 | 
						case "update":
 | 
				
			||||||
		fmt.Println("Sorry updating isn't available yet!")
 | 
							fmt.Println("Sorry updating isn't available yet!")
 | 
				
			||||||
 | 
						case "run":
 | 
				
			||||||
 | 
							fmt.Println("Running 1 time and saving to database...")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							var err error
 | 
				
			||||||
 | 
							configs, err = LoadConfig()
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								fmt.Println("config.yml file not found")
 | 
				
			||||||
 | 
								os.Exit(1)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							err = DbConnection(configs.Connection)
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								throw(err)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							core, err = SelectCore()
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								fmt.Println("Core database was not found, Statup is not setup yet.")
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							services, _ = SelectAllServices()
 | 
				
			||||||
 | 
							for _, s := range services {
 | 
				
			||||||
 | 
								out := s.Check()
 | 
				
			||||||
 | 
								fmt.Printf("    Service %v | URL: %v | Latency: %0.0fms | Online: %v\n", out.Name, out.Domain, (out.Latency * 1000), out.Online)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							fmt.Println("Check is complete.")
 | 
				
			||||||
 | 
						case "env":
 | 
				
			||||||
 | 
							fmt.Println("Statup Environment Variables")
 | 
				
			||||||
 | 
							envs, err := godotenv.Read(".env")
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								fmt.Println("No .env file found in current directory.")
 | 
				
			||||||
 | 
								os.Exit(1)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for k, e := range envs {
 | 
				
			||||||
 | 
								fmt.Printf("%v=%v\n", k, e)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
		fmt.Println("Statup does not have the command you entered.")
 | 
							fmt.Println("Statup does not have the command you entered.")
 | 
				
			||||||
		os.Exit(1)
 | 
							os.Exit(1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										22
									
								
								errors.go
								
								
								
								
							
							
						
						
									
										22
									
								
								errors.go
								
								
								
								
							| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
package main
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"fmt"
 | 
					 | 
				
			||||||
	"strings"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (f *Failure) ParseError() string {
 | 
					 | 
				
			||||||
	err := strings.Contains(f.Issue, "operation timed out")
 | 
					 | 
				
			||||||
	if err {
 | 
					 | 
				
			||||||
		return fmt.Sprintf("HTTP Request Timed Out")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	err = strings.Contains(f.Issue, "x509: certificate is valid")
 | 
					 | 
				
			||||||
	if err {
 | 
					 | 
				
			||||||
		return fmt.Sprintf("SSL Certificate invalid")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	err = strings.Contains(f.Issue, "no such host")
 | 
					 | 
				
			||||||
	if err {
 | 
					 | 
				
			||||||
		return fmt.Sprintf("Domain is offline or not found")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return f.Issue
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,235 +1,221 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
      Main Design
 | 
					 | 
				
			||||||
   =================
 | 
					 | 
				
			||||||
    - Background
 | 
					 | 
				
			||||||
    - Boxes
 | 
					 | 
				
			||||||
    - Font Colors
 | 
					 | 
				
			||||||
    - div widths
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
    Card Design
 | 
					 | 
				
			||||||
  ================
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
HTML, BODY {
 | 
					HTML, BODY {
 | 
				
			||||||
  background-color: #fcfcfc;
 | 
					    background-color: #fcfcfc;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.container {
 | 
					.container {
 | 
				
			||||||
  padding-top: 20px;
 | 
					    padding-top: 20px;
 | 
				
			||||||
  padding-bottom: 20px;
 | 
					    padding-bottom: 20px;
 | 
				
			||||||
  max-width: 860px;
 | 
					    max-width: 860px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.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: 26pt;
 | 
					    font-size: 26pt;
 | 
				
			||||||
  font-weight: bold;
 | 
					    font-weight: bold;
 | 
				
			||||||
  display: block;
 | 
					    display: block;
 | 
				
			||||||
  color: #474747;
 | 
					    color: #474747;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.stats_area {
 | 
					.stats_area {
 | 
				
			||||||
  text-align: center;
 | 
					    text-align: center;
 | 
				
			||||||
  color: #a5a5a5;
 | 
					    color: #a5a5a5;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lower_canvas {
 | 
					.lower_canvas {
 | 
				
			||||||
  height: 55px;
 | 
					    height: 55px;
 | 
				
			||||||
  width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
  background-color: #48d338;
 | 
					    background-color: #48d338;
 | 
				
			||||||
  padding: 17px 10px;
 | 
					    padding: 17px 10px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.lower_canvas SPAN {
 | 
					.lower_canvas SPAN {
 | 
				
			||||||
  font-size: 1rem;
 | 
					    font-size: 1rem;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.footer {
 | 
					.footer {
 | 
				
			||||||
  text-decoration: none;
 | 
					    text-decoration: none;
 | 
				
			||||||
  margin-top: 20px;
 | 
					    margin-top: 20px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.footer A {
 | 
					.footer A {
 | 
				
			||||||
  color: #aaaaaa;
 | 
					    color: #aaaaaa;
 | 
				
			||||||
  text-decoration: none;
 | 
					    text-decoration: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.footer A:HOVER {
 | 
					.footer A:HOVER {
 | 
				
			||||||
  color: #6d6d6d;
 | 
					    color: #6d6d6d;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.online_badge {
 | 
					.online_badge {
 | 
				
			||||||
  color: #fff;
 | 
					    color: #fff;
 | 
				
			||||||
  background-color: #35b317;
 | 
					    background-color: #35b317;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.offline_badge {
 | 
					.offline_badge {
 | 
				
			||||||
  color: #fff;
 | 
					    color: #fff;
 | 
				
			||||||
  background-color: #c51919;
 | 
					    background-color: #c51919;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.progress {
 | 
					.progress {
 | 
				
			||||||
  margin-top: -20px;
 | 
					    margin-top: -20px;
 | 
				
			||||||
  margin-left: -20px;
 | 
					    margin-left: -20px;
 | 
				
			||||||
  margin-bottom: 15px;
 | 
					    margin-bottom: 15px;
 | 
				
			||||||
  width: calc(100% + 40px);
 | 
					    width: calc(100% + 40px);
 | 
				
			||||||
  height: 3px;
 | 
					    height: 3px;
 | 
				
			||||||
  border-radius: 0;
 | 
					    border-radius: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.card {
 | 
					.card {
 | 
				
			||||||
  background-color: #fff;
 | 
					    background-color: #fff;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.card-body {
 | 
					.card-body {
 | 
				
			||||||
  overflow: hidden;
 | 
					    overflow: hidden;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.card-body H4 A {
 | 
					.card-body H4 A {
 | 
				
			||||||
  color: #239e07;
 | 
					    color: #239e07;
 | 
				
			||||||
  text-decoration: none;
 | 
					    text-decoration: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.chart-container {
 | 
					.chart-container {
 | 
				
			||||||
  position: relative;
 | 
					    position: relative;
 | 
				
			||||||
  height: 170px;
 | 
					    height: 170px;
 | 
				
			||||||
  width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.CodeMirror {
 | 
					.CodeMirror {
 | 
				
			||||||
  /* Bootstrap Settings */
 | 
					    /* Bootstrap Settings */
 | 
				
			||||||
  box-sizing: border-box;
 | 
					    box-sizing: border-box;
 | 
				
			||||||
  margin: 0;
 | 
					    margin: 0;
 | 
				
			||||||
  font: inherit;
 | 
					    font: inherit;
 | 
				
			||||||
  overflow: auto;
 | 
					    overflow: auto;
 | 
				
			||||||
  font-family: inherit;
 | 
					    font-family: inherit;
 | 
				
			||||||
  display: block;
 | 
					    display: block;
 | 
				
			||||||
  width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
  padding: 0px;
 | 
					    padding: 0px;
 | 
				
			||||||
  font-size: 14px;
 | 
					    font-size: 14px;
 | 
				
			||||||
  line-height: 1.5;
 | 
					    line-height: 1.5;
 | 
				
			||||||
  color: #555;
 | 
					    color: #555;
 | 
				
			||||||
  background-color: #fff;
 | 
					    background-color: #fff;
 | 
				
			||||||
  background-image: none;
 | 
					    background-image: none;
 | 
				
			||||||
  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 0.15s, box-shadow ease-in-out 0.15s;
 | 
				
			||||||
  /* Code Mirror Settings */
 | 
					    /* Code Mirror Settings */
 | 
				
			||||||
  font-family: monospace;
 | 
					    font-family: monospace;
 | 
				
			||||||
  position: relative;
 | 
					    position: relative;
 | 
				
			||||||
  overflow: hidden;
 | 
					    overflow: hidden;
 | 
				
			||||||
  height: 60vh;
 | 
					    height: 60vh;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.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 0.15s, box-shadow ease-in-out 0.15s;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@media (max-width: 767px) {
 | 
					@media (max-width: 767px) {
 | 
				
			||||||
  .sm-container {
 | 
					    .sm-container {
 | 
				
			||||||
    margin-top: 40px !important;
 | 
					        margin-top: 40px !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: 0 !important;
 | 
					        padding: 0 !important;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .navbar {
 | 
					    .navbar {
 | 
				
			||||||
    margin-left: 0px;
 | 
					        margin-left: 0px;
 | 
				
			||||||
    margin-top: 0px;
 | 
					        margin-top: 0px;
 | 
				
			||||||
    width: 100%;
 | 
					        width: 100%;
 | 
				
			||||||
    margin-bottom: 0;
 | 
					        margin-bottom: 0;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .card-body {
 | 
					    .card-body {
 | 
				
			||||||
    font-size: 6pt;
 | 
					        font-size: 6pt;
 | 
				
			||||||
    padding: 5px 5px;
 | 
					        padding: 5px 5px;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .lg_number {
 | 
					    .lg_number {
 | 
				
			||||||
    font-size: 1.5rem;
 | 
					        font-size: 1.5rem;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .stats_area {
 | 
					    .stats_area {
 | 
				
			||||||
    margin-top: 35px !important;
 | 
					        margin-top: 35px !important;
 | 
				
			||||||
    margin-bottom: 35px !important;
 | 
					        margin-bottom: 35px !important;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .stats_area .col-4 {
 | 
					    .stats_area .col-4 {
 | 
				
			||||||
    padding-left: 0;
 | 
					        padding-left: 0;
 | 
				
			||||||
    padding-right: 0;
 | 
					        padding-right: 0;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .lower_canvas SPAN {
 | 
					    .lower_canvas SPAN {
 | 
				
			||||||
    font-size: 0.9rem;
 | 
					        font-size: 0.9rem;
 | 
				
			||||||
    float: left;
 | 
					        float: left;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .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: 0;
 | 
					        border-radius: 0;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .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;
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
/*# sourceMappingURL=base.css.map */
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
@import 'variables';
 | 
					@import '_variables';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HTML,BODY {
 | 
					HTML,BODY {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,28 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
      Main Design
 | 
					 | 
				
			||||||
   =================
 | 
					 | 
				
			||||||
    - Background
 | 
					 | 
				
			||||||
    - Boxes
 | 
					 | 
				
			||||||
    - Font Colors
 | 
					 | 
				
			||||||
    - div widths
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
$background-color: #fcfcfc;
 | 
					 | 
				
			||||||
$max-width: 860px;
 | 
					 | 
				
			||||||
$online-color: #47d337;
 | 
					 | 
				
			||||||
$offline-color: #dd3545;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
    Card Design
 | 
					 | 
				
			||||||
  ================
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
$card-background: #fff;
 | 
					 | 
				
			||||||
$card-stats-color: #474747;
 | 
					 | 
				
			||||||
$card-stats-size: 26pt;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										8
									
								
								main.go
								
								
								
								
							
							
						
						
									
										8
									
								
								main.go
								
								
								
								
							| 
						 | 
					@ -7,6 +7,7 @@ import (
 | 
				
			||||||
	"github.com/go-yaml/yaml"
 | 
						"github.com/go-yaml/yaml"
 | 
				
			||||||
	"github.com/gorilla/sessions"
 | 
						"github.com/gorilla/sessions"
 | 
				
			||||||
	"github.com/hunterlong/statup/plugin"
 | 
						"github.com/hunterlong/statup/plugin"
 | 
				
			||||||
 | 
						"github.com/joho/godotenv"
 | 
				
			||||||
	"golang.org/x/crypto/bcrypt"
 | 
						"golang.org/x/crypto/bcrypt"
 | 
				
			||||||
	"io"
 | 
						"io"
 | 
				
			||||||
	"io/ioutil"
 | 
						"io/ioutil"
 | 
				
			||||||
| 
						 | 
					@ -92,6 +93,13 @@ func DownloadFile(filepath string, url string) error {
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func init() {
 | 
				
			||||||
 | 
						err := godotenv.Load()
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							fmt.Println("Error loading .env file")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
	if len(os.Args) >= 2 {
 | 
						if len(os.Args) >= 2 {
 | 
				
			||||||
		CatchCLI(os.Args)
 | 
							CatchCLI(os.Args)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -95,11 +95,6 @@ func (s *Service) Online24() float32 {
 | 
				
			||||||
	return s.Online24Hours
 | 
						return s.Online24Hours
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type GraphJson struct {
 | 
					 | 
				
			||||||
	X string  `json:"x"`
 | 
					 | 
				
			||||||
	Y float64 `json:"y"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
type DateScan struct {
 | 
					type DateScan struct {
 | 
				
			||||||
	CreatedAt time.Time `json:"x"`
 | 
						CreatedAt time.Time `json:"x"`
 | 
				
			||||||
	Value     int64     `json:"y"`
 | 
						Value     int64     `json:"y"`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,9 +6,24 @@ import (
 | 
				
			||||||
	"html/template"
 | 
						"html/template"
 | 
				
			||||||
	"io/ioutil"
 | 
						"io/ioutil"
 | 
				
			||||||
	"log"
 | 
						"log"
 | 
				
			||||||
 | 
						"strings"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var httpFunctions template.FuncMap
 | 
					func (f *Failure) ParseError() string {
 | 
				
			||||||
 | 
						err := strings.Contains(f.Issue, "operation timed out")
 | 
				
			||||||
 | 
						if err {
 | 
				
			||||||
 | 
							return fmt.Sprintf("HTTP Request Timed Out")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						err = strings.Contains(f.Issue, "x509: certificate is valid")
 | 
				
			||||||
 | 
						if err {
 | 
				
			||||||
 | 
							return fmt.Sprintf("SSL Certificate invalid")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						err = strings.Contains(f.Issue, "no such host")
 | 
				
			||||||
 | 
						if err {
 | 
				
			||||||
 | 
							return fmt.Sprintf("Domain is offline or not found")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return f.Issue
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func ExportIndexHTML() string {
 | 
					func ExportIndexHTML() string {
 | 
				
			||||||
	core.OfflineAssets = true
 | 
						core.OfflineAssets = true
 | 
				
			||||||
		Loading…
	
		Reference in New Issue