Add Delete Interface

This commit is contained in:
Samuel Lorch 2023-04-01 01:03:27 +02:00
parent 7121c46a74
commit 61ae805305
2 changed files with 25 additions and 7 deletions

View file

@ -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>