Implement Banned IPs management system: Add functionality to list, add, remove, and delete banned IPs. Update UI components for managing banned IPs, including a new tab in the firewall section and enhanced user notifications. Refactor existing code for better organization and maintainability.

This commit is contained in:
Master3395
2025-09-20 18:52:07 +02:00
parent 1823978d95
commit 7512a486e0
11 changed files with 1388 additions and 21 deletions

View File

@@ -743,5 +743,26 @@ def getContainerEnv(request):
'success': 0,
'message': str(e)
}), content_type='application/json')
except KeyError:
return redirect(loadLoginPage)
@preDockerRun
def listContainers(request):
"""
Get list of all Docker containers
"""
try:
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
if currentACL['admin'] == 1:
pass
else:
return ACLManager.loadErrorJson()
cm = ContainerManager()
coreResult = cm.listContainers(userID)
return coreResult
except KeyError:
return redirect(loadLoginPage)