Synched up 2.7 branch with trunk for z/VM.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14338 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d82ee6e7f2
commit
2d3d927056
@ -347,7 +347,6 @@ legend {
|
||||
|
||||
.actionBar {
|
||||
display: inline-table;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.actionBar div {
|
||||
|
@ -178,7 +178,7 @@ function loadUserTable(data) {
|
||||
});
|
||||
|
||||
// Create action bar
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
|
||||
|
||||
var createLnk = $('<a>Create</a>');
|
||||
createLnk.click(function() {
|
||||
@ -687,7 +687,7 @@ function configImagePanel(data) {
|
||||
});
|
||||
|
||||
// Create action bar
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
|
||||
|
||||
// Create a profile
|
||||
var createLnk = $('<a>Create</a>');
|
||||
@ -1193,7 +1193,7 @@ function configGroupPanel(data) {
|
||||
});
|
||||
|
||||
// Create action bar
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
|
||||
|
||||
// Create a group
|
||||
var createLnk = $('<a>Create</a>');
|
||||
|
@ -209,7 +209,7 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
|
||||
var inv = data.rsp[0].split(node + ':');
|
||||
|
||||
// Create array of property keys
|
||||
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'nic');
|
||||
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'zfcp', 'nic');
|
||||
|
||||
// Create hash table for property names
|
||||
var attrNames = new Object();
|
||||
@ -222,6 +222,7 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
|
||||
attrNames['memory'] = 'Total Memory:';
|
||||
attrNames['proc'] = 'Processors:';
|
||||
attrNames['disk'] = 'Disks:';
|
||||
attrNames['zfcp'] = 'zFCP:';
|
||||
attrNames['nic'] = 'NICs:';
|
||||
|
||||
// Create hash table for node attributes
|
||||
@ -269,7 +270,10 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
|
||||
*/
|
||||
fieldSet = $('<fieldset id="' + node + '_monitor"></fieldset>');
|
||||
legend = $('<legend>Monitoring [<a style="font-weight: normal; color: blue; text-decoration: none;">Refresh</a>]</legend>');
|
||||
fieldSet.append(legend);
|
||||
fieldSet.append(legend);
|
||||
// var info = createInfoBar('No data available');
|
||||
// fieldSet.append(info.css('width', '300px'));
|
||||
|
||||
getMonitorMetrics(node);
|
||||
|
||||
// Refresh monitoring charts on-click
|
||||
@ -457,6 +461,51 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
|
||||
dasdTable.append(dasdBody);
|
||||
item.append(dasdTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* zFCP section
|
||||
*/
|
||||
else if (keys[k] == 'zfcp') {
|
||||
// Create a label - Property name
|
||||
label = $('<label>' + attrNames[keys[k]].replace(':', '') + '</label>');
|
||||
item.append(label);
|
||||
|
||||
// Create a table to hold NIC data
|
||||
var zfcpTable = $('<table></table>');
|
||||
var zfcpBody = $('<tbody></tbody>');
|
||||
|
||||
// Table columns - Virtual device, Adapter Type, Port Name, # of Devices, MAC Address, and LAN Name
|
||||
var zfcpTabRow = $('<thead class="ui-widget-header"> <th>Virtual Device #</th> <th>Port Name</th> <th>Unit Number</th> <th>Size</th></thead>');
|
||||
zfcpTable.append(zfcpTabRow);
|
||||
var zfcpVDev, zfcpPortName, zfcpLun, zfcpSize;
|
||||
|
||||
// Loop through each zFCP device
|
||||
if (attrs[keys[k]]) {
|
||||
for (l = 0; l < attrs[keys[k]].length; l++) {
|
||||
if (attrs[keys[k]][l]) {
|
||||
args = attrs[keys[k]][l].split(' ');
|
||||
|
||||
// Get zFCP virtual device, port name (WWPN), unit number (LUN), and size
|
||||
zfcpVDev = $('<td>' + args[1].replace('0.0.', '') + '</td>');
|
||||
zfcpPortName = $('<td>' + args[4] + '</td>');
|
||||
zfcpLun = $('<td>' + args[7] + '</td>');
|
||||
zfcpSize = $('<td>' + args[args.length - 2] + ' ' + args[args.length - 1] + '</td>');
|
||||
|
||||
// Create a new row for each zFCP device
|
||||
zfcpTabRow = $('<tr></tr>');
|
||||
zfcpTabRow.append(zfcpVDev);
|
||||
zfcpTabRow.append(zfcpPortName);
|
||||
zfcpTabRow.append(zfcpLun);
|
||||
zfcpTabRow.append(zfcpSize);
|
||||
|
||||
zfcpBody.append(zfcpTabRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zfcpTable.append(zfcpBody);
|
||||
item.append(zfcpTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* NIC section
|
||||
@ -934,7 +983,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
statBar.hide();
|
||||
|
||||
// Create array of property keys
|
||||
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'nic');
|
||||
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'zfcp', 'nic');
|
||||
|
||||
// Create hash table for property names
|
||||
var attrNames = new Object();
|
||||
@ -947,6 +996,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
attrNames['memory'] = 'Total Memory:';
|
||||
attrNames['proc'] = 'Processors:';
|
||||
attrNames['disk'] = 'Disks:';
|
||||
attrNames['zfcp'] = 'zFCP:';
|
||||
attrNames['nic'] = 'NICs:';
|
||||
|
||||
// Create hash table for node attributes
|
||||
@ -1143,6 +1193,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
// Open dialog to confirm
|
||||
var confirmDialog = $('<div><p>Are you sure you want to remove this processor?</p></div>');
|
||||
confirmDialog.dialog({
|
||||
title: "Confirm",
|
||||
modal: true,
|
||||
width: 300,
|
||||
buttons: {
|
||||
@ -1249,6 +1300,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
// Open dialog to confirm
|
||||
var confirmDialog = $('<div><p>Are you sure you want to remove this disk?</p></div>');
|
||||
confirmDialog.dialog({
|
||||
title: "Confirm",
|
||||
modal: true,
|
||||
width: 300,
|
||||
buttons: {
|
||||
@ -1315,6 +1367,100 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
|
||||
item.append(dasdTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* zFCP section
|
||||
*/
|
||||
else if (keys[k] == 'zfcp') {
|
||||
// Create a label - Property name
|
||||
label = $('<label>' + attrNames[keys[k]].replace(':', '') + '</label>');
|
||||
item.append(label);
|
||||
|
||||
// Create a table to hold NIC data
|
||||
var zfcpTable = $('<table></table>');
|
||||
var zfcpBody = $('<tbody></tbody>');
|
||||
var zfcpFooter = $('<tfoot></tfoot>');
|
||||
|
||||
/**
|
||||
* Remove zFCP
|
||||
*/
|
||||
contextMenu = [ {
|
||||
'Remove' : function(menuItem, menu) {
|
||||
var addr = $(this).text();
|
||||
var portName = $(this).parents('tr').find('td:eq(1)').text();
|
||||
var unitNo = $(this).parents('tr').find('td:eq(2)').text();
|
||||
|
||||
// Open dialog to confirm
|
||||
var confirmDialog = $('<div><p>Are you sure you want to remove this zFCP device?</p></div>');
|
||||
confirmDialog.dialog({
|
||||
title: "Confirm",
|
||||
modal: true,
|
||||
width: 300,
|
||||
buttons: {
|
||||
"Ok": function(){
|
||||
removeZfcp(node, addr, portName, unitNo);
|
||||
$(this).dialog("close");
|
||||
},
|
||||
"Cancel": function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} ];
|
||||
|
||||
// Table columns - Virtual device, Adapter Type, Port Name, # of Devices, MAC Address, and LAN Name
|
||||
var zfcpTabRow = $('<thead class="ui-widget-header"> <th>Virtual Device #</th> <th>Port Name</th> <th>Unit Number</th> <th>Size</th></thead>');
|
||||
zfcpTable.append(zfcpTabRow);
|
||||
var zfcpVDev, zfcpPortName, zfcpLun, zfcpSize;
|
||||
|
||||
// Loop through each zFCP device
|
||||
if (attrs[keys[k]]) {
|
||||
for (l = 0; l < attrs[keys[k]].length; l++) {
|
||||
if (attrs[keys[k]][l]) {
|
||||
args = attrs[keys[k]][l].split(' ');
|
||||
|
||||
// Get zFCP virtual device, port name (WWPN), unit number (LUN), and size
|
||||
zfcpVDev = $('<td></td>');
|
||||
zfcpLink = $('<a>' + args[1].replace('0.0.', '') + '</a>');
|
||||
|
||||
// Append context menu to link
|
||||
zfcpLink.contextMenu(contextMenu, {
|
||||
theme : 'vista'
|
||||
});
|
||||
zfcpVDev.append(zfcpLink);
|
||||
|
||||
zfcpPortName = $('<td>' + args[4] + '</td>');
|
||||
zfcpLun = $('<td>' + args[7] + '</td>');
|
||||
zfcpSize = $('<td>' + args[args.length - 2] + ' ' + args[args.length - 1] + '</td>');
|
||||
|
||||
// Create a new row for each zFCP device
|
||||
zfcpTabRow = $('<tr></tr>');
|
||||
zfcpTabRow.append(zfcpVDev);
|
||||
zfcpTabRow.append(zfcpPortName);
|
||||
zfcpTabRow.append(zfcpLun);
|
||||
zfcpTabRow.append(zfcpSize);
|
||||
|
||||
zfcpBody.append(zfcpTabRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zfcpTable.append(zfcpBody);
|
||||
|
||||
/**
|
||||
* Add zFCP device
|
||||
*/
|
||||
var addZfcpLink = $('<a>Add zFCP</a>');
|
||||
addZfcpLink.bind('click', function(event) {
|
||||
var hcp = attrs['hcp'][0].split('.');
|
||||
openAddZfcpDialog(node, hcp[0]);
|
||||
});
|
||||
zfcpFooter.append(addZfcpLink);
|
||||
zfcpTable.append(zfcpFooter);
|
||||
|
||||
item.append(zfcpTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* NIC section
|
||||
@ -1339,6 +1485,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
// Open dialog to confirm
|
||||
var confirmDialog = $('<div><p>Are you sure you want to remove this NIC?</p></div>');
|
||||
confirmDialog.dialog({
|
||||
title: "Confirm",
|
||||
modal: true,
|
||||
width: 300,
|
||||
buttons: {
|
||||
@ -1381,7 +1528,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
|
||||
args = attrs[keys[k]][l + 1].split(' ');
|
||||
nicLanName = $('<td>' + args[args.length - 2] + ' ' + args[args.length - 1] + '</td>');
|
||||
|
||||
// Create a new row for each DASD
|
||||
// Create a new row for each NIC
|
||||
nicTabRow = $('<tr></tr>');
|
||||
nicTabRow.append(nicVDev);
|
||||
nicTabRow.append(nicType);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -634,7 +634,7 @@ function loadNodes(data) {
|
||||
$('#nodesTab').append(info);
|
||||
|
||||
// Create action bar
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
|
||||
|
||||
/**
|
||||
* Create menu for actions to perform against a given node
|
||||
@ -877,7 +877,7 @@ function loadNodes(data) {
|
||||
powerCol.unbind('click');
|
||||
monitorCol.unbind('click');
|
||||
commentCol.unbind('click');
|
||||
|
||||
|
||||
// Create enough space for loader to be displayed
|
||||
// Center align power, ping, and comments
|
||||
$('#' + nodesTableId + ' td:nth-child(3),td:nth-child(4),td:nth-child(5)').css({
|
||||
@ -1204,7 +1204,7 @@ function addNodes2Table(data) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Get node status
|
||||
var status = '';
|
||||
if (attrs[node]['status']){
|
||||
@ -1212,7 +1212,7 @@ function addNodes2Table(data) {
|
||||
}
|
||||
|
||||
rows[nodeRowPos][headersCol['status']] = status;
|
||||
|
||||
|
||||
// Go through each header
|
||||
for (var key in headersCol) {
|
||||
// Do not put comments and status in twice
|
||||
@ -1231,7 +1231,7 @@ function addNodes2Table(data) {
|
||||
// This is done after datatable is updated because
|
||||
// you cannot insert an object using fnUpdate()
|
||||
var comments = attrs[node]['usercomment'];
|
||||
|
||||
|
||||
// If no comments exists, show 'No comments' and
|
||||
// set icon image source
|
||||
var iconSrc;
|
||||
@ -1241,7 +1241,7 @@ function addNodes2Table(data) {
|
||||
} else {
|
||||
iconSrc = 'images/nodes/ui-icon-comment.png';
|
||||
}
|
||||
|
||||
|
||||
// Create icon for node comments
|
||||
var tipID = node + 'Tip';
|
||||
var commentsCol = $('#' + node).parent().parent().find('td').eq(5);
|
||||
@ -1261,7 +1261,7 @@ function addNodes2Table(data) {
|
||||
icon.tooltip({
|
||||
position: "center right",
|
||||
offset: [-2, 10],
|
||||
effect: "fade",
|
||||
effect: "fade",
|
||||
opacity: 0.8,
|
||||
relative: true,
|
||||
delay: 500
|
||||
|
@ -617,7 +617,7 @@ function updateSelectNodeDiv() {
|
||||
*/
|
||||
function createActionMenu() {
|
||||
// Create action bar
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
|
||||
|
||||
// Power on
|
||||
var powerOnLnk = $('<a>Power on</a>');
|
||||
|
@ -209,7 +209,7 @@ function loadImages(data) {
|
||||
});
|
||||
|
||||
// Actions
|
||||
var actionBar = $('<div class="actionBar"></div>');
|
||||
var actionBar = $('<div class="actionBar"></div>').css("width", "370px");
|
||||
var advancedLnk = '<a>Advanced</a>';
|
||||
var advancedMenu = createMenu([copyCDLnk, generateLnk]);
|
||||
|
||||
@ -236,8 +236,8 @@ function loadImages(data) {
|
||||
* Enable editable columns
|
||||
*/
|
||||
|
||||
// Do not make 1st column editable
|
||||
$('#' + imgTableId + ' td:not(td:nth-child(1))').editable(
|
||||
// Do not make 1st or 2nd columns editable
|
||||
$('#' + imgTableId + ' td:not(td:nth-child(1),td:nth-child(2))').editable(
|
||||
function(value, settings) {
|
||||
// Get column index
|
||||
var colPos = this.cellIndex;
|
||||
@ -1030,6 +1030,7 @@ function openEditImagePage(tgtImage) {
|
||||
|
||||
// Create an input for each definable attribute
|
||||
var div, label, input, value;
|
||||
var attrIndex = 0;
|
||||
// Set node attribute
|
||||
origAttrs[tgtImage]['imagename'] = tgtImage;
|
||||
for (var key in defAttrs) {
|
||||
@ -1044,7 +1045,21 @@ function openEditImagePage(tgtImage) {
|
||||
// Create label and input for attribute
|
||||
div = $('<div></div>').css('display', 'inline');
|
||||
label = $('<label>' + key + ':</label>').css('vertical-align', 'middle');
|
||||
input = $('<input type="text" id="' + key + '" value="' + value + '" title="' + defAttrs[key] + '"/>').css('margin-top', '5px');
|
||||
input = $('<input type="text" id="' + key + '" value="' + value + '" title="' + defAttrs[key] + '"/>').css({
|
||||
'margin-top': '5px',
|
||||
'float': 'none',
|
||||
'width': 'inherit'
|
||||
});
|
||||
|
||||
// There is an element called groups that will override the defaults for the groups attribute.
|
||||
// Hence, the input must have use CSS to override the float and width.
|
||||
|
||||
// Split attributes into 3 per row
|
||||
if (attrIndex > 0 && !(attrIndex % 3)) {
|
||||
div.css('display', 'inline-block');
|
||||
}
|
||||
|
||||
attrIndex++;
|
||||
|
||||
// Create server browser
|
||||
switch (key) {
|
||||
@ -1177,8 +1192,7 @@ function openEditImagePage(tgtImage) {
|
||||
$(this).css('border-color', 'blue');
|
||||
});
|
||||
|
||||
div.append(label);
|
||||
div.append(input);
|
||||
div.append(label, input);
|
||||
setPropsForm.append(div);
|
||||
}
|
||||
|
||||
|
@ -1056,3 +1056,18 @@ function getNodesChecked(datatableId) {
|
||||
|
||||
return tgts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if return message contains errors
|
||||
*
|
||||
* @param msg Return message
|
||||
* @return 0 If return message contains no errors
|
||||
* -1 If return message contains errors
|
||||
*/
|
||||
function containErrors(msg) {
|
||||
if (msg.indexOf('Failed') > -1 || msg.indexOf('Error') > -1) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -234,10 +234,6 @@ sub provzlinux {
|
||||
# Set nodetype definitions
|
||||
$out = `chtab node=$node noderes.netboot=zvm nodetype.nodetype=osi nodetype.provmethod=install nodetype.os=$os nodetype.arch=$arch nodetype.profile=$profile nodetype.comments="owner:$owner"`;
|
||||
|
||||
# Update hosts table and DNS
|
||||
`makehosts`;
|
||||
`makedns`;
|
||||
|
||||
# Create user directory entry replacing LXUSR with user ID
|
||||
# Use /opt/zhcp/conf/default.direct on zHCP as the template
|
||||
# USER LXUSR PSWD 512M 1G G
|
||||
@ -316,6 +312,10 @@ sub provzlinux {
|
||||
$virt_addr = $virt_addr + 1;
|
||||
}
|
||||
}
|
||||
|
||||
# Update hosts table and DNS
|
||||
`makehosts`;
|
||||
`makedns`;
|
||||
|
||||
# Update DHCP
|
||||
`makedhcp -a`;
|
||||
@ -674,6 +674,7 @@ sub clonezlinux {
|
||||
$out = `chtab node=$node noderes.netboot=zvm nodetype.nodetype=osi nodetype.provmethod=install nodetype.os=$os nodetype.arch=$arch nodetype.profile=$profile nodetype.comments="owner:$owner"`;
|
||||
|
||||
# Update hosts table and DNS
|
||||
sleep(5); # Time needed to update /etc/hosts
|
||||
`makehosts`;
|
||||
`makedns`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user