github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/Debug.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/views/components"
     6    "github.com/kyleu/dbaudit/views/layout"
     7  ) %}
     8  
     9  {% code type Debug struct { layout.Basic } %}
    10  
    11  {% func (p *Debug) Body(as *app.State, ps *cutil.PageState) %}
    12    <div class="card">
    13      <h3>{%s ps.Title %}</h3>
    14      {%- if s, ok := ps.Data.(string); ok -%}
    15      <div class="overflow full-width"><pre class="mt">{%s s %}</pre></div>
    16      {%- else -%}
    17      {%s= components.JSON(ps.Data) %}
    18      {%- endif -%}
    19    </div>
    20  {% endfunc %}