updates fot the main page of "monitor interface"
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4482 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -380,9 +380,8 @@ padding:10px 2px; | ||||
| #monlist_table { | ||||
|     margin-right: 30px; | ||||
|     margin-left: 30px; | ||||
|     width: 850px; | ||||
|     width: 910px; | ||||
|     padding: 10px; | ||||
|     float: left; | ||||
|     display: block; | ||||
| } | ||||
|  | ||||
| @@ -476,11 +475,3 @@ padding:10px 2px; | ||||
|     float: right; | ||||
| } | ||||
|  | ||||
| #plugin_desc { | ||||
|     width: 880px; | ||||
|     margin: 5px; | ||||
|     padding: 5px; | ||||
|     float: left; | ||||
|     background-color:#FAF8CC; | ||||
|     text-align: left; | ||||
| } | ||||
|   | ||||
							
								
								
									
										0
									
								
								xCAT-UI/css/monitor.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								xCAT-UI/css/monitor.css
									
									
									
									
									
										Normal file
									
								
							| @@ -493,6 +493,8 @@ function showPluginOptions() | ||||
|     }); | ||||
| } | ||||
|  | ||||
|  | ||||
| //TODO: remove it | ||||
| function showPluginDescription() | ||||
| { | ||||
|     $(".description").click(function(){ | ||||
| @@ -504,10 +506,25 @@ function showPluginDescription() | ||||
|         }) | ||||
|     }); | ||||
| } | ||||
|  | ||||
| //TODO: when mouse hover the list of monitor plugins, the .ListLine_hover style will | ||||
| //be applied on the <tr>, | ||||
| function hoverOnMonlist() | ||||
| { | ||||
|     $(".tabTable tr").hover( | ||||
|         function() { | ||||
|             $(this).addClass("ListLine_hover"); | ||||
|         }, | ||||
|         function() { | ||||
|             $(this).removeClass("ListLine_hover"); | ||||
|         } | ||||
|     ); | ||||
| } | ||||
|  | ||||
| function monsetupAction(plugin, action_val) | ||||
| { | ||||
|     //plugin = the name of plugin | ||||
|     //action = "start" or "stop" or "restart" | ||||
|     //action = "start" or "stop" | ||||
|     $.get("monitor/setup.php", {name: plugin, action: action_val}, function(data) { | ||||
|         $.get("monitor/updateMonList.php", {}, function(data) { | ||||
|             $("#monlist_table").html(data); | ||||
|   | ||||
| @@ -13,6 +13,7 @@ echo <<<EOS1 | ||||
| <link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen"> | ||||
| <link rel="stylesheet" type="text/css" href="css/security.css" media="screen"> | ||||
| <link rel="stylesheet" type="text/css" href="css/config.css" media="screen"> | ||||
| <link rel="stylesheet" type="text/css" href="css/monitor.css" media="screen"> | ||||
| <link rel="stylesheet" type="text/css" href="css/theme/jquery-ui-themeroller.css" media="screen"> | ||||
| <link rel="stylesheet" type="text/css" href="js/jsTree/tree_component.css" media="screen"> | ||||
| <script type="text/javascript" src="js/loading.js"></script> | ||||
| @@ -98,16 +99,16 @@ echo <<<EOS4 | ||||
|     <a href="provision.php">provision</a> | ||||
|    </li> | ||||
|    <li> | ||||
|     <a>monitor</a> | ||||
|     <a href="monitor/monlist.php">monitor</a> | ||||
| 	<ul> | ||||
|    		<li> | ||||
|     			<a href="monitor.php">syslog</a> | ||||
|    		</li> | ||||
|                 <li> | ||||
|                         <a href="monitor/monlist.php">Monitor Setup</a> | ||||
|                         <a href="monitor/rmc_monshow.php">Resource Performance</a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                         <a href="monitor/rmc_lsevent.php">View Events</a> | ||||
|                         <a href="monitor/rmc_lsevent.php">RMC Events</a> | ||||
|                 </li> | ||||
| 	</ul> | ||||
|    </li> | ||||
| @@ -537,13 +538,8 @@ echo <<<EOS | ||||
| </ul> | ||||
| <h1><a href='#' onclick='loadMainPage("monitor/monlist.php")'>Monitor</a></h1> | ||||
| <ul> | ||||
|     <li><a href='#' onclick='loadMainPage("monitor.php")'>Show syslog Entries</a></li> | ||||
|     <li><a href='#' onclick='loadMainPage("monitor/monlist.php")'>Monitor Setup</a></li> | ||||
|     <li><a href='#' onclick='loadMainPage("monitor/rmc_lsevent.php")'>View RMC Events Log</a></li> | ||||
|     <li>There's only text format for events' log</li> | ||||
|     <li><a href='#' onclick='loadMainPage("monitor/rmc_monshow.php")'>View RMC Performance</a></li> | ||||
|     <li>There're text/graphics formats for performance view</li> | ||||
|     <li>Monitoring Events/Performances by Monitoring Plugins, such as RMC...</li> | ||||
|     <li>Set up xCAT Monitoring Plug-in</a></li> | ||||
|     <li>Monitor Events/Performances by Plugins, such as RMC...</li> | ||||
|     <li>This is still <b>UNDER DEVELOPMENT</b>.</li> | ||||
| </ul> | ||||
| </div> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <?php | ||||
|  | ||||
| session_start();   | ||||
|  | ||||
| header("Cache-control: private");  | ||||
|  | ||||
| function getTabNames() { | ||||
|         $xml = docmd('tabdump','',NULL); | ||||
|   | ||||
| @@ -20,19 +20,19 @@ | ||||
|          list($name, $stat, $nodemonstatus) = preg_split("/\s+/", $data); | ||||
|          $ooe = $ooe%2; | ||||
|          echo "<tr class='ListLine$ooe' id='row$line'>"; | ||||
|          echo "<td><input type='radio' name='plugins' value='$name' /></td>"; | ||||
|          echo "<td ><a class='description' href='#'>$name</a></td>"; | ||||
|          echo "<td >$name</td>"; | ||||
|          echo "<td >$stat</td>"; | ||||
|          if(isset($nodemonstatus)) { echo "<td >Enabled</td>";}else {echo "<td >Disabled</td>";} | ||||
|          echo "<td>"; | ||||
|          $name_str = "\"$name\""; | ||||
|          insertButtons(array('label'=>'Configure', 'id'=>'configure', 'onclick'=>'')); | ||||
|          echo "</td>"; | ||||
|          echo "<td>"; | ||||
|          $name_str = '"'.$name.'"'; | ||||
|          if($stat == "monitored") { | ||||
|              $act_str = "\"stop\""; | ||||
|              $act_str = '"stop"'; | ||||
|              insertButtons(array('label'=>'Stop', 'id'=>'stop', 'onclick'=>"monsetupAction($name_str, $act_str)")); | ||||
|              $act_str = "\"restart\""; | ||||
|              insertButtons(array('label'=>'Restart', 'id'=>'restart', 'onclick'=>"monsetupAction($name_str, $act_str)")); | ||||
|          }else { | ||||
|              $act_str = "\"start\""; | ||||
|              $act_str = addslashes('"start"'); | ||||
|              insertButtons(array('label' => 'Start', 'id'=>'start', 'onclick' => "monsetupAction($name_str, $act_str)")); | ||||
|          } | ||||
|          echo "</td>"; | ||||
| @@ -81,18 +81,17 @@ function displayMonTable() | ||||
| <table id="tabTable" class="tabTable" cellspacing="1"> | ||||
|     <thead> | ||||
|         <tr class="colHeaders"> | ||||
|             <td></td> | ||||
|             <td>Plug-in Name</td> | ||||
|             <td>Status</td> | ||||
|             <td>Node Status Monitoring</td> | ||||
|             <td>Action</td> | ||||
|             <td><b>Plug-in Name</b></td> | ||||
|             <td><b>Status</b></td> | ||||
|             <td><b>Node Status Monitoring</b></td> | ||||
|             <td><b>Configure</b></td> | ||||
|             <td><b>Action</b></td> | ||||
|         </tr> | ||||
|     </thead> | ||||
| TOS1; | ||||
| echo <<<TOS9 | ||||
| <script type="text/javascript"> | ||||
|     showPluginOptions(); | ||||
|     showPluginDescription(); | ||||
|     hoverOnMonlist(); | ||||
| </script> | ||||
| TOS9; | ||||
|     echo '<tbody id="monlist">'; | ||||
| @@ -541,7 +540,7 @@ TOS1; | ||||
|  */ | ||||
| function displayNodeAppStatus($name) | ||||
| { | ||||
|     displayMapper(array('home'=>'main.php', 'monitor'=>'')); | ||||
|     displayMapper(array('home'=>'main.php', 'monitor'=>'monitor/monlist.php', 'Node Status Setup'=> '')); | ||||
|     displayTips(array( | ||||
|         "Enable/disable Node/App Status Monitoring by clicking the button", | ||||
|         "In order to take affect, you have to START/RESTART the desired plugin")); | ||||
|   | ||||
| @@ -17,8 +17,6 @@ displayTips(array("Click the name of each plugin, you can get the plugin's descr | ||||
| //And, list all the monitoring plugins under the tree? Not sure now. | ||||
| displayMonTable(); | ||||
|  | ||||
| insertDiv("plugin_desc"); | ||||
|  | ||||
| insertDiv("options"); | ||||
|  | ||||
| ?> | ||||
| @@ -12,7 +12,7 @@ require_once "$TOPDIR/lib/display.php"; | ||||
| require_once "$TOPDIR/lib/monitor_display.php"; | ||||
|  | ||||
|  | ||||
| displayMapper(array('home'=>'main.php', 'monitor' =>'')); | ||||
| displayMapper(array('home'=>'main.php', 'monitor' =>'monitor/monlist.php', 'RMC Event Setup' => '')); | ||||
|  | ||||
| displayTips(array( | ||||
|         "All the conditions and the responses are here;", | ||||
|   | ||||
| @@ -9,7 +9,7 @@ require_once "$TOPDIR/lib/functions.php"; | ||||
| require_once "$TOPDIR/lib/display.php"; | ||||
| require_once "$TOPDIR/lib/monitor_display.php"; | ||||
|  | ||||
| displayMapper(array('home'=>'main.php', 'monitor' =>'')); | ||||
| displayMapper(array('home'=>'main.php', 'monitor' =>'monitor/monlist.php', 'monshow'=>'')); | ||||
|  | ||||
| displayTips(array("Select the domain: the whole cluser or the compute nodes under \"<b>lpar</b>\",", | ||||
| "then select the desired attributes. click the \"View by Text\" button or the \"View by Graphics\" button")); | ||||
|   | ||||
| @@ -14,7 +14,6 @@ require_once "$TOPDIR/lib/monitor_display.php"; | ||||
|  | ||||
| $name = $_REQUEST['name']; | ||||
| $action = $_REQUEST['action']; | ||||
|  | ||||
| //read the "monitoring" table to see whether node status monitoring is enable or not | ||||
| //$xml = docmd("webrun", "", array("gettab name=$name monitoring.nodestatmon")); | ||||
| //if(getXmlErrors($xml, $errors)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user