";
+}
+
+#displayMonitorLists() will generate all the monitoring plug-ins,
+#the user can select the plug-ins he wants to operate on,
+#and press the "Next" button;
+ function displayMonitorLists() {
+ #The command "monls -a" is used to get the monitoring plug-ins list
+ $xml = docmd("monls"," ", array('-a'));
+ if(getXmlErrors($xml,$errors)) {
+ echo "
",implode(' ', $errors), "
";
+ exit;
+ }
+ #then, parse the xml data
+ $ooe = 0;
+ $line = 0;
+ foreach($xml->children() as $response) foreach($response->children() as $data) {
+ list($name, $stat, $nodemonstatus) = preg_split("/\s+/", $data);
+ $ooe = $ooe%2;
+ echo "
";
+ }
+ return 0;
+ }
+
+function displayTips($tips)
+{
+ //to tell the user how to operate on the current web page
+ //the argument $tips is an array like this:
+ //{
+ // "Click the name of each plugin, you can get the plugin's description.",
+ // "You can also select one plugin, then you can set node/application status monitoring for the selected plugin.",
+ //}
+ echo '
Tips:
';
+ foreach ($tips as $tip) {
+ echo "
$tip
";
+ echo "\n";
+ }
+ echo '
';
+ return 0;
+}
+
+function displayDialog($id, $title)
+{
+ //add one new
to display jQuery dialog;
+ echo "";
+ return 0;
+}
+
+function displayMonTable()
+{
+ //create one table to display the monitoring plugins' list
+ echo '
";
+ return 0;
+}
+
+function displayStatus()
+{
+ //tell the user that the current interface is not done yet...
+ echo "
This interface is still under development -use accordingly.
";
+}
+?>
diff --git a/xCAT-UI/monitor/monlist.php b/xCAT-UI/monitor/monlist.php
index 5906fa196..82e003df8 100644
--- a/xCAT-UI/monitor/monlist.php
+++ b/xCAT-UI/monitor/monlist.php
@@ -3,35 +3,8 @@ 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";
-#displayMonitorLists() will generate all the monitoring plug-ins,
-#the user can select the plug-ins he wants to operate on,
-#and press the "Next" button;
- function displayMonitorLists() {
- #The command "monls -a" is used to get the monitoring plug-ins list
- $xml = docmd("monls"," ", array('-a'));
- if(getXmlErrors($xml,$errors)) {
- echo "
",implode(' ', $errors), "
";
- exit;
- }
- #then, parse the xml data
- $ooe = 0;
- $line = 0;
- foreach($xml->children() as $response) foreach($response->children() as $data) {
- list($name, $stat, $nodemonstatus) = preg_split("/\s+/", $data);
- $ooe = $ooe%2;
- echo "
+displayTips(array("Click the name of each plugin, you can get the plugin's description.",
+ "You can also select one plugin, then you can set node/application status monitoring for the selected plugin"));
+
+displayMonTable();
+
+displayDialog("dialog", "Plug-in Description");
+insertButtons(array('label' => 'Next', 'id'=> 'next', 'onclick'=>'clickNext()'));
+?>
diff --git a/xCAT-UI/monitor/stat_mon.php b/xCAT-UI/monitor/stat_mon.php
index 1f469e7f8..734e7f777 100644
--- a/xCAT-UI/monitor/stat_mon.php
+++ b/xCAT-UI/monitor/stat_mon.php
@@ -3,5 +3,14 @@
* This web page is for "Node status Monitoring" and "Application Status Monitioring",
* The user can enable/disable "Node/Application Status Monitoring" from this page.
*/
-echo "