Add Translated Columns to NAT Rules

This commit is contained in:
Samuel Lorch 2023-05-14 13:25:15 +02:00
parent 0e5cd1d3a5
commit 04ae8f05c3
2 changed files with 6 additions and 2 deletions

View file

@ -12,6 +12,8 @@ const columns = [
{heading: 'Source', path: 'match.source_addresses'},
{heading: 'Destination', path: 'match.destination_addresses'},
{heading: 'Service', path: 'match.services'},
{heading: 'Translated Address', path: 'address'},
{heading: 'Translated Service', path: 'service'},
{heading: 'Counter', path: 'counter'},
{heading: 'Comment', path: 'comment'},
];
@ -57,7 +59,7 @@ onMounted(async() => {
<template>
<div>
<TableView title="DNAT Rules" :columns="columns" :loading="loading" @draggedRow="draggedRow" v-model:selection="selection" v-model:data="rules" :table-props="{sort:true, sortSelf: true, draggable: true}">
<TableView title="DNAT Rules" :columns="columns" :loading="loading" @draggedRow="draggedRow" v-model:selection="selection" v-model:data="rules" :table-props="{sort:true, sortSelf: true, draggable: true}">
<button @click="load">Refresh</button>
<router-link class="button" to="/firewall/destinationnatrules/edit">Create</router-link>
<router-link class="button" :class="{ disabled: selection.length != 1 }" :to="'/firewall/destinationnatrules/edit/' + selection[0]">Edit</router-link>

View file

@ -12,6 +12,8 @@ const columns = [
{heading: 'Source', path: 'match.source_addresses'},
{heading: 'Destination', path: 'match.destination_addresses'},
{heading: 'Service', path: 'match.services'},
{heading: 'Translated Address', path: 'address'},
{heading: 'Translated Service', path: 'service'},
{heading: 'Counter', path: 'counter'},
{heading: 'Comment', path: 'comment'},
];
@ -57,7 +59,7 @@ onMounted(async() => {
<template>
<div>
<TableView title="SNAT Rules" :columns="columns" :loading="loading" @draggedRow="draggedRow" v-model:selection="selection" v-model:data="rules" :table-props="{sort:true, sortSelf: true, draggable: true}">
<TableView title="SNAT Rules" :columns="columns" :loading="loading" @draggedRow="draggedRow" v-model:selection="selection" v-model:data="rules" :table-props="{sort:true, sortSelf: true, draggable: true}">
<button @click="load">Refresh</button>
<router-link class="button" to="/firewall/sourcenatrules/edit">Create</router-link>
<router-link class="button" :class="{ disabled: selection.length != 1 }" :to="'/firewall/sourcenatrules/edit/' + selection[0]">Edit</router-link>