From 823bb33b20e5d7e93ab262b33452cd069032cd71 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Thu, 5 Nov 2009 06:50:40 +0000 Subject: [PATCH] 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 --- xCAT-UI/css/main.css | 11 +---------- xCAT-UI/css/monitor.css | 0 xCAT-UI/js/xcat.js | 19 +++++++++++++++++- xCAT-UI/lib/display.php | 16 ++++++--------- xCAT-UI/lib/functions.php | 2 +- xCAT-UI/lib/monitor_display.php | 29 ++++++++++++++-------------- xCAT-UI/monitor/monlist.php | 2 -- xCAT-UI/monitor/rmc_event_define.php | 2 +- xCAT-UI/monitor/rmc_monshow.php | 2 +- xCAT-UI/monitor/setup.php | 1 - 10 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 xCAT-UI/css/monitor.css diff --git a/xCAT-UI/css/main.css b/xCAT-UI/css/main.css index 0df266a2f..2b77bde3d 100644 --- a/xCAT-UI/css/main.css +++ b/xCAT-UI/css/main.css @@ -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; -} diff --git a/xCAT-UI/css/monitor.css b/xCAT-UI/css/monitor.css new file mode 100644 index 000000000..e69de29bb diff --git a/xCAT-UI/js/xcat.js b/xCAT-UI/js/xcat.js index 94bac557b..41ed7aaa5 100644 --- a/xCAT-UI/js/xcat.js +++ b/xCAT-UI/js/xcat.js @@ -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 , +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); diff --git a/xCAT-UI/lib/display.php b/xCAT-UI/lib/display.php index f405d22b7..b3413b998 100644 --- a/xCAT-UI/lib/display.php +++ b/xCAT-UI/lib/display.php @@ -13,6 +13,7 @@ echo << + @@ -98,16 +99,16 @@ echo <<provision
  • - monitor + monitor
  • @@ -537,13 +538,8 @@ echo <<

    Monitor

      -
    • Show syslog Entries
    • -
    • Monitor Setup
    • -
    • View RMC Events Log
    • -
    • There's only text format for events' log
    • -
    • View RMC Performance
    • -
    • There're text/graphics formats for performance view
    • -
    • Monitoring Events/Performances by Monitoring Plugins, such as RMC...
    • +
    • Set up xCAT Monitoring Plug-in
    • +
    • Monitor Events/Performances by Plugins, such as RMC...
    • This is still UNDER DEVELOPMENT.
    diff --git a/xCAT-UI/lib/functions.php b/xCAT-UI/lib/functions.php index 2642257c9..21c73ab6d 100644 --- a/xCAT-UI/lib/functions.php +++ b/xCAT-UI/lib/functions.php @@ -1,7 +1,7 @@ "; - echo ""; - echo "$name"; + echo "$name"; echo "$stat"; if(isset($nodemonstatus)) { echo "Enabled";}else {echo "Disabled";} echo ""; - $name_str = "\"$name\""; + insertButtons(array('label'=>'Configure', 'id'=>'configure', 'onclick'=>'')); + echo ""; + echo ""; + $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 ""; @@ -81,18 +81,17 @@ function displayMonTable() - - - - - + + + + + TOS1; echo << - showPluginOptions(); - showPluginDescription(); + hoverOnMonlist(); TOS9; echo ''; @@ -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")); diff --git a/xCAT-UI/monitor/monlist.php b/xCAT-UI/monitor/monlist.php index 23a5f40cf..8247318a8 100644 --- a/xCAT-UI/monitor/monlist.php +++ b/xCAT-UI/monitor/monlist.php @@ -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"); ?> \ No newline at end of file diff --git a/xCAT-UI/monitor/rmc_event_define.php b/xCAT-UI/monitor/rmc_event_define.php index 8cc111360..d682932d3 100644 --- a/xCAT-UI/monitor/rmc_event_define.php +++ b/xCAT-UI/monitor/rmc_event_define.php @@ -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;", diff --git a/xCAT-UI/monitor/rmc_monshow.php b/xCAT-UI/monitor/rmc_monshow.php index 2b1bce90e..64670cd81 100644 --- a/xCAT-UI/monitor/rmc_monshow.php +++ b/xCAT-UI/monitor/rmc_monshow.php @@ -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 \"lpar\",", "then select the desired attributes. click the \"View by Text\" button or the \"View by Graphics\" button")); diff --git a/xCAT-UI/monitor/setup.php b/xCAT-UI/monitor/setup.php index 5509d2683..0702d1e71 100644 --- a/xCAT-UI/monitor/setup.php +++ b/xCAT-UI/monitor/setup.php @@ -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)) {
    Plug-in NameStatusNode Status MonitoringActionPlug-in NameStatusNode Status MonitoringConfigureAction