mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Basic Rule Page
This commit is contained in:
parent
b80bc4d32f
commit
fb70f41fcb
3 changed files with 32 additions and 1 deletions
29
client/src/pages/firewall/Rules.vue
Normal file
29
client/src/pages/firewall/Rules.vue
Normal file
|
@ -0,0 +1,29 @@
|
|||
<script setup lang="ts">
|
||||
import { apiCall } from "../../api";
|
||||
|
||||
let rules = $ref([]);
|
||||
|
||||
async function loadRules(){
|
||||
let res = await apiCall("Firewall.GetForwardRules", {});
|
||||
if (res.Error === null) {
|
||||
rules = res.Data.ForwardRules;
|
||||
console.debug("rules", rules);
|
||||
} else {
|
||||
console.debug("error", res);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
loadRules();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<PageHeader title="Forward Rules">
|
||||
<button @click="loadRules">Load Rules</button>
|
||||
</PageHeader>
|
||||
<NiceTable :columns="{name: 'Name', verdict: 'Verdict'}" :sort-self="false" v-model:data="rules"/>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue