diff --git a/xCAT-UI/js/xcat.js b/xCAT-UI/js/xcat.js
index 5b3e611ad..94bac557b 100644
--- a/xCAT-UI/js/xcat.js
+++ b/xCAT-UI/js/xcat.js
@@ -536,37 +536,6 @@ function show_monshow_data(type,range)
}
}
-function show_monshow_graph() {
- //used for the "view by graph" button in the web page "rmc_monshow.php"
- if($(":input[@checked]").size() != 0) {
- $("#monshow_data").empty();
- $("#monshow_opt").hide("slow");
- $("#back_btn").show("slow");
- $(":input[@checked]").each(function(i) {
- //generate graphics for all the attributes in "checked" status
- $.get("monitor/rmc_monshow_data_source.php", {mode: "graph", value: $(this).attr("value")}, function(data) {
- $("#monshow_data").append(data);
- });
- });
- } else {
- }
-}
-function show_monshow_text() {
- //used for the "view by text" button in the web page "rmc_monshow.php";
- if($(":input[@checked]").size() != 0) {
- $("#monshow_data").empty();
- $("#monshow_opt").hide("slow");
- $("#back_btn").show("slow");
- $(":input[@checked]").each(function(i) {
- $.get("monitor/rmc_monshow_data_source.php", {mode: "text", value: $(this).attr("value")}, function(data) {
- $("#monshow_data").append(data);
- });
- });
- } else {
- $("#monshow_data").html("
Please select one or more attributes from the table
");
- }
-}
-
function init_rmc_monshow_back_btn() {
$("#back_btn").hide();
}
@@ -593,20 +562,30 @@ function handle_tips() {
});
}
-function rmc_monshow_draw_by_flot(value)
+function rmc_monshow_draw_by_flot(div, value)
{
//collecting data from "monshow" command,
//then, draw by the jQuery-plugin: flot
//http://groups.google.com/group/flot-graphs/browse_thread/thread/93358c68d44412a4?pli=1
+ //update the graph by every minutes
+ var division = document.getElementById(div);
+ window.setInterval(function() {
+ if($("#monshow_data") && $("#monshow_data").html() != "") {
+ $.getJSON("monitor/flot_get_data.php", {attr: value}, function(data) {
+ $.plot($(division),data, options);
+ });
+ }
+ }
+ , 60*1000);
var options = {
xaxis: {
mode: 'time'
},
lines: {show: true, fill: true}
};
-
+
$.getJSON("monitor/flot_get_data.php", {attr: value}, function(data) {
- $.plot($("#placeholder"),data, options);
+ $.plot($(division),data, options);
});
}
diff --git a/xCAT-UI/lib/display.php b/xCAT-UI/lib/display.php
index e5f8d0def..cdd926639 100644
--- a/xCAT-UI/lib/display.php
+++ b/xCAT-UI/lib/display.php
@@ -539,13 +539,16 @@ echo <<
Show syslog Entries
Monitor Setup
- View Events Log
+ View RMC Events Log
There's only text format for events' log
- View Performance
+ View RMC Performance
There're text/graphics formats for performance view
Monitoring Events/Performances by Monitoring Plugins, such as RMC...
This is still UNDER DEVELOPMENT.
+
EOS;
}
diff --git a/xCAT-UI/lib/monitor_display.php b/xCAT-UI/lib/monitor_display.php
index 355e82192..27a668930 100644
--- a/xCAT-UI/lib/monitor_display.php
+++ b/xCAT-UI/lib/monitor_display.php
@@ -370,8 +370,9 @@ function RMCEventLogToTable()
//displayRMCEventLog() to display the RMC event logs in one table with "tablesorter" class
function displayRMCEvnetLog()
{
+echo '';
echo <<
+
Time |
@@ -385,10 +386,11 @@ TOS9;
//TODO: the following javascript doesn't work well.
echo <<
- $("table").tablesorter({ sortList: [[0,1],[1,1]] });
+ $("#lsevent_tab").tablesorter({ sortList: [[0,1],[1,1]] });
TOS8;
echo "";
+
}
function displayRMCMonshowAttr($attr, $nr) {
@@ -441,15 +443,12 @@ function displayRMCMonshowAttr($attr, $nr) {
function displayRMCMonshowGraph($value, $nr) {
//display the RMC Performance Data
+$place = $nr.$value;
echo <<
-The Graph View for RMC Resource
-
-
-
+
TOS11;
}
diff --git a/xCAT-UI/monitor/monlist.php b/xCAT-UI/monitor/monlist.php
index 265b5fd30..23a5f40cf 100644
--- a/xCAT-UI/monitor/monlist.php
+++ b/xCAT-UI/monitor/monlist.php
@@ -4,15 +4,17 @@ if(!isset($TOPDIR)) { $TOPDIR="..";}
require_once "$TOPDIR/lib/functions.php";
require_once "$TOPDIR/lib/display.php";
require_once "$TOPDIR/lib/monitor_display.php";
-?>
-'main.php', 'monitor' =>''));
displayTips(array("Click the name of each plugin, you can get the plugin's description.",
"Select one plugin, choose the options for set up monitoring ",
"Click the button \"Start\", \"Stop\" or \"Restart\" to setup monitoring plugin"));
+
+//TODO: change the view style;
+//Change all the "Actions/Description/Configurations/Views" to Tabs
+//And, list all the monitoring plugins under the tree? Not sure now.
displayMonTable();
insertDiv("plugin_desc");
diff --git a/xCAT-UI/monitor/rmc_lsevent.php b/xCAT-UI/monitor/rmc_lsevent.php
index dd04669e6..790768966 100644
--- a/xCAT-UI/monitor/rmc_lsevent.php
+++ b/xCAT-UI/monitor/rmc_lsevent.php
@@ -17,15 +17,9 @@ $name = $_REQUEST['name'];
displayMapper(array('home'=>'main.php', 'monitor' =>''));
-displayTips(array("View all RMC events here","TODO"));
+displayTips(array("You can view the latest 60 RMC events here"));
//Following the "Syslog Entries" web page
-echo '';
-
displayRMCEvnetLog();
-echo '
';
-displayStatus();
-
-insertButtons(array('label' => 'Next', 'id'=> 'next', 'onclick'=>''));
?>
diff --git a/xCAT-UI/monitor/rmc_monshow_attr_source.php b/xCAT-UI/monitor/rmc_monshow_attr_source.php
index 3c4eb90f0..b23781dba 100644
--- a/xCAT-UI/monitor/rmc_monshow_attr_source.php
+++ b/xCAT-UI/monitor/rmc_monshow_attr_source.php
@@ -30,7 +30,6 @@ if($id == "cluster") {
}
if(false !== strpos($data, "lpar")) {
//display the options for the "monshow" command
-
show_monshow_options($id);
} else {
echo "Currently, it only supports one single node. Please select one single node under the LPAR tree.";