mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Add SNAT and DNAT PAge, Rename Rules
This commit is contained in:
parent
99dc0117ee
commit
1c467e90ae
4 changed files with 81 additions and 1 deletions
38
client/src/pages/firewall/DestinationNATRules.vue
Normal file
38
client/src/pages/firewall/DestinationNATRules.vue
Normal file
|
@ -0,0 +1,38 @@
|
|||
<script setup lang="ts">
|
||||
import { apiCall } from "../../api";
|
||||
|
||||
let rules = $ref([]);
|
||||
const columns = [
|
||||
{heading: 'Name', path: 'name'},
|
||||
{heading: 'Source', path: 'match.source_addresses'},
|
||||
{heading: 'Destination', path: 'match.destination_addresses'},
|
||||
{heading: 'Service', path: 'match.services'},
|
||||
{heading: 'Verdict', path: 'verdict'},
|
||||
{heading: 'Counter', path: 'counter'},
|
||||
{heading: 'Comment', path: 'comment'},
|
||||
];
|
||||
|
||||
async function loadRules(){
|
||||
let res = await apiCall("Firewall.GetDestinationNATRules", {});
|
||||
if (res.Error === null) {
|
||||
rules = res.Data.DestinationNATRules;
|
||||
console.debug("rules", rules);
|
||||
} else {
|
||||
console.debug("error", res);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
loadRules();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<PageHeader title="DNAT Rules">
|
||||
<button @click="loadRules">Load Rules</button>
|
||||
</PageHeader>
|
||||
<NiceTable :columns="columns" v-model:data="rules"/>
|
||||
</div>
|
||||
</template>
|
38
client/src/pages/firewall/SourceNATRules.vue
Normal file
38
client/src/pages/firewall/SourceNATRules.vue
Normal file
|
@ -0,0 +1,38 @@
|
|||
<script setup lang="ts">
|
||||
import { apiCall } from "../../api";
|
||||
|
||||
let rules = $ref([]);
|
||||
const columns = [
|
||||
{heading: 'Name', path: 'name'},
|
||||
{heading: 'Source', path: 'match.source_addresses'},
|
||||
{heading: 'Destination', path: 'match.destination_addresses'},
|
||||
{heading: 'Service', path: 'match.services'},
|
||||
{heading: 'Verdict', path: 'verdict'},
|
||||
{heading: 'Counter', path: 'counter'},
|
||||
{heading: 'Comment', path: 'comment'},
|
||||
];
|
||||
|
||||
async function loadRules(){
|
||||
let res = await apiCall("Firewall.GetSourceNATRules", {});
|
||||
if (res.Error === null) {
|
||||
rules = res.Data.SourceNATRules;
|
||||
console.debug("rules", rules);
|
||||
} else {
|
||||
console.debug("error", res);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
loadRules();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<PageHeader title="SNAT Rules">
|
||||
<button @click="loadRules">Load Rules</button>
|
||||
</PageHeader>
|
||||
<NiceTable :columns="columns" v-model:data="rules"/>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue