Improve Wireguard tables

This commit is contained in:
Samuel Lorch 2024-07-30 23:45:23 +02:00
parent 185c1e723d
commit f8752f99af
2 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { apiCall } from '../../api';
import getPlugins from '../../plugins';
import ArrayDisplay from '~/components/display/ArrayDisplay.vue';
const p = getPlugins();
let interfaces = $ref({});
@ -10,7 +11,7 @@ let selection = $ref([] as number[]);
const columns = [
{ heading: 'Name', path: 'name' },
{ heading: 'Listen Port', path: 'listen_port' },
{ heading: 'Peers', path: 'peers' },
{ heading: 'Peers', path: 'peers', component: markRaw(ArrayDisplay), componentProp: 'data' },
{ heading: 'Comment', path: 'comment' },
];
@ -68,4 +69,4 @@ onMounted(async() => {
<button :disabled="selection.length != 1" @click="editInterface">Edit</button>
<button :disabled="selection.length != 1" @click="deleteInterface">Delete</button>
</TableView>
</template>
</template>

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { apiCall } from '../../api';
import getPlugins from '../../plugins';
import ArrayDisplay from '~/components/display/ArrayDisplay.vue';
const p = getPlugins();
let peers = $ref({});
@ -9,7 +10,7 @@ let selection = $ref([] as number[]);
const columns = [
{ heading: 'Name', path: 'name' },
{ heading: 'Allowed IPs', path: 'allowed_ips' },
{ heading: 'Allowed IPs', path: 'allowed_ips', component: markRaw(ArrayDisplay), componentProp: 'data' },
{ heading: 'Endpoint', path: 'endpoint' },
{ heading: 'Persistent Keepalive', path: 'persistent_keepalive' },
{ heading: 'Comment', path: 'comment' },