diff --git a/dist/js/main.js b/dist/js/main.js index b9f9eb5..b4a3660 100644 --- a/dist/js/main.js +++ b/dist/js/main.js @@ -484,33 +484,33 @@ function switchMode(operatingMode) { if (subnetMap !== null) { if (validateSubnetSizes(subnetMap, minSubnetSizes[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.
The smallest size allowed is /' + minSubnetSizes[operatingMode] + '.
See: Azure Virtual Network FAQ > How small and how large can virtual networks and subnets be?' break; default: - var validate_error_message = "Unknown Error" + var validate_error_message = 'Unknown Error' break; } show_warning_modal('
' + modal_error_message + '
'); @@ -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) { @@ -643,7 +643,7 @@ $( document ).ready(function() { }); let autoConfigResult = processConfigUrl(); - if (!autoConfigResult) { + if (!autoConfigResult) { reset(); } //importConfig('{"config_version":"1","subnets":{"10.0.0.0/16":{"10.0.0.0/17":{"10.0.0.0/18":{},"10.0.64.0/18":{}},"10.0.128.0/17":{"10.0.128.0/18":{"10.0.128.0/19":{},"10.0.160.0/19":{"10.0.160.0/20":{"10.0.160.0/21":{"10.0.160.0/22":{},"10.0.164.0/22":{}},"10.0.168.0/21":{}},"10.0.176.0/20":{"10.0.176.0/21":{"10.0.176.0/22":{"10.0.176.0/23":{},"10.0.178.0/23":{}},"10.0.180.0/22":{}},"10.0.184.0/21":{}}}},"10.0.192.0/18":{"10.0.192.0/19":{},"10.0.224.0/19":{}}}}},"notes":{}}') @@ -754,4 +754,4 @@ function importConfig(text) { } } -const rgba2hex = (rgba) => `#${rgba.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/).slice(1).map((n, i) => (i === 3 ? Math.round(parseFloat(n) * 255) : parseFloat(n)).toString(16).padStart(2, '0').replace('NaN', '')).join('')}` \ No newline at end of file +const rgba2hex = (rgba) => `#${rgba.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/).slice(1).map((n, i) => (i === 3 ? Math.round(parseFloat(n) * 255) : parseFloat(n)).toString(16).padStart(2, '0').replace('NaN', '')).join('')}` diff --git a/dist/robots.txt b/dist/robots.txt index 26b4d70..f6e6d1d 100644 --- a/dist/robots.txt +++ b/dist/robots.txt @@ -1,2 +1,2 @@ User-Agent: * -Allow: / \ No newline at end of file +Allow: / diff --git a/src/scss/custom.scss b/src/scss/custom.scss index a729936..822fbe7 100644 --- a/src/scss/custom.scss +++ b/src/scss/custom.scss @@ -24,4 +24,4 @@ $container-max-widths: map-merge($container-max-widths, $new-container-max-width --bs-tooltip-opacity: 1 !important; } -@import "../node_modules/bootstrap/scss/bootstrap"; \ No newline at end of file +@import "../node_modules/bootstrap/scss/bootstrap";