Can configure network autostart
This commit is contained in:
@ -95,6 +95,29 @@ export class NetworkApi {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if autostart is enabled on a network
|
||||
*/
|
||||
static async IsAutostart(net: NetworkInfo): Promise<boolean> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
uri: `/network/${net.uuid}/autostart`,
|
||||
method: "GET",
|
||||
})
|
||||
).data.autostart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set autostart status of a network
|
||||
*/
|
||||
static async SetAutostart(net: NetworkInfo, enabled: boolean): Promise<void> {
|
||||
await APIClient.exec({
|
||||
uri: `/network/${net.uuid}/autostart`,
|
||||
method: "PUT",
|
||||
jsonData: { autostart: enabled },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing network
|
||||
*/
|
||||
|
Reference in New Issue
Block a user