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"> <script setup lang="ts">
import { apiCall } from '../../api'; import { apiCall } from '../../api';
import getPlugins from '../../plugins'; import getPlugins from '../../plugins';
import ArrayDisplay from '~/components/display/ArrayDisplay.vue';
const p = getPlugins(); const p = getPlugins();
let interfaces = $ref({}); let interfaces = $ref({});
@ -10,7 +11,7 @@ let selection = $ref([] as number[]);
const columns = [ const columns = [
{ heading: 'Name', path: 'name' }, { heading: 'Name', path: 'name' },
{ heading: 'Listen Port', path: 'listen_port' }, { heading: 'Listen Port', path: 'listen_port' },
{ heading: 'Peers', path: 'peers' }, { heading: 'Peers', path: 'peers', component: markRaw(ArrayDisplay), componentProp: 'data' },
{ heading: 'Comment', path: 'comment' }, { heading: 'Comment', path: 'comment' },
]; ];

View file

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