First draft for VM integration.
** ONLY PERFORMS MOCKUP **
This commit is contained in:
		
							parent
							
								
									ec8ccc9982
								
							
						
					
					
						commit
						943d091944
					
				|  | @ -341,6 +341,7 @@ bureau/admin/styles/style-hw.css -text | ||||||
| bureau/admin/styles/style.css -text | bureau/admin/styles/style.css -text | ||||||
| bureau/admin/tempovars.php -text | bureau/admin/tempovars.php -text | ||||||
| bureau/admin/trash_dateselect.php -text | bureau/admin/trash_dateselect.php -text | ||||||
|  | bureau/admin/vm.php -text | ||||||
| bureau/admin/webmail-redirect.php -text | bureau/admin/webmail-redirect.php -text | ||||||
| bureau/class/config.php -text | bureau/class/config.php -text | ||||||
| bureau/class/config_nochk.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_hooks.php -text | ||||||
| bureau/class/m_hta.php -text | bureau/class/m_hta.php -text | ||||||
| bureau/class/m_log.php -text | bureau/class/m_log.php -text | ||||||
|  | bureau/class/m_lxc.php -text | ||||||
| bureau/class/m_mail.php -text | bureau/class/m_mail.php -text | ||||||
| bureau/class/m_mem.php -text | bureau/class/m_mem.php -text | ||||||
| bureau/class/m_menu.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/mime.php -text | ||||||
| bureau/class/reset_stats_conf.php -text | bureau/class/reset_stats_conf.php -text | ||||||
| bureau/class/variables.php -text | bureau/class/variables.php -text | ||||||
|  | bureau/class/vm.php -text | ||||||
| bureau/index.php -text | bureau/index.php -text | ||||||
| bureau/locales/Makefile -text | bureau/locales/Makefile -text | ||||||
| bureau/locales/README -text | bureau/locales/README -text | ||||||
|  |  | ||||||
|  | @ -0,0 +1,32 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | require_once("../class/config.php"); | ||||||
|  | include_once("head.php"); | ||||||
|  | 
 | ||||||
|  | echo '<h1>youpi gestion des VM</h1>'; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | $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)); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | ?>
 | ||||||
|  | 
 | ||||||
|  | <h1>Dev only</h1> | ||||||
|  | <form method="post"> | ||||||
|  | 	<p>Action: <select name="action"><option value="monit">Monitoring</option><option value="start">Start</option><option value="stop">Stop</option></select></p> | ||||||
|  | 	<p>Login: <input type="text" name="login" /></p> | ||||||
|  | 	<p>Pass (hash): <input type="text" name="pass" /></p> | ||||||
|  | 	<p>Uid: <input type="text" name="uid" /></p> | ||||||
|  | 	<p><input type="submit" name="tester" /></p> | ||||||
|  | 
 | ||||||
|  | </form> | ||||||
|  | @ -0,0 +1,24 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | include_once(dirname(__FILE__) . '/vm.php'); | ||||||
|  | # include('vm.php'); // This one fails ...
 | ||||||
|  | 
 | ||||||
|  | class m_lxc implements vm | ||||||
|  | { | ||||||
|  | 	public function start() | ||||||
|  | 	{ | ||||||
|  | 		echo "lxc::start"; | ||||||
|  | 
 | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public function monit() | ||||||
|  | 	{ | ||||||
|  | 		echo "1 / 5 used"; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public function stop() | ||||||
|  | 	{ | ||||||
|  | 		echo "lxc::stop"; | ||||||
|  | 
 | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | @ -0,0 +1,5 @@ | ||||||
|  | <?php | ||||||
|  | interface vm { | ||||||
|  | 	public function start(); | ||||||
|  | 	public function stop(); | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue
	
	 François Serman
						François Serman