diff options
author | Helge Mader <ma@dev.tdt.de> | 2020-02-25 09:29:32 +0100 |
---|---|---|
committer | Helge Mader <ma@dev.tdt.de> | 2020-03-03 13:53:09 +0100 |
commit | 506dc5a9036fdce9e8e12eed1d882496d4f3e17e (patch) | |
tree | 1cb1478f2f4c72b54fba2b9dbde7f20c154f9a86 /modules/luci-base/htdocs/luci-static | |
parent | 95804e5eaf917b2026f50ec262c3bae711a6b317 (diff) |
luci-base: extended network.js for check if new interface is createable
Signed-off-by: Helge Mader <ma@dev.tdt.de>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 17 |
1 files changed, 17 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 68abb939f..9dcc1c8ff 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -2298,6 +2298,23 @@ Protocol = L.Class.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<null|error message>} + * Returns `null` if new interface is createable, else returns (error) message. + */ + isCreateable: function(ifname) { + return Promise.resolve(null); + }, + + /** * Checks whether the protocol functionality is installed. * * This function exists for compatibility with old code, it always |