github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vadmin/Routes.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import ( 3 "github.com/samber/lo" 4 5 "github.com/kyleu/dbaudit/app" 6 "github.com/kyleu/dbaudit/app/controller/cutil" 7 "github.com/kyleu/dbaudit/app/util" 8 "github.com/kyleu/dbaudit/views/layout" 9 ) %} 10 11 {% code type Routes struct { 12 layout.Basic 13 Routes map[string][]string 14 } %} 15 16 {% func (p *Routes) Body(as *app.State, ps *cutil.PageState) %} 17 <div class="card"> 18 <h3>HTTP Routes</h3> 19 <ul class="mt"> 20 {%- for _, k := range util.ArraySorted(lo.Keys(p.Routes)) -%} 21 <li> 22 <strong>{%s k %}</strong> 23 <ul> 24 {%- for _, r := range p.Routes[k] -%} 25 <li><code>{%s r %}</code></li> 26 {%- endfor -%} 27 </ul> 28 </li> 29 {%- endfor -%} 30 </ul> 31 </div> 32 {% endfunc %}