mirror of
https://github.com/TakeusV1/flask_ipam.git
synced 2026-10-13 17:15:33 +02:00
V1.5
- BLACKLIST SYSTEM - FIXES
This commit is contained in:
1 parent
1f32755ade
commit
a2a86db788
4 files changed
+37
-3
No files matched your search
@@ -20,13 +20,15 @@ def home():
|
||||
def dashboard():
|
||||
|
||||
db_networks = Network.query.count()
|
||||
db_allocations = Allocation.query.filter_by(is_used=True).count()
|
||||
db_inventory = Inventory.query.count()
|
||||
db_users = User.query.count()
|
||||
available_alloc = 0
|
||||
db_allocations = 0
|
||||
|
||||
for available_ip in Network.query.all():
|
||||
available_alloc += int(available_ip.hosts)
|
||||
for network in Network.query.all():
|
||||
if network.is_blacklisted == False:
|
||||
available_alloc += int(network.hosts)
|
||||
db_allocations += Allocation.query.filter_by(net_id=network.id, is_used=True).count()
|
||||
|
||||
return render_template(
|
||||
'panel/dashboard.html',
|
||||
|
||||
Reference in new issue
Block a user