diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js
index 841b85cc9..0b76cf286 100644
--- a/xCAT-UI/js/nodes/nodes.js
+++ b/xCAT-UI/js/nodes/nodes.js
@@ -308,11 +308,13 @@ function loadNodes(data) {
}
sorted.sort();
- // Add column for check box, node, ping, and power
- sorted.unshift('', 'node',
+ // Add column for check box, node, ping, power, and comments
+ sorted.unshift('',
+ 'node',
'ping',
- 'power
');
-
+ 'power
',
+ 'comments');
+
// Create a datatable
var dTable = new DataTable('nodesDataTable');
dTable.init(sorted);
@@ -325,10 +327,13 @@ function loadNodes(data) {
var checkBx = '';
// Open node onclick
var nodeLink = $('' + node + '').bind('click', loadNode);
- row.push(checkBx, nodeLink, '', '');
+ // Left align node link
+ nodeLink.css('text-align', 'left');
+ // Push in checkbox, node link, ping, power, and notes
+ row.push(checkBx, nodeLink, '', '', '');
// Go through each header
- for ( var i = 4; i < sorted.length; i++) {
+ for ( var i = 5; i < sorted.length; i++) {
// Add the node attributes to the row
var key = sorted[i];
var val = attrs[node][key];
@@ -553,8 +558,8 @@ function loadNodes(data) {
/**
* Enable editable columns
*/
- // Do not make 1st, 2nd, 3rd, or 4th column editable
- $('#nodesDataTable td:not(td:nth-child(1),td:nth-child(2),td:nth-child(3),td:nth-child(4))').editable(
+ // Do not make 1st, 2nd, 3rd, 4th, or 5th column editable
+ $('#nodesDataTable td:not(td:nth-child(1),td:nth-child(2),td:nth-child(3),td:nth-child(4),td:nth-child(5))').editable(
function(value, settings) {
// Change text color to red
$(this).css('color', 'red');
@@ -581,13 +586,13 @@ function loadNodes(data) {
return (value);
}, {
onblur : 'submit', // Clicking outside editable area submits changes
- type : 'textarea',
+ type : 'textarea',
placeholder: ' ',
- height : '25px' // The height of the text area
+ height : '30px' // The height of the text area
});
/**
- * Get power and ping status for each node
+ * Get power, ping, and comments for each node
*/
// Get power status
@@ -618,6 +623,20 @@ function loadNodes(data) {
success : loadPingStatus
});
+ // Get comments
+ $.ajax( {
+ url : 'lib/cmd.php',
+ dataType : 'json',
+ data : {
+ cmd : 'nodels',
+ tgt : group,
+ args : 'nodelist.comments',
+ msg : ''
+ },
+
+ success : loadComments
+ });
+
/**
* Additional ajax requests need to be made for zVM
*/
@@ -1768,35 +1787,7 @@ function updateNodeAttrs(group) {
msg : ''
},
- /**
- * Show chtab output
- *
- * @param data
- * Data returned from HTTP request
- * @return Nothing
- */
- success : function(data) {
- // Get chtab output
- var chtabOut = data.rsp;
-
- // Find info bar on nodes tab, if any
- var info = $('#nodesTab').find('.ui-state-highlight');
- if (!info.length) {
- // Create info bar if one does not exist
- info = createInfoBar('');
- $('#nodesTab').append(info);
- }
-
- var node, status;
- var pg = $('