Compare commits

..

2 commits

Author SHA1 Message Date
Gabriel Simmer b6a5d6332d
Tweak how origin is determined
All checks were successful
Nix build / build-docker (pull_request) Successful in 2m23s
Nix build / build-docker-arm (pull_request) Successful in 5m22s
2024-05-18 23:23:41 +01:00
Gabriel Simmer 66bfb09ab0
Add sample Grafana dashboard 2024-05-18 23:20:14 +01:00
2 changed files with 1326 additions and 2 deletions

View file

@ -482,15 +482,16 @@ WHERE id = $1 AND user_id = $2
func (s *Server) ShowPost(w http.ResponseWriter, r *http.Request) {
ui, _ := upsertUserInfo(r.Context(), s.db, s.lc, r.RemoteAddr)
var up *tailcfg.UserProfile
origin := "public"
if ui != nil {
up = ui.UserProfile
origin = "tailnet"
}
origin := "tailnet"
if valAny := r.Context().Value(privacyKey); valAny != nil {
if val, ok := valAny.(mixedCriticalityHandlerCtxKey); ok {
if val == isFunnel {
up = nil
origin = "public"
}
}
}

1323
contrib/grafana.json Normal file

File diff suppressed because it is too large Load diff