Code Consistency - Quotes, Formatting, Whitespace
This commit is contained in:
parent
c53af91e48
commit
1f416e38bf
3 changed files with 20 additions and 20 deletions
30
dist/js/main.js
vendored
30
dist/js/main.js
vendored
|
@ -488,29 +488,29 @@ function switchMode(operatingMode) {
|
|||
renderTable(operatingMode);
|
||||
set_usable_ips_title(operatingMode);
|
||||
|
||||
$('#netsize').attr("pattern",netsizePatterns[operatingMode]);
|
||||
$('#netsize').attr('pattern', netsizePatterns[operatingMode]);
|
||||
$('#input_form').removeClass('was-validated');
|
||||
$('#input_form').rules("remove", "netsize");
|
||||
$('#input_form').rules('remove', 'netsize');
|
||||
|
||||
switch (operatingMode) {
|
||||
case 'AWS':
|
||||
var validate_error_message = "AWS Mode - Smallest size is /" + minSubnetSizes[operatingMode]
|
||||
var validate_error_message = 'AWS Mode - Smallest size is /' + minSubnetSizes[operatingMode]
|
||||
break;
|
||||
case 'AZURE':
|
||||
var validate_error_message = "Azure Mode - Smallest size is /" + minSubnetSizes[operatingMode]
|
||||
var validate_error_message = 'Azure Mode - Smallest size is /' + minSubnetSizes[operatingMode]
|
||||
break;
|
||||
default:
|
||||
var validate_error_message = "Smallest size is /" + minSubnetSizes[operatingMode]
|
||||
var validate_error_message = 'Smallest size is /' + minSubnetSizes[operatingMode]
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Modify jquery validation rule
|
||||
$('#input_form #netsize').rules("add", {
|
||||
$('#input_form #netsize').rules('add', {
|
||||
required: true,
|
||||
pattern: netsizePatterns[operatingMode],
|
||||
messages: {
|
||||
required: "Please enter a network size",
|
||||
required: 'Please enter a network size',
|
||||
pattern: validate_error_message
|
||||
}
|
||||
});
|
||||
|
@ -527,7 +527,7 @@ function switchMode(operatingMode) {
|
|||
var modal_error_message = 'One or more subnets are smaller than the minimum allowed for Azure.<br/>The smallest size allowed is /' + minSubnetSizes[operatingMode] + '.<br/>See: <a href="https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-faq#how-small-and-how-large-can-virtual-networks-and-subnets-be" target="_blank">Azure Virtual Network FAQ > How small and how large can virtual networks and subnets be?</a>'
|
||||
break;
|
||||
default:
|
||||
var validate_error_message = "Unknown Error"
|
||||
var validate_error_message = 'Unknown Error'
|
||||
break;
|
||||
}
|
||||
show_warning_modal('<div>' + modal_error_message + '</div>');
|
||||
|
@ -579,7 +579,7 @@ function set_usable_ips_title(operatingMode) {
|
|||
}
|
||||
|
||||
function show_warning_modal(message) {
|
||||
var notifyModal = new bootstrap.Modal(document.getElementById("notifyModal"), {});
|
||||
var notifyModal = new bootstrap.Modal(document.getElementById('notifyModal'), {});
|
||||
$('#notifyModal .modal-body').html(message)
|
||||
notifyModal.show()
|
||||
}
|
||||
|
@ -594,21 +594,21 @@ $( document ).ready(function() {
|
|||
rules: {
|
||||
network: {
|
||||
required: true,
|
||||
pattern: "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
|
||||
pattern: '^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
||||
},
|
||||
netsize: {
|
||||
required: true,
|
||||
pattern: "^([0-9]|[12][0-9]|3[0-2])$"
|
||||
pattern: '^([0-9]|[12][0-9]|3[0-2])$'
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
network: {
|
||||
required: "Please enter a network",
|
||||
pattern: "Must be a valid IPv4 Address"
|
||||
required: 'Please enter a network',
|
||||
pattern: 'Must be a valid IPv4 Address'
|
||||
},
|
||||
netsize: {
|
||||
required: "Please enter a network size",
|
||||
pattern: "Smallest size is /32"
|
||||
required: 'Please enter a network size',
|
||||
pattern: 'Smallest size is /32'
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
|
|
Loading…
Reference in a new issue