luci-base: network.js: expose prefixToMask() and maskToPrefix()
authorJo-Philipp Wich <jo@mein.io>
Wed, 31 Jul 2019 06:41:53 +0000 (08:41 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 14 Aug 2019 20:58:15 +0000 (22:58 +0200)
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>
modules/luci-base/htdocs/luci-static/resources/network.js

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