Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Remove page-view tracking

0a12642f6c01236d1fbd4ee06aaa2bd2283c6bf0 · Keenan Nemetz · 3d ago · parent 8f6548a6

Remove page-view tracking

Counting a page wrote a row to instance.db on every successful HTML GET, so
reading the instance contended with CI and the merge worker for the one
write lock. The counters answered one status page and were not part of what
a restore has to keep, so the feature is gone rather than moved.

The status overview loses its page-view card and table; the rest of the
Admin page is unchanged. An instance that recorded views keeps the old
page_views table in instance.db, which nothing reads.

Refs #398

server/web/templates/status.html −23

@@ -21,11 +21,6 @@
21 21 <strong>{{.Repos}}</strong>
22 22 <span class="status-note">hosted here</span>
23 23 </div>
24 <div class="card">
25 <span class="muted">Page views</span>
26 <strong>{{if .Views.Disabled}}—{{else}}{{.Views.Month.Views}}{{end}}</strong>
27 <span class="status-note">{{if .Views.Disabled}}not recorded{{else}}last 30 days{{end}}</span>
28 </div>
29 24 </div>
30 25
31 26 <h2>Recent admin activity</h2>
@@ -69,24 +64,6 @@
69 64 </div>
70 65 <p class="muted"><a href="/-/admin?tab=configuration">See every effective setting</a></p>
71 66 {{end}}
72
73 <h2>Page views</h2>
74 {{if .Views.Disabled}}
75 <p class="muted">Page-view tracking is not wired on this instance.</p>
76 {{else}}
77 {{if .Views.Err}}<div class="flash bad">{{.Views.Err}}</div>{{end}}
78 <div class="panel">
79 <table>
80 <thead><tr><th>Period</th><th>Views</th><th>Unique signed-in users</th></tr></thead>
81 <tbody>
82 <tr><td>Today (UTC)</td><td>{{.Views.Today.Views}}</td><td>{{.Views.Today.Users}}</td></tr>
83 <tr><td>Last 7 days</td><td>{{.Views.Week.Views}}</td><td>{{.Views.Week.Users}}</td></tr>
84 <tr><td>Last 30 days</td><td>{{.Views.Month.Views}}</td><td>{{.Views.Month.Users}}</td></tr>
85 </tbody>
86 </table>
87 </div>
88 <p class="muted">Counts successful HTML pages. Static files, Git traffic, redirects, HTMX fragments, and this Admin page are excluded. Anonymous views count toward Views; Unique users counts signed-in accounts.</p>
89 {{end}}
90 67 {{end}}
91 68
92 69 {{if eq .Tab "storage"}}