github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/vadmin/ServerInfo.html (about)

     1  <!-- Content managed by Project Forge, see [projectforge.md] for details. -->
     2  {% import (
     3    "github.com/kyleu/dbaudit/app"
     4    "github.com/kyleu/dbaudit/app/controller/cutil"
     5    "github.com/kyleu/dbaudit/app/util"
     6    "github.com/kyleu/dbaudit/views/layout"
     7  ) %}
     8  
     9  {% code type ServerInfo struct {
    10    layout.Basic
    11    Info *util.DebugInfo
    12  } %}
    13  
    14  {% func (p *ServerInfo) Body(as *app.State, ps *cutil.PageState) %}
    15    {%= renderTags("Server Information", p.Info.ServerTags) %}
    16    {%= renderTags("Runtime Information", p.Info.RuntimeTags) %}
    17    {%= renderTags("App Information", p.Info.AppTags) %}
    18    <div class="card">
    19      <h3>Go Modules</h3>
    20      {%= moduleTable(p.Info.Mods) %}
    21    </div>
    22  {% endfunc %}
    23  
    24  {% func renderTags(title string, tags *util.OrderedMap[string]) %}
    25    <div class="card">
    26      <h3>{%s title %}</h3>
    27      <div class="overflow full-width">
    28        <table class="mt min-200">
    29          <tbody>
    30          {%- for _, k := range tags.Order -%}
    31          <tr>
    32            <th class="shrink">{%s k %}</th>
    33            <td>{%s tags.GetSimple(k) %}</td>
    34          </tr>
    35          {%- endfor -%}
    36          </tbody>
    37        </table>
    38      </div>
    39    </div>
    40  {% endfunc %}