From 8cb264bcbb4ca2804085ec8cf685cd681999387f Mon Sep 17 00:00:00 2001 From: Roven Gabriel Date: Sat, 30 Mar 2013 23:50:39 +0100 Subject: [PATCH] Debut migration Wifi et Unix en plugins --- Brie/brie/config/plugins_config.py | 4 +-- Brie/brie/plugins/{shell => unix}/__init__.py | 0 .../plugins/{shell => unix}/controller.py | 6 ++-- Brie/brie/plugins/unix/show.html | 28 +++++++++++++++++++ Brie/brie/plugins/wifi/controller.py | 2 +- Brie/brie/plugins/wifi/show.html | 12 +++++++- Brie/brie/templates/plugins.html | 1 - Brie/brie/templates/show/member.html | 1 - .../show/member_room_interface_views.html | 19 ++++--------- 9 files changed, 51 insertions(+), 22 deletions(-) rename Brie/brie/plugins/{shell => unix}/__init__.py (100%) rename Brie/brie/plugins/{shell => unix}/controller.py (52%) create mode 100644 Brie/brie/plugins/unix/show.html diff --git a/Brie/brie/config/plugins_config.py b/Brie/brie/config/plugins_config.py index 9caee1e..08496e6 100644 --- a/Brie/brie/config/plugins_config.py +++ b/Brie/brie/config/plugins_config.py @@ -1,9 +1,9 @@ from brie.plugins.wifi.controller import * -from brie.plugins.shell.controller import * +from brie.plugins.unix.controller import * mappings = { "brie.controllers.show.member" : [ ("wifi", Wifi.show), - ("shell", Shell.show) + ("unix", Unix.show) ] } diff --git a/Brie/brie/plugins/shell/__init__.py b/Brie/brie/plugins/unix/__init__.py similarity index 100% rename from Brie/brie/plugins/shell/__init__.py rename to Brie/brie/plugins/unix/__init__.py diff --git a/Brie/brie/plugins/shell/controller.py b/Brie/brie/plugins/unix/controller.py similarity index 52% rename from Brie/brie/plugins/shell/controller.py rename to Brie/brie/plugins/unix/controller.py index 4d84c8c..70f0ce2 100644 --- a/Brie/brie/plugins/shell/controller.py +++ b/Brie/brie/plugins/unix/controller.py @@ -1,11 +1,11 @@ +from tg.decorators import expose - -class Shell: +class Unix: @staticmethod + @expose("brie.plugins.unix.show") def show(models): return { - "name" : "shell" } #end def #end class diff --git a/Brie/brie/plugins/unix/show.html b/Brie/brie/plugins/unix/show.html new file mode 100644 index 0000000..38bf99d --- /dev/null +++ b/Brie/brie/plugins/unix/show.html @@ -0,0 +1,28 @@ + +
+ UNIX +
+ Uid unix + + Aucun uid + + ${member_ldap.uidNumber.first()} + + + génerer +
+
+ Shell + + Aucun shell + + ${member_ldap.loginShell.first()} + + +
+
+ + diff --git a/Brie/brie/plugins/wifi/controller.py b/Brie/brie/plugins/wifi/controller.py index 62c9184..3e619d6 100644 --- a/Brie/brie/plugins/wifi/controller.py +++ b/Brie/brie/plugins/wifi/controller.py @@ -7,7 +7,7 @@ class Wifi: @expose("brie.plugins.wifi.show") def show(models): return { - "name" : "wifi" + "activated" : str("Todo") } #end def diff --git a/Brie/brie/plugins/wifi/show.html b/Brie/brie/plugins/wifi/show.html index 3881985..42b3d51 100644 --- a/Brie/brie/plugins/wifi/show.html +++ b/Brie/brie/plugins/wifi/show.html @@ -2,6 +2,16 @@ xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="" > - hello wifi +
+ WIFI +
+ Activé + ${wifi_show.activated} +
+
+ Mot de passe + changer +
+
diff --git a/Brie/brie/templates/plugins.html b/Brie/brie/templates/plugins.html index 6f9a718..365b197 100644 --- a/Brie/brie/templates/plugins.html +++ b/Brie/brie/templates/plugins.html @@ -2,7 +2,6 @@ xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="" > - toto Pas de chambre associée
${room_view(room_ldap)}
- test : ${wifi_show.name} diff --git a/Brie/brie/templates/show/member_room_interface_views.html b/Brie/brie/templates/show/member_room_interface_views.html index 22ddfc0..eb0463b 100644 --- a/Brie/brie/templates/show/member_room_interface_views.html +++ b/Brie/brie/templates/show/member_room_interface_views.html @@ -54,8 +54,12 @@
DIVERS
- Identifiant - ${member_ldap.uid.first()} + Identifiants + + + ${uid} + +
Groupes @@ -66,17 +70,6 @@
-
- Uid unix - - Aucun uid - ${member_ldap.uidNumber.first()} - -
-
- Wifi - mot de passe -
MACHINES