Commit 59251e8f authored by Janis Streib's avatar Janis Streib 🦉
Browse files

FIX: actually display fqdn references

parent 9dcec512
Pipeline #117262 passed with stages
in 6 minutes and 1 second
......@@ -7,5 +7,12 @@ export default {
{ name: 'dns.fqdn.list', join: { 0: 'api_fkey_dns_fqdn_parent' } }
]
return TransactionService.execute(config, ta)
},
getRecrodsByTargetFQDN(config, fqdn) {
const ta = [
{ name: 'dns.fqdn.list', old: { value: fqdn } },
{ name: 'dns.record.list', join: { 0: 'api_fkey_dns_record_target_fqdn' } }
]
return TransactionService.execute(config, ta)
}
}
<template>
<div class="fqdn_refs">
<h1>Referenzen zum FQDN '<span v-if="$route.params.fqdn === '$'">.</span><span
v-if="$route.params.fqdn !== '$'">{{$route.params.fqdn}}</span>'
</h1>
<FQDNRecordTable :fqdn_rrs="records" :fqdn="$route.params.fqdn"></FQDNRecordTable>
</div>
<div class="fqdn_refs">
<h1>Referenzen zum FQDN '<span v-if="$route.params.fqdn === '$'">.</span><span
v-if="$route.params.fqdn !== '$'">{{ $route.params.fqdn }}</span>'
</h1>
<FQDNRecordTable :fqdn_rrs="records" :fqdn="$route.params.fqdn"></FQDNRecordTable>
</div>
</template>
<script>
import RRService from '@/api-services.gen/dns.record'
import RRService from '@/api-services/dns_fqdn.service'
import FQDNRecordTable from '@/components/FQDNRecordTable.vue'
export default {
name: 'FQDNReferences',
data () {
data() {
return {
records: null
}
},
components: { FQDNRecordTable },
components: {FQDNRecordTable},
watch: {
$route () {
async $route() {
this.records = null
RRService.list(this.$store.state.netdb_axios_config, { target_data_unref: this.$route.params.fqdn }).then((response) => {
this.records = response.data[0]
Object.freeze(this.records)
})
const response = await RRService.getRecrodsByTargetFQDN(this.$store.state.netdb_axios_config, this.$route.params.fqdn)
this.records = response.data[1]
}
},
created () {
RRService.list(this.$store.state.netdb_axios_config, { target_data_unref: this.$route.params.fqdn }).then((response) => {
this.records = response.data[0]
Object.freeze(this.records)
})
async created() {
const response = await RRService.getRecrodsByTargetFQDN(this.$store.state.netdb_axios_config, this.$route.params.fqdn)
this.records = response.data[1]
}
}
</script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment