diff --git a/Makefile b/Makefile index 400efc72..139a40f8 100644 --- a/Makefile +++ b/Makefile @@ -202,7 +202,7 @@ clean: find . -name "*.out" -type f -delete find . -name "*.cpu" -type f -delete find . -name "*.mem" -type f -delete - rm -rf {build,releases,tmp} + rm -rf {build,releases,tmp,source/build} print_details: @echo \==== Statping Development Instance ==== diff --git a/README.md b/README.md index 97f0b189..fd6d955e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ # Statping - Status Page & Monitoring Server An easy to use Status Page for your websites and applications. Statping will automatically fetch the application and render a beautiful status page with tons of features for you to build an even better status page. This Status Page generator allows you to use MySQL, Postgres, or SQLite on multiple operating systems. -[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/statping/statping) [![Slack](https://slack.statping.com/badge.svg)](https://slack.statping.com) [![](https://images.microbadger.com/badges/image/statping/statping.svg)](https://microbadger.com/images/statping/statping) [![Docker Pulls](https://img.shields.io/docker/pulls/statping/statping.svg)](https://hub.docker.com/r/statping/statping/builds/) +[![Master Release](https://github.com/statping/statping/actions)](https://github.com/statping/statping/workflows/Master%20Release/badge.svg) [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/statping/statping) [![Slack](https://slack.statping.com/badge.svg)](https://slack.statping.com) [![](https://images.microbadger.com/badges/image/statping/statping.svg)](https://microbadger.com/images/statping/statping) [![Docker Pulls](https://img.shields.io/docker/pulls/statping/statping.svg)](https://hub.docker.com/r/statping/statping/builds/)

@@ -38,7 +38,7 @@ The Status binary for all other OS's is ~17Mb at most.

Mobile App is Gorgeous

-The Statping app is available on the App Store and Google Play for free. The app will allow you to view services, receive notifications when a service is offline, update groups, users, services, messages, and more! Start your own Statping server and then connect it to the app by scanning the QR code in settings. +The Statping app is available on the App Store and Google Play for free. The app will allow you to view services, receive notifications when a service is offline, update groups, users, services, messages, and more! Start your own Statping server and then connect it to the app by scanning the QR code in settings.

diff --git a/cmd/assets.go b/cmd/assets.go deleted file mode 100644 index 34600cc7..00000000 --- a/cmd/assets.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/statping/statping/source" - "github.com/statping/statping/utils" - "net" -) - -// UsingAssets will return true if /assets folder is present -func UsingAssets() bool { - return source.UsingAssets(utils.Directory) -} - -// GetLocalIP returns the non loopback local IP of the host -func GetLocalIP() string { - addrs, err := net.InterfaceAddrs() - if err != nil { - return "http://localhost" - } - for _, address := range addrs { - // check the address type and if it is not a loopback the display it - if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() { - if ipnet.IP.To4() != nil { - return fmt.Sprintf("http://%v", ipnet.IP.String()) - } - } - } - return "http://localhost" -} diff --git a/source/source.go b/source/source.go index 397065d8..b84856dd 100644 --- a/source/source.go +++ b/source/source.go @@ -9,6 +9,7 @@ import ( "github.com/russross/blackfriday/v2" "github.com/statping/statping/utils" "os" + "os/exec" "path/filepath" "strings" ) @@ -44,6 +45,12 @@ func scssRendered(name string) string { func CompileSASS(files ...string) error { sassBin := utils.Params.GetString("SASS") + path, err := exec.LookPath("sass") + if err != nil { + return err + } + sassBin = path + for _, file := range files { scssFile := fmt.Sprintf("%v/assets/%v", utils.Params.GetString("STATPING_DIR"), file) diff --git a/utils/utils.go b/utils/utils.go index 2e0ef5ce..d44acaf7 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -117,7 +117,7 @@ func (t Timestamp) Ago() string { // Command will run a terminal command with 'sh -c COMMAND' and return stdout and errOut as strings // in, out, err := Command("sass assets/scss assets/css/base.css") func Command(name string, args ...string) (string, string, error) { - Log.Debugln("running command: " + name + strings.Join(args, " ")) + Log.Info("running command: " + name + strings.Join(args, " ")) testCmd := exec.Command(name, args...) var stdout, stderr []byte var errStdout, errStderr error