Created tooltips for node status and power status links.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8461 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2010-12-19 19:08:47 +00:00
parent 36c6086197
commit 1da6fb79dd

View File

@ -380,7 +380,7 @@ function loadNodes(data) {
var sorted = new Array();
for (var key in headers) {
// Do not put comments and status in twice
if (key != 'usercomment' && key.indexOf('status') < 0) {
if (key != 'usercomment' && key != 'status' && key.indexOf('statustime') < 0) {
sorted.push(key);
}
}
@ -390,8 +390,8 @@ function loadNodes(data) {
// Power status for nodes will not be requested until user clicks on power link
sorted.unshift('<input type="checkbox" onclick="selectAllCheckbox(event, $(this))">',
'node',
'<a>status</a><img src="images/loader.gif"></img>',
'<a>power</a><img src="images/loader.gif" style="display: none;"></img>',
'<span><a>status</a></span><img src="images/loader.gif"></img>',
'<span><a>power</a></span><img src="images/loader.gif" style="display: none;"></img>',
'comments');
// Create a datatable
@ -454,7 +454,7 @@ function loadNodes(data) {
var key = sorted[i];
// Do not put comments and status in twice
if (key != 'usercomment' && key.indexOf('status') < 0) {
if (key != 'usercomment' && key != 'status' && key.indexOf('statustime') < 0) {
var val = attrs[node][key];
if (val) {
row.push(val);
@ -689,6 +689,30 @@ function loadNodes(data) {
refreshPowerStatus(group);
});
// Create tooltip for status
var pingTip = createStatusToolTip();
pingCol.find('span').append(pingTip);
pingCol.find('span a').tooltip({
position: "center right",
offset: [-2, 10],
effect: "fade",
opacity: 0.8,
relative: true,
predelay: 800
});
// 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
});
/**
* Enable editable columns
*/
@ -739,7 +763,7 @@ function loadNodes(data) {
data : {
cmd : 'nodestat',
tgt : group,
args : '',
args : '-u',
msg : ''
},
@ -913,7 +937,7 @@ function refreshNodeStatus(group) {
data : {
cmd : 'nodestat',
tgt : group,
args : '',
args : '-u',
msg : ''
},
@ -1941,6 +1965,34 @@ function createCommentsToolTip(comment) {
return toolTip;
}
/**
* Create a tool tip for node status
*
* @return Tool tip
*/
function createStatusToolTip() {
// Create tooltip container
var toolTip = $('<div class="tooltip">Click here to refresh the node status</div>').css({
'height': '50px',
'width': '150px'
});
return toolTip;
}
/**
* Create a tool tip for power status
*
* @return Tool tip
*/
function createPowerToolTip() {
// Create tooltip container
var toolTip = $('<div class="tooltip">Click here to refresh the power status</div>').css({
'height': '50px',
'width': '150px'
});
return toolTip;
}
/**
* Show chdef output
*