diff --git a/xCAT-UI/js/monitor/monitor.js b/xCAT-UI/js/monitor/monitor.js index b952c2548..494acbe86 100644 --- a/xCAT-UI/js/monitor/monitor.js +++ b/xCAT-UI/js/monitor/monitor.js @@ -179,7 +179,7 @@ function loadMonitorTab(monitorName) { loadXcatMon(); break; case 'rmcmon': - tab.add(monitorName, 'RMC', '', true); + tab.add(monitorName, 'RMC Monitor', '', true); loadRmcMon(); break; case 'gangliamon': diff --git a/xCAT-UI/js/monitor/rmcmon.js b/xCAT-UI/js/monitor/rmcmon.js index 331f2ff50..33b593418 100644 --- a/xCAT-UI/js/monitor/rmcmon.js +++ b/xCAT-UI/js/monitor/rmcmon.js @@ -636,7 +636,7 @@ function loadRmcEvent(){ //find the rmcevent tab //add the stauts bar first. id = 'rmcMonStatus' - var rmcStatusBar = createStatusBar('rmcEvent'); + var rmcStatusBar = createStatusBar('rmcEventStatus'); rmcStatusBar.append(createLoader()); $('#rmcevent').append(rmcStatusBar); $('#rmcevent').append('
'); @@ -647,7 +647,7 @@ function loadRmcEvent(){ data : { cmd : 'webrun', tgt : '', - args : 'lsevent', + args : 'lsevent;-O;1000', msg : '' }, @@ -655,6 +655,7 @@ function loadRmcEvent(){ }); } +/*===========RMC Event Tab============*/ /** * show all the event in the rmc event tab * @@ -664,13 +665,21 @@ function loadRmcEvent(){ * */ function showEventLog(data){ + $('#rmcEventStatus').empty(); + //rsct not installed. + if (data.rsp[0] && (-1 != data.rsp[0].indexOf('lsevent'))){ + $('#rmcEventStatus').append('Please install RSCT first!'); + return; + } var eventDiv = $('#rmcEventDiv'); eventDiv.empty(); + + //add the configure button + loadRmcEventConfig(); + 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); @@ -687,4 +696,62 @@ function showEventLog(data){ //unsort on the content column $('#lsEventTable thead tr th').eq(2).unbind('click'); +} + +/** + * Add the configure button into rmc event tab + * + * @param + + * @return + * + */ +function loadRmcEventConfig(){ + var mkConResBut = createButton('Make Association'); + mkConResBut.bind('click', function(){ + mkCondRespDia(); + }); + + $('#rmcEventDiv').append(mkConResBut); +} + +/** + * show the make association dialogue + * + * @param + + * @return + * + */ +function mkCondRespDia(){ + var diaDiv = $('
'); + diaDiv.append('under construction.'); + + diaDiv.dialog({ + modal: true, + width: 400, + close: function(event, ui){ + $(this).remove(); + }, + buttons: { + cancel : function(){ + $(this).dialog('close'); + }, + ok : function(){ + $(this).dialog('close'); + } + } + }); +} + +/** + * show the remove association dialogue + * + * @param + + * @return + * + */ +function rmCondRespDia(){ + } \ No newline at end of file