diff --git a/pkg/dashboard/dashboard.go b/pkg/dashboard/dashboard.go index 0ad827cc3..b0d03a0bc 100644 --- a/pkg/dashboard/dashboard.go +++ b/pkg/dashboard/dashboard.go @@ -30,10 +30,12 @@ import ( const ( // MainTemplateName is the main template MainTemplateName = "main.gohtml" - // DashboardTemplateName contains the content of the dashboard - DashboardTemplateName = "dashboard.gohtml" // HeaderTemplateName contains the navbar HeaderTemplateName = "header.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" ) @@ -78,7 +80,13 @@ func GetBaseTemplate(name string) (*template.Template, error) { }) templateBox := GetTemplateBox() - templateFileNames := []string{DashboardTemplateName, HeaderTemplateName, FooterTemplateName, MainTemplateName} + templateFileNames := []string{ + DashboardTemplateName, + HeaderTemplateName, + PreambleTemplateName, + FooterTemplateName, + MainTemplateName, + } for _, fname := range templateFileNames { templateFile, err := templateBox.Find(fname) if err != nil { diff --git a/pkg/dashboard/templates/preamble.gohtml b/pkg/dashboard/templates/preamble.gohtml new file mode 100644 index 000000000..08d8b7176 --- /dev/null +++ b/pkg/dashboard/templates/preamble.gohtml @@ -0,0 +1,2 @@ +{{ define "preamble" }} +{{ end }}