Skip to content

Commit

Permalink
FreeBSD added to icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaughany committed Aug 30, 2021
1 parent 4847a46 commit b7fb34c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Binary file added cmd/receiver/assets/img/freebsd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions cmd/receiver/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"html/template"
"log"
"net/http"
"runtime"
"sort"
"strings"
"time"
Expand All @@ -20,7 +21,11 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
}

func dashboardHandler(w http.ResponseWriter, r *http.Request) {
var data HTMLData
var (
data HTMLData
subFooterHTML = fmt.Sprintf("See <a href=\"https://%s\" target=\"_blank\">%s</a> for more info.", vcms.ProjectURL, vcms.ProjectURL)
footerHTML = fmt.Sprintf("<strong>%s</strong> v%s (%s), built with %s, %s/%s. %s", vcms.AppTitle, vcms.AppVersion, vcms.AppDate, runtime.Version(), runtime.GOOS, runtime.GOARCH, subFooterHTML)
)

funcMap := template.FuncMap{
"inc": func(i int) int {
Expand All @@ -38,7 +43,7 @@ func dashboardHandler(w http.ResponseWriter, r *http.Request) {
// Build the HTML.
data.Title = vcms.AppTitle
// data.Subtitle = "Something Something Darkside"
data.Footer = template.HTML(cmdFooterHTML)
data.Footer = template.HTML(footerHTML)
for _, key := range keys {
var row rowData
if len(nodes[key].Meta.Errors) > 0 {
Expand Down Expand Up @@ -116,6 +121,8 @@ func getOSImage(node *vcms.SystemData) string {
return "elementary"
case strings.Contains(input, "fedora"):
return "fedora"
case strings.Contains(input, "freebsd"):
return "freebsd"
case strings.Contains(input, "kali"):
return "kali"
// case strings.Contains(input, "kubuntu"): // Kubuntu identifies itself as Ubuntu.
Expand Down

0 comments on commit b7fb34c

Please sign in to comment.