mirror of https://github.com/apache/cloudstack.git
UI support for specify IP in VM wizard
This commit is contained in:
parent
d5aed69c29
commit
9769ab329d
|
|
@ -6109,6 +6109,10 @@ label.error {
|
|||
color: #000000;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select.advanced .secondary-input {
|
||||
height: 73px;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select .secondary-input input {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
|
|
@ -6130,10 +6134,54 @@ label.error {
|
|||
width: 100%;
|
||||
float: left;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select-container .select.advanced {
|
||||
height: 74px;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select .advanced-options {
|
||||
background: url(../images/sprites.png) -7px -795px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
margin-top: 15px;
|
||||
margin-right: 13px;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select .advanced-options:hover,
|
||||
.multi-wizard.instance-wizard .select-network .select.advanced .advanced-options {
|
||||
background: url(../images/sprites.png) -32px -795px;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select .specify-ip {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select.advanced .specify-ip {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select.advanced .specify-ip input {
|
||||
margin: 0px 0 0 15px;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select-container .select input {
|
||||
margin: 21px 15px 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select-container .select label {
|
||||
float: left;
|
||||
font-size: 11px;
|
||||
margin: 4px 0 0 42px;
|
||||
color: #4E6B82;
|
||||
}
|
||||
|
||||
.multi-wizard.instance-wizard .select-network .select-vpc {
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 204 KiB |
|
|
@ -45,6 +45,19 @@
|
|||
var data = cloudStack.serializeForm($form);
|
||||
var $wizardLoading = $('<div>').addClass('loading-overlay').appendTo($wizard).css('z-index', '10000');
|
||||
|
||||
// Pass network IPs
|
||||
data['my-network-ips'] = [];
|
||||
$form.find('.my-networks .select .specify-ip input[type=text]').each(function() {
|
||||
var $input = $(this);
|
||||
|
||||
if (!$input.closest('.select').find('input[type=checkbox]').is(':checked')) return true;
|
||||
|
||||
data['my-network-ips'].push(
|
||||
$input.closest('.select').hasClass('advanced') ?
|
||||
$input.val() : null
|
||||
);
|
||||
});
|
||||
|
||||
args.action({
|
||||
// Populate data
|
||||
context: context,
|
||||
|
|
@ -770,6 +783,21 @@
|
|||
})
|
||||
);
|
||||
|
||||
// Add IP/advanced option fields
|
||||
$step.find('.my-networks .select-container .select').each(function () {
|
||||
var $select = $(this);
|
||||
var $advancedLink = $('<div>').addClass('advanced-options');
|
||||
var $specifyIpField = $('<div>').addClass('specify-ip').append(
|
||||
$('<label>').html(_l('label.ip.address')),
|
||||
$('<input>').attr({ type: 'text' })
|
||||
);
|
||||
|
||||
$select.append($advancedLink, $specifyIpField);
|
||||
$advancedLink.click(function() {
|
||||
$select.toggleClass('advanced');
|
||||
});
|
||||
});
|
||||
|
||||
// Show non-VPC networks by default
|
||||
filterNetworkList(-1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue