mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 07:19:07 +00:00
Add Delete Interface
This commit is contained in:
parent
7121c46a74
commit
61ae805305
2 changed files with 25 additions and 7 deletions
|
@ -49,6 +49,16 @@ async function apply(){
|
|||
}
|
||||
}
|
||||
|
||||
async function deleteInterface(){
|
||||
let res = await apiCall("Network.DeleteInterface", {Interface: displayData[selection[0]].name});
|
||||
if (res.Error === null) {
|
||||
console.debug("deleted interface");
|
||||
} else {
|
||||
console.debug("error", res);
|
||||
}
|
||||
load();
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
load();
|
||||
});
|
||||
|
@ -61,6 +71,6 @@ onMounted(async() => {
|
|||
<button @click="load">Refresh</button>
|
||||
<button @click="load">Create</button>
|
||||
<button @click="load" :disabled="selection.length != 1">Edit</button>
|
||||
<button @click="load" :disabled="selection.length == 0">Delete</button>
|
||||
<button @click="deleteInterface" :disabled="selection.length == 0">Delete</button>
|
||||
</TableView>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue