diff --git a/assets/js/custom.js b/assets/js/custom.js index 005dc92..df3eaac 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -25,6 +25,11 @@ } }); }); + $(function() { + $('select.device-selector').change(function() { + this.form.submit(); + }); + }); })(jQuery); // End of use strict diff --git a/assets/tpl/admin_index.html b/assets/tpl/admin_index.html index 7e7afd3..06a53d1 100644 --- a/assets/tpl/admin_index.html +++ b/assets/tpl/admin_index.html @@ -106,6 +106,7 @@ {{range $i, $p :=.Peers}} + {{$peerUser:=(userForEmail $.Users $p.Email)}} @@ -142,14 +143,14 @@

User details

- {{if not $p.User}} + {{if not $peerUser}}

No user information available...

{{else}} {{end}}

Connection / Traffic

diff --git a/assets/tpl/prt_nav.html b/assets/tpl/prt_nav.html index 6ab5d9b..994f540 100644 --- a/assets/tpl/prt_nav.html +++ b/assets/tpl/prt_nav.html @@ -22,6 +22,19 @@ {{end}} {{end}}{{end}} + {{with eq $.Session.LoggedIn true}}{{with eq $.Session.IsAdmin true}} + {{with startsWith $.Route "/admin/"}} +
+
+ +
+
+ {{end}} + {{end}}{{end}} {{if eq $.Session.LoggedIn true}}