diff --git a/xCAT-UI/js/monitor/monitor.js b/xCAT-UI/js/monitor/monitor.js index b6ebc549d..b952c2548 100644 --- a/xCAT-UI/js/monitor/monitor.js +++ b/xCAT-UI/js/monitor/monitor.js @@ -65,7 +65,11 @@ function loadMonitorPage() { + "will be updated periodically with the latest status values for the nodes.
  • "; items += "
  • RMC Monitor : IBM's Resource Monitoring and Control (RMC) " + "subsystem is our recommended software for monitoring xCAT clusters. It's is part " - + "of the IBM's Reliable Scalable Cluster Technology (RSCT) that provides a comprehensive " + "clustering environment for AIX and LINUX.
  • "; + + "of the IBM's Reliable Scalable Cluster Technology (RSCT) that provides a comprehensive " + + "clustering environment for AIX and LINUX.
  • "; + items += "
  • RMC Event : Listing event monitoring information " + + "recorded by the RSCT Event Response resource manager in the audit log. Creating and " + + "removing a condition/response association.
  • "; items += "
  • Ganglia Monitor : Ganglia is a scalable distributed " + "monitoring system for high-performance computing systems such as clusters and Grids.
  • "; items += "
  • PCP Monitor : Under construction.
  • "; @@ -182,6 +186,10 @@ function loadMonitorTab(monitorName) { tab.add(monitorName, 'Ganglia', '', true); loadGangliaMon(); break; + case 'rmcevent': + tab.add(monitorName, 'RMC Event', '', true); + loadRmcEvent(); + break; case 'pcpmon': loadUnfinish(monitorName, tab); break; diff --git a/xCAT-UI/js/monitor/rmcmon.js b/xCAT-UI/js/monitor/rmcmon.js index 97cc5098c..331f2ff50 100644 --- a/xCAT-UI/js/monitor/rmcmon.js +++ b/xCAT-UI/js/monitor/rmcmon.js @@ -622,4 +622,69 @@ function showConfigureDia(){ } } }); +} + +/** + * load the rmc event tab. + * + * @param + + * @return + * + */ +function loadRmcEvent(){ + //find the rmcevent tab + + //add the stauts bar first. id = 'rmcMonStatus' + var rmcStatusBar = createStatusBar('rmcEvent'); + rmcStatusBar.append(createLoader()); + $('#rmcevent').append(rmcStatusBar); + $('#rmcevent').append('
    '); + + $.ajax( { + url : 'lib/cmd.php', + dataType : 'json', + data : { + cmd : 'webrun', + tgt : '', + args : 'lsevent', + msg : '' + }, + + success : showEventLog + }); +} + +/** + * show all the event in the rmc event tab + * + * @param data response from the xcat server. + + * @return + * + */ +function showEventLog(data){ + var eventDiv = $('#rmcEventDiv'); + eventDiv.empty(); + var eventTable = new DataTable('lsEventTable'); + eventTable.init(['Time', 'Type', 'Content']); + + eventDiv.empty(); + + for(var i in data.rsp){ + var row = data.rsp[i].split(';'); + eventTable.add(row); + } + + eventDiv.append(eventTable.object()); + $('#lsEventTable').dataTable({ + 'bFilter' : true, + 'bLengthChange' :true, + 'bSort' :true, + 'bPaginate' :true, + 'iDisplayLength' :10 + }); + + //unsort on the content column + $('#lsEventTable thead tr th').eq(2).unbind('click'); } \ No newline at end of file