diff --git a/xCAT-UI/js/monitor/gangliamon.js b/xCAT-UI/js/monitor/gangliamon.js index 7afb91e4d..7962d5932 100644 --- a/xCAT-UI/js/monitor/gangliamon.js +++ b/xCAT-UI/js/monitor/gangliamon.js @@ -203,9 +203,9 @@ function loadGroups4Ganglia(data) { var info = $('
'); info.append(''); var msg = $(''); - msg.append('Review the nodes that are monitored by Ganglia. You can turn on Ganglia monitoring on a node by selecting it and clicking on Monitor. If you are satisfied with the nodes you want to monitor, '); + msg.append('Review the nodes that are monitored by Ganglia. Install Ganglia onto a node you want to monitor by selecting it and clicking on Install. Turn on Ganglia monitoring for a node by selecting it and clicking on Monitor. If you are satisfied with the nodes you want to monitor, '); msg.append(gangliaLnk); - msg.append(' to open Ganglia page.'); + msg.append(' to open the Ganglia page.'); info.append(msg); info.css('margin-bottom', '10px'); $('#nodes').append(info); @@ -376,7 +376,7 @@ function loadNodes4Ganglia(data) { 'node', 'status', 'power', - 'ganglia'); + 'ganglia'); // Create a datatable var gangliaTable = new DataTable(gangliaTableId); @@ -481,6 +481,15 @@ function loadNodes4Ganglia(data) { monitorNode(tgtNodes, 'off'); } }); + + // Install Ganglia + var installLnk = $('Install'); + installLnk.click(function() { + var tgtNodes = getNodesChecked(gangliaTableId); + if (tgtNodes) { + openInstallDialog(tgtNodes); + } + }); // Power actions var monitorActions = [ monitorOnLnk, monitorOffLnk ]; @@ -488,7 +497,7 @@ function loadNodes4Ganglia(data) { // Create an action menu var actionsDIV = $(''); - var actions = [ [ powerLnk, powerActionMenu ], [ monitorLnk, monitorActionMenu ] ]; + var actions = [ [ powerLnk, powerActionMenu ], [ monitorLnk, monitorActionMenu ], installLnk ]; var actionMenu = createMenu(actions); actionMenu.superfish(); actionsDIV.append(actionMenu); @@ -546,33 +555,33 @@ function loadNodes4Ganglia(data) { powerCol.find('span a').bind('click', function(event) { refreshPowerStatus(group, gangliaTableId); }); - gangliaCol.bind('click', function(event) { + gangliaCol.find('span a').bind('click', function(event) { refreshGangliaStatus(group); }); // Create tooltip for status - var pingTip = createStatusToolTip(); - pingCol.find('span').append(pingTip); - pingCol.find('span a').tooltip({ + var tooltipConf = { position: "center right", offset: [-2, 10], effect: "fade", opacity: 0.8, relative: true, predelay: 800 - }); + }; + + var pingTip = createStatusToolTip(); + pingCol.find('span').append(pingTip); + pingCol.find('span a').tooltip(tooltipConf); // Create tooltip for power var powerTip = createPowerToolTip(); powerCol.find('span').append(powerTip); - powerCol.find('span a').tooltip({ - position: "center right", - offset: [-2, 10], - effect: "fade", - opacity: 0.8, - relative: true, - predelay: 800 - }); + powerCol.find('span a').tooltip(tooltipConf); + + // Create tooltip for ganglia + var gangliaTip = createGangliaToolTip(); + gangliaCol.find('span').append(gangliaTip); + gangliaCol.find('span a').tooltip(tooltipConf); /** * Get node and ganglia status @@ -1003,4 +1012,103 @@ function addNodes2GangliaTable(data) { success : loadGangliaStatus }); +} + +/** + * Create a tool tip for ganglia status + * + * @return Tool tip + */ +function createGangliaToolTip() { + // Create tooltip container + var toolTip = $('