From ffec20b646376ef3fa027af5d64560082f2b760f Mon Sep 17 00:00:00 2001 From: xq2005 Date: Thu, 16 Dec 2010 14:28:49 +0000 Subject: [PATCH] add make association button git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8439 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/monitor/monitor.js | 2 +- xCAT-UI/js/monitor/rmcmon.js | 75 +++++++++++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 5 deletions(-) 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