dashboard

package
v0.0.0-...-44d2f18 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 15 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"
	// NotFoundTemplateName contains the 404 page
	NotFoundTemplateName = "notfound.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"
	// ImageScanDetailsTemplateName is a page for rendering a single image scan details
	ImageScanDetailsTemplateName = "image-scan-details.gohtml"
	// Container Image Vulnerabilities Scans general overview
	ImageScansOverviewTemplateName = "image-scans-overview.gohtml"
	// Kubernetes Cluster Overview
	ClusterOverviewTemplateName = "k8s-cluster-overview.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 config.Configuration, port int, basePath string) *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 MainHandler

func MainHandler(w http.ResponseWriter, r *http.Request, c config.Configuration, auditData scanners.AuditData, basePath string)

MainHandler gets template data and renders the dashboard with it.

func NotFoundHandler

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

NotFoundHandler creates 404 page

Types

type ImagesGroup

type ImagesGroup struct {
	Count       int
	Title       string
	Description string
}

Jump to

Keyboard shortcuts

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