aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2020-04-07 03:32:09 +0000
committerFelix Hanley <felix@userspace.com.au>2020-04-07 03:32:09 +0000
commitd249175eed66c382ea71372ccaa683c9a9cc4f68 (patch)
treea0a7ccead4b39835b9d4c49e4f415c6daf5ded6d
parentec84e5226503f4c1a4ec8658f9db52abf9674c99 (diff)
downloadsws-d249175eed66c382ea71372ccaa683c9a9cc4f68.tar.gz
sws-d249175eed66c382ea71372ccaa683c9a9cc4f68.tar.bz2
Add filter by referrer
-rw-r--r--go.sum2
-rw-r--r--tmpl/hitView.tmpl4
2 files changed, 5 insertions, 1 deletions
diff --git a/go.sum b/go.sum
index d60eba2..6e22dc1 100644
--- a/go.sum
+++ b/go.sum
@@ -27,6 +27,7 @@ github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA=
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -57,6 +58,7 @@ golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+o
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
diff --git a/tmpl/hitView.tmpl b/tmpl/hitView.tmpl
index 6e7b5c8..cb05929 100644
--- a/tmpl/hitView.tmpl
+++ b/tmpl/hitView.tmpl
@@ -86,7 +86,9 @@
<table class="table is-striped is-fullwidth details details--referrers">
{{ range .ReferrerSet }}
<tr>
- <td class="details__name">{{ .Name }}</td>
+ <td class="details__name">
+ <a href="/sites/{{ $siteID }}?{{ $payload.QuerySetEncode "referrer" .Name }}">{{ .Name }}</a>
+ </td>
<td class="details__count"><span class="details__percent has-text-right">{{ percent .Count $sum | round 1 }}%</span>&nbsp;({{ .Count }})</td>
</tr>
{{ end }}