mirror of
https://github.com/Dvorinka/beszel.git
synced 2026-06-03 21:02:56 +00:00
feat(site): enhance monitoring, domain, and system tracking
Build Docker images / Hub (push) Failing after 5m57s
Build Docker images / Hub (push) Failing after 5m57s
- Improve domain lookup by adding CNAME and SRV record support
- Enhance domain status logic to include expiry and DNS resolution verification
- Update monitoring API to perform synchronous initial checks for immediate status updates
- Refactor site UI:
- Add tag filtering to domains and monitors tables
- Improve calendar view with better visual indicators for today and events
- Update monitor detail view with improved status badges and pending states
- Simplify home page layout by removing redundant card wrappers
- Update localization files for numerous languages to support new UI elements
- Add `cleanEndpointsConfig` to hub to safely reuse Docker network settings during container updates
This commit is contained in:
@@ -180,6 +180,22 @@ func (h *APIHandler) createDomain(e *core.RequestEvent) error {
|
||||
domainData, err := lookupSvc.LookupDomain(ctx, domainName)
|
||||
if err == nil && domainData != nil {
|
||||
h.applyLookupData(record, domainData)
|
||||
// Calculate status based on lookup results
|
||||
status := domain.DomainStatusUnknown
|
||||
if domainData.ExpiryDate != nil {
|
||||
daysUntil := int(time.Until(*domainData.ExpiryDate).Hours() / 24)
|
||||
if daysUntil < 0 {
|
||||
status = domain.DomainStatusExpired
|
||||
} else if daysUntil <= req.AlertDaysBefore {
|
||||
status = domain.DomainStatusExpiring
|
||||
} else {
|
||||
status = domain.DomainStatusActive
|
||||
}
|
||||
} else if len(domainData.IPv4Addresses) > 0 || len(domainData.IPv6Addresses) > 0 || len(domainData.NameServers) > 0 {
|
||||
// DNS resolves means the domain is active and functioning
|
||||
status = domain.DomainStatusActive
|
||||
}
|
||||
record.Set("status", status)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user