diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 34a802fdfd..0cd4f29bc4 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -2306,6 +2306,24 @@ Protocol = baseclass.extend(/** @lends LuCI.network.Protocol.prototype */ { }, /** + * Check function for the protocol handler if a new interface is createable. + * + * This function should be overwritten by protocol specific subclasses. + * + * @abstract + * + * @param {string} ifname + * The name of the interface to be created. + * + * @returns {Promise<void>} + * Returns a promise resolving if new interface is createable, else + * rejects with an error message string. + */ + isCreateable: function(ifname) { + return Promise.resolve(null); + }, + + /** * Checks whether the protocol functionality is installed. * * This function exists for compatibility with old code, it always |