mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3894 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /* 
 | |
|  * Enable/Disable node_stat_monitor feature for the desired plug-in
 | |
|  * this file is invoked by the file "stat_mon.php"
 | |
|  * update the table "monitoring",
 | |
|  */
 | |
| if(!isset($TOPDIR)) { $TOPDIR="/opt/xcat/ui";}
 | |
| 
 | |
| require_once "$TOPDIR/lib/security.php";
 | |
| require_once "$TOPDIR/lib/functions.php";
 | |
| require_once "$TOPDIR/lib/display.php";
 | |
| require_once "$TOPDIR/lib/monitor_display.php";
 | |
| 
 | |
| $name = $_REQUEST['name'];
 | |
| $action = $_REQUEST['action'];
 | |
| 
 | |
| //TODO: right now, we can't change the contents of the xcat tables through xcatd
 | |
| //if($action == 'enable') {
 | |
| //    //chtab name=$name monitoring.nodestatmon='yes'
 | |
| //    $xml=docmd("chtab",' ',array("name=$name","monitoring.nodestatmon=\'yes\'"));
 | |
| //    if(getXmlErrors($xml, $errors)) {
 | |
| //        echo "<p class=Error>",implode(' ', $errors), "</p>";
 | |
| //        exit;
 | |
| //    }
 | |
| //
 | |
| //}else if($action == 'disable') {
 | |
| //    //chtab name=$name monitoring.nodestatmon=''
 | |
| //    $xml=docmd("chtab",' ', array("name=$name","monitoring.nodestatmon=\'\'"));
 | |
| //    if(getXmlErrors($xml,$errors)) {
 | |
| //        echo "<p class=Error>",implode(' ', $errors), "</p>";
 | |
| //        exit;
 | |
| //    }
 | |
| //}
 | |
| 
 | |
| echo "successful";
 | |
| ?>
 |