diff --git a/Brie/brie/controllers/administration.py b/Brie/brie/controllers/administration.py index 33d267e..31ff0e8 100644 --- a/Brie/brie/controllers/administration.py +++ b/Brie/brie/controllers/administration.py @@ -99,6 +99,7 @@ class AdministrationController(AuthenticatedBaseController): def index(self): groups = Groupes.get_all(self.user, self.user.residence_dn) all_users = sorted(Member.get_all(self.user, self.user.residence_dn), key=lambda u: u.cn.first()) + free_ips = len(IpReservation.get_all_free(self.user, self.user.residence_dn)) residence = None if self.user is not None: @@ -108,6 +109,7 @@ class AdministrationController(AuthenticatedBaseController): return { "user" : self.user, "residence" : residence, + "free_ip" : free_ips, "groups_ldap" : groups, "all_users" : all_users } diff --git a/Brie/brie/templates/administration/index.html b/Brie/brie/templates/administration/index.html index e77a25c..889cb4a 100644 --- a/Brie/brie/templates/administration/index.html +++ b/Brie/brie/templates/administration/index.html @@ -2,12 +2,17 @@ + RETOUR
+
+
${"%03d" % free_ip}
+ IPs libres +
GROUPES
${group.cn.first()}