Optionally hide Monitor page in Admin nav

This adds a new config option that signifies the admin doesn't need to
see deeply technical things, like application resource usage. In the
[app] section, set forest = true to enable this.

Ref T694
admin-dashboard-redesign
Matt Baer 5 years ago
parent 92da069ce4
commit b58464addb
  1. 1
      config/config.go
  2. 2
      templates/user/include/header.tmpl

@ -93,6 +93,7 @@ type (
// Site functionality
Chorus bool `ini:"chorus"`
Forest bool `ini:"forest"` // The admin cares about the forest, not the trees. Hide unnecessary technical info.
DisableDrafts bool `ini:"disable_drafts"`
// Users

@ -104,7 +104,9 @@
<a href="/admin/users" {{if eq .Path "/admin/users"}}class="selected"{{end}}>Users</a>
<a href="/admin/pages" {{if eq .Path "/admin/pages"}}class="selected"{{end}}>Pages</a>
{{end}}
{{if not .Forest}}
<a href="/admin/monitor" {{if eq .Path "/admin/monitor"}}class="selected"{{end}}>Monitor</a>
{{end}}
</nav>
</header>
{{end}}

Loading…
Cancel
Save