X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-base%2Fhtdocs%2Fluci-static%2Fresources%2Fnetwork.js;h=c79022968ccc99132ab83285e40716f1f8b63dd4;hb=fc94ff1881dc50539fc03a734ada264590121883;hp=796b613beeb2cb20ffa237bee0faa907925ff2b2;hpb=2c036b36ce76c3c7430bf936e131f0d9d4ab83c4;p=project%2Fluci.git diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 796b613bee..c79022968c 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -2302,6 +2302,23 @@ Protocol = L.Class.extend(/** @lends LuCI.Network.Protocol.prototype */ { return null; }, + /** + * 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} + * 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. *