// Copyright 2014 beego Author. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package beego
var indexTpl = `
{{define "content"}}
Beego Admin Dashboard
For detail usage please check our document:
Toolbox
Live Monitor
{{.Content}}
{{end}}`
var profillingTpl = `
{{define "content"}}
{{.Title}}
{{.Content}}
{{end}}`
var defaultScriptsTpl = ``
var gcAjaxTpl = `
{{define "scripts"}}
{{end}}
`
var qpsTpl = `
{{define "content"}}
Requests statistics
{{range $i, $slice := .Content}}
{{range $j, $elem := $slice}}
{{if eq $i 0}}
{{else}}
{{end}}
{{$elem}}
{{if eq $i 0}}
{{else}}
{{end}}
{{end}}
{{end}}
{{end}}
`
var configTpl = `
{{define "content"}}
Configurations
{{range $index, $elem := .Content}}
{{$index}}={{$elem}}
{{end}}
{{end}}
`
var routerAndFilterTpl = `
{{define "content"}}
{{.Title}}
{{range $i, $slice := .Content}}
{{ $header := index $slice 0}}
{{if eq "header" $header }}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
{{else if eq "success" $header}}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
{{else}}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
`
var tasksTpl = `
{{define "content"}}
{{.Title}}
{{if .Message }}
{{ $messageType := index .Message 0}}
{{index .Message 1}}
{{end}}
{{range $i, $slice := .Content}}
{{ $header := index $slice 0}}
{{if eq "header" $header }}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
Run Task
{{else}}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
Run
{{end}}
{{end}}
{{end}}
`
var healthCheckTpl = `
{{define "content"}}
{{.Title}}
{{range $i, $slice := .Content}}
{{ $header := index $slice 0}}
{{if eq "header" $header }}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
{{else}}
{{ if eq "success" $header}}
{{else if eq "error" $header}}
{{else}}
{{end}}
{{range $j, $elem := $slice}}
{{if ne $j 0}}
{{$elem}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}`
// The base dashboardTpl
var dashboardTpl = `
Welcome to Beego Admin Dashboard
{{template "content" .}}
{{template "scripts" .}}
`