From 943d091944cc46ae2c13e86de1641d3b79721e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Serman?= Date: Fri, 12 Apr 2013 21:52:27 +0000 Subject: [PATCH] First draft for VM integration. ** ONLY PERFORMS MOCKUP ** --- .gitattributes | 3 +++ bureau/admin/vm.php | 32 ++++++++++++++++++++++++++++++++ bureau/class/m_lxc.php | 24 ++++++++++++++++++++++++ bureau/class/vm.php | 5 +++++ 4 files changed, 64 insertions(+) create mode 100644 bureau/admin/vm.php create mode 100644 bureau/class/m_lxc.php create mode 100644 bureau/class/vm.php diff --git a/.gitattributes b/.gitattributes index 0895e7cf..7880b6a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -341,6 +341,7 @@ bureau/admin/styles/style-hw.css -text bureau/admin/styles/style.css -text bureau/admin/tempovars.php -text bureau/admin/trash_dateselect.php -text +bureau/admin/vm.php -text bureau/admin/webmail-redirect.php -text bureau/class/config.php -text bureau/class/config_nochk.php -text @@ -360,6 +361,7 @@ bureau/class/m_ftp.php -text bureau/class/m_hooks.php -text bureau/class/m_hta.php -text bureau/class/m_log.php -text +bureau/class/m_lxc.php -text bureau/class/m_mail.php -text bureau/class/m_mem.php -text bureau/class/m_menu.php -text @@ -370,6 +372,7 @@ bureau/class/m_trash.php -text bureau/class/mime.php -text bureau/class/reset_stats_conf.php -text bureau/class/variables.php -text +bureau/class/vm.php -text bureau/index.php -text bureau/locales/Makefile -text bureau/locales/README -text diff --git a/bureau/admin/vm.php b/bureau/admin/vm.php new file mode 100644 index 00000000..dae7bf99 --- /dev/null +++ b/bureau/admin/vm.php @@ -0,0 +1,32 @@ +youpi gestion des VM'; + + +$fields = array ( + "action" => array ("request", "string", FALSE), + "login" => array ("request", "string", FALSE), + "pass" => array("request", "string", FALSE), + "uid" => array("request", "integer", FALSE), +); +getFields($fields); + +if (in_array($action, array('start', 'stop', 'monit'))) +{ + call_user_func(array($lxc, $action)); +} + +?> + +

Dev only

+
+

Action:

+

Login:

+

Pass (hash):

+

Uid:

+

+ +
diff --git a/bureau/class/m_lxc.php b/bureau/class/m_lxc.php new file mode 100644 index 00000000..c7a9267e --- /dev/null +++ b/bureau/class/m_lxc.php @@ -0,0 +1,24 @@ +