dashboard

package
v0.0.0-...-150b812 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MainTemplateName is the main template
	MainTemplateName = "main.gohtml"
	// HeadTemplateName contains styles and meta info
	HeadTemplateName = "head.gohtml"
	// NavbarTemplateName contains the navbar
	NavbarTemplateName = "navbar.gohtml"
	// PreambleTemplateName contains an empty preamble that can be overridden
	PreambleTemplateName = "preamble.gohtml"
	// DashboardTemplateName contains the content of the dashboard
	DashboardTemplateName = "dashboard.gohtml"
	// FooterTemplateName contains the footer
	FooterTemplateName = "footer.gohtml"
	// CheckDetailsTemplateName is a page for rendering details about a given check
	CheckDetailsTemplateName = "check-details.gohtml"
)

Variables

This section is empty.

Functions

func DetailsHandler

func DetailsHandler(w http.ResponseWriter, r *http.Request, category string, basePath string)

DetailsHandler returns details for a given error type

func GetAssetBox

func GetAssetBox() *packr.Box

GetAssetBox returns a binary-friendly set of assets packaged from disk

func GetBaseTemplate

func GetBaseTemplate(name string) (*template.Template, error)

GetBaseTemplate puts together the dashboard template. Individual pieces can be overridden before rendering.

func GetMarkdownBox

func GetMarkdownBox() *packr.Box

GetMarkdownBox returns a binary-friendly set of markdown files with error details

func GetRouter

func GetRouter(c conf.Configuration, auditPath string, port int, basePath string, auditData *validator.AuditData) *mux.Router

GetRouter returns a mux router serving all routes necessary for the dashboard

func GetTemplateBox

func GetTemplateBox() *packr.Box

GetTemplateBox returns a binary-friendly set of templates for rendering the dash

func JSONHandler

func JSONHandler(w http.ResponseWriter, r *http.Request, auditData *validator.AuditData)

JSONHandler gets template data and renders json with it.

func MainHandler

func MainHandler(w http.ResponseWriter, r *http.Request, auditData validator.AuditData, basePath string)

MainHandler gets template data and renders the dashboard with it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL