github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vadmin/Modules.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import ( 3 "runtime/debug" 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 Modules struct { 12 layout.Basic 13 Modules []*debug.Module 14 } %} 15 16 {% func (p *Modules) Body(as *app.State, ps *cutil.PageState) %} 17 <div class="card"> 18 <div class="right">{%s util.AppName %} v{%s as.BuildInfo.Version %}</div> 19 <h3>Go Modules</h3> 20 {%= moduleTable(p.Modules) %} 21 </div> 22 {% endfunc %} 23 24 {% func moduleTable(mods []*debug.Module) %} 25 <div class="overflow full-width"> 26 <table class="mt"> 27 <thead> 28 <tr> 29 <th>Name</th> 30 <th>Version</th> 31 </tr> 32 </thead> 33 <tbody> 34 {%- for _, m := range mods -%} 35 <tr> 36 <td><a target="_blank" rel="noopener noreferrer" href="https://{%s m.Path %}">{%s m.Path %}</a></td> 37 <td title="{%s m.Sum %}">{%s m.Version %}</td> 38 </tr> 39 {%- endfor -%} 40 </tbody> 41 </table> 42 </div> 43 {% endfunc %}