Zone-based firewall page, per-sensor temperatures, 15 minute default

The firewall page now manages zones (assign each LAN or tunnel, add and
remove zones) and rules with zone, address and port on both sides plus the
protocol. router.firewall.zones declares zones without members and rules
take sourcePorts. The temperature chart draws every thermal zone and hwmon
sensor; the overview defaults to 15 minutes, 1h stays an option.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-10-30 09:26:25 +01:00
co-authored by Claude Sonnet 5.5
parent e2986f1418
commit eda7080d94
14 changed files with 713 additions and 149 deletions
+25 -12
View File
@@ -25,24 +25,37 @@ var tiers = []struct {
{3600, 720},
}
// Ranges the dashboard offers, and the tier each one reads.
var ranges = []struct {
Name string
Tier int
}{
{"1h", 0},
{"24h", 1},
{"7d", 2},
{"30d", 3},
// Ranges the dashboard offers: the tier each one reads and how many of its
// newest slots it shows (0: all of them). The first one is the default.
var ranges = []timeRange{
{"15m", 0, 180},
{"1h", 0, 0},
{"24h", 1, 0},
{"7d", 2, 0},
{"30d", 3, 0},
}
func rangeTier(name string) (int, string) {
type timeRange struct {
Name string
Tier int
Slots int
}
// slots is how many slots of its tier the range shows.
func (r timeRange) slots() int {
if r.Slots > 0 {
return r.Slots
}
return tiers[r.Tier].Slots
}
func findRange(name string) timeRange {
for _, r := range ranges {
if r.Name == name {
return r.Tier, r.Name
return r
}
}
return 0, ranges[0].Name
return ranges[0]
}
type Tier struct {