nfsense/client/src/pages/firewall/Rules.vue
adroslice 3a0d094e7b Color changes, fix login password box
- type=password was on the wrong element
- New color assignments for tables
- Only uses one palette for now
- Changed input bg to highlight color
- Forced dark mode on sidebar
- Moved some table coloring to components.css
- Fixed some comments being out-of-line
2023-03-26 20:23:45 +02:00

38 lines
No EOL
929 B
Vue

<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.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="columns" v-model:data="rules"/>
</div>
</template>