fix check skip log noise and browser session crash (#87)
- Downgrade check executor skip log from info to debug to stop flooding production logs every 60s for every agent-assigned device check - Fix KeyError on session.user_agent in settings page - BrowserSession schema has device_type field, not user_agent Reviewed-on: graham/towerops-web#87
This commit is contained in:
parent
0c2c4cc354
commit
63fc09e58a
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ defmodule Towerops.Workers.CheckExecutorWorker do
|
|||
|
||||
defp execute_or_skip(check) do
|
||||
if should_skip_check?(check) do
|
||||
Logger.info("Skipping check #{check.id} (#{check.check_type}) - device has agent or Phoenix SNMP disabled")
|
||||
Logger.debug("Skipping check #{check.id} (#{check.check_type}) - device has agent or Phoenix SNMP disabled")
|
||||
else
|
||||
execute_and_record(check)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -898,7 +898,7 @@
|
|||
<li class="flex items-center justify-between gap-x-6 py-5">
|
||||
<div class="flex items-start gap-x-3 min-w-0 flex-1">
|
||||
<div class="flex-shrink-0 mt-1">
|
||||
<%= if String.contains?(String.downcase(session.user_agent || ""), ["mobile", "android", "iphone", "ipad"]) do %>
|
||||
<%= if session.device_type in ["mobile", "tablet"] do %>
|
||||
<.icon name="hero-device-phone-mobile" class="h-6 w-6 text-gray-400" />
|
||||
<% else %>
|
||||
<.icon name="hero-computer-desktop" class="h-6 w-6 text-gray-400" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue