luci-base: network.js: expose prefixToMask() and maskToPrefix()

Expose the prefixToMask() and maskToPrefix() helper functions for use by
other modules, e.g. the datatype validator.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-07-31 08:41:53 +02:00
parent e64b0c3c0d
commit 00ec399fa1

View file

@ -594,6 +594,9 @@ function deviceSort(a, b) {
var Network, Protocol, Device, WifiDevice, WifiNetwork; var Network, Protocol, Device, WifiDevice, WifiNetwork;
Network = L.Class.extend({ Network = L.Class.extend({
prefixToMask: prefixToMask,
maskToPrefix: maskToPrefix,
flushCache: function() { flushCache: function() {
return Promise.resolve(_state).then(function() { return Promise.resolve(_state).then(function() {
_flush = true; _flush = true;