luci-base: extended network.js for check if new interface is createable
Signed-off-by: Helge Mader <ma@dev.tdt.de>
This commit is contained in:
parent
95804e5eaf
commit
506dc5a903
1 changed files with 17 additions and 0 deletions
|
@ -2297,6 +2297,23 @@ Protocol = L.Class.extend(/** @lends LuCI.Network.Protocol.prototype */ {
|
||||||
return null;
|
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<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.
|
* Checks whether the protocol functionality is installed.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue