Fix CloudFlare DNS Management: Filter main domains only, auto-delete DNS records on domain removal, improve table display

- Filter domain dropdown to show only main domains (exclude sub-domains)
- Add automatic CloudFlare DNS record deletion when domains/sub-domains are removed
- Improve DNS Records table display to match SSH Logins/Logs table styling
- Add loading states and proper table structure with ng-if conditions
- Update CSS to match activity-table styling with sticky headers
This commit is contained in:
master3395
2026-01-04 02:13:10 +01:00
parent d8dbe6e410
commit cfee3d9867
6 changed files with 264 additions and 24 deletions

View File

@@ -649,7 +649,10 @@ class DNSManager:
if os.path.exists(cfPath):
CloudFlare = 1
domainsList = ACLManager.findAllDomains(currentACL, userID)
allDomains = ACLManager.findAllDomains(currentACL, userID)
# Filter to only show main domains (domains with exactly one dot, e.g., "example.com")
# Sub-domains have two or more dots (e.g., "subdomain.example.com")
domainsList = [domain for domain in allDomains if domain.count('.') == 1]
self.admin = admin
self.loadCFKeys()
data = {"domainsList": domainsList, "status": status, 'CloudFlare': CloudFlare, 'cfEmail': self.email,