mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Add Addresses, Services Pages
This commit is contained in:
parent
de5efa2592
commit
ab1e23e10d
3 changed files with 72 additions and 1 deletions
35
client/src/pages/object/Addresses.vue
Normal file
35
client/src/pages/object/Addresses.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<script setup lang="ts">
|
||||
import { apiCall } from "../../api";
|
||||
|
||||
let addresses = $ref([]);
|
||||
const columns = [
|
||||
{heading: 'Name', path: 'name'},
|
||||
{heading: 'Type', path: 'type'},
|
||||
{heading: 'Value', path: 'value'},
|
||||
{heading: 'Comment', path: 'comment'},
|
||||
];
|
||||
|
||||
async function load(){
|
||||
let res = await apiCall("Object.GetAddresses", {});
|
||||
if (res.Error === null) {
|
||||
addresses = res.Data.Addresses;
|
||||
console.debug("addresses", addresses);
|
||||
} else {
|
||||
console.debug("error", res);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
load();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<PageHeader title="Addresses">
|
||||
<button @click="load">Load Addresses</button>
|
||||
</PageHeader>
|
||||
<NiceTable :columns="columns" v-model:data="addresses"/>
|
||||
</div>
|
||||
</template>
|
35
client/src/pages/object/Services.vue
Normal file
35
client/src/pages/object/Services.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<script setup lang="ts">
|
||||
import { apiCall } from "../../api";
|
||||
|
||||
let services = $ref([]);
|
||||
const columns = [
|
||||
{heading: 'Name', path: 'name'},
|
||||
{heading: 'Type', path: 'type'},
|
||||
{heading: 'Value', path: 'value'},
|
||||
{heading: 'Comment', path: 'comment'},
|
||||
];
|
||||
|
||||
async function load(){
|
||||
let res = await apiCall("Object.GetServices", {});
|
||||
if (res.Error === null) {
|
||||
services = res.Data.Services;
|
||||
console.debug("services", services);
|
||||
} else {
|
||||
console.debug("error", res);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
load();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<PageHeader title="services">
|
||||
<button @click="load">Load Services</button>
|
||||
</PageHeader>
|
||||
<NiceTable :columns="columns" v-model:data="services"/>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue