diff --git a/netbox_ipcalculator/pluginvars.json b/netbox_ipcalculator/pluginvars.json index 577c11c..69e8642 100644 --- a/netbox_ipcalculator/pluginvars.json +++ b/netbox_ipcalculator/pluginvars.json @@ -1,7 +1,7 @@ { "__name__": "netbox_ipcalculator", "__verbose_name__": "IP Calculator", - "__version__": "1.4.8", + "__version__": "1.4.9", "__base_url__": "netbox_ipcalculator", "__description__": "Netbox IP Calculator and Subnet Splitter", "__author__": "Pieter Lambrecht", diff --git a/netbox_ipcalculator/templates/netbox_ipcalculator/core/subnets.html b/netbox_ipcalculator/templates/netbox_ipcalculator/core/subnets.html index e0ef2ba..f150263 100644 --- a/netbox_ipcalculator/templates/netbox_ipcalculator/core/subnets.html +++ b/netbox_ipcalculator/templates/netbox_ipcalculator/core/subnets.html @@ -182,7 +182,9 @@ /* subnet address */ var newCell = document.createElement('TD'); newCell.classList.add("col_subnet"); - newCell.appendChild(document.createTextNode(inet_ntoa(address)+'/'+mask)); + var addPrefixBtn = "
"+inet_ntoa(address)+'/'+mask+"
" + // newCell.appendChild(document.createTextNode(inet_ntoa(address)+'/'+mask)); + newCell.setHTMLUnsafe(addPrefixBtn); newRow.appendChild(newCell); var addressFirst = address; @@ -202,12 +204,12 @@ else { addressRange = inet_ntoa(addressFirst)+' - '+inet_ntoa(addressLast); if (mask == 31) { - useableRange = addressRange; - numHosts = 2; + useableRange = addressRange; + numHosts = 2; } else { - useableRange = inet_ntoa(useableFirst)+' - '+inet_ntoa(useableLast); - numHosts = (1 + useableLast - useableFirst); + useableRange = inet_ntoa(useableFirst)+' - '+inet_ntoa(useableLast); + numHosts = (1 + useableLast - useableFirst); } }