mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
add table selection, rework column definitions
This commit is contained in:
parent
0f306a7705
commit
3847a89594
2 changed files with 85 additions and 9 deletions
|
@ -2,6 +2,15 @@
|
|||
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", {});
|
||||
|
@ -24,6 +33,6 @@ onMounted(async() => {
|
|||
<PageHeader title="Forward Rules">
|
||||
<button @click="loadRules">Load Rules</button>
|
||||
</PageHeader>
|
||||
<NiceTable :columns="{name: 'Name', verdict: 'Verdict'}" :sort-self="false" v-model:data="rules"/>
|
||||
<NiceTable :columns="columns" v-model:data="rules"/>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue