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

@@ -807,10 +807,12 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
$scope.recordAdded = true;
$scope.couldNotConnect = true;
$scope.recordsLoading = true;
$scope.loadingRecords = true;
$scope.recordDeleted = true;
$scope.couldNotDeleteRecords = true;
$scope.couldNotAddRecord = true;
$scope.recordValueDefault = false;
$scope.records = [];
// Hide records boxes
$(".aaaaRecord").hide();
@@ -981,7 +983,7 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
};
function populateCurrentRecords() {
$scope.loadingRecords = true;
var selectedZone = $scope.selectedZone;
url = "/dns/getCurrentRecordsForDomainCloudFlare";
@@ -1002,6 +1004,7 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
function ListInitialDatas(response) {
$scope.loadingRecords = false;
if (response.data.fetchStatus === 1) {
$scope.records = JSON.parse(response.data.data);
@@ -1028,6 +1031,7 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
$scope.couldNotConnect = true;
$scope.recordsLoading = true;
$scope.couldNotAddRecord = true;
$scope.records = [];
$scope.errorMessage = response.data.error_message;
}
@@ -1035,7 +1039,7 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
}
function cantLoadInitialDatas(response) {
$scope.loadingRecords = false;
$scope.addRecordsBox = true;
$scope.currentRecords = true;
$scope.canNotFetchRecords = true;
@@ -1044,6 +1048,7 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
$scope.recordAdded = true;
$scope.couldNotConnect = false;
$scope.couldNotAddRecord = true;
$scope.records = [];
}