mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 10:17:20 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user