Add DomainDns view

This commit is contained in:
Axolotle 2020-08-06 13:30:30 +02:00
parent c647066c53
commit c379808e54
3 changed files with 56 additions and 1 deletions

View file

@ -2,7 +2,7 @@ import Home from './views/Home'
import Login from './views/Login'
import { UserList, UserCreate, UserInfo, UserEdit } from './views/user'
import { GroupList, GroupCreate } from './views/group'
import { DomainList, DomainAdd, DomainInfo } from './views/domain'
import { DomainList, DomainAdd, DomainInfo, DomainDns } from './views/domain'
const routes = [
{ name: 'home', path: '/', component: Home },
@ -116,6 +116,19 @@ const routes = [
{ name: 'domain-info', param: 'name' }
]
}
},
{
name: 'domain-dns',
path: '/domains/:name/dns',
component: DomainDns,
props: true,
meta: {
breadcrumb: [
{ name: 'domain-list', trad: 'domains' },
{ name: 'domain-info', param: 'name' },
{ name: 'domain-dns', trad: 'dns' }
]
}
}
]

View file

@ -0,0 +1,41 @@
<template>
<div class="domain-dns">
<p class="alert alert-warning">
<icon iname="warning" /> {{ $t('domain_dns_conf_is_just_a_recommendation') }}
</p>
<b-card>
<template v-slot:header>
<h2><icon iname="globe" /> {{ $t('domain_dns_config') }}</h2>
</template>
<pre><code>{{ dnsConfig }}</code></pre>
</b-card>
</div>
</template>
<script>
import api from '@/helpers/api'
export default {
name: 'DomainDns',
props: {
name: {
type: String,
required: true
}
},
data () {
return {
dnsConfig: ''
}
},
created () {
// simply use the api helper since we will not store the request's result.
api.get(`domains/${this.name}/dns`).then(dnsConfig => {
this.dnsConfig = dnsConfig
})
}
}
</script>
<style lang="scss" scoped>
</style>

View file

@ -1,3 +1,4 @@
export { default as DomainList } from './DomainList'
export { default as DomainAdd } from './DomainAdd'
export { default as DomainInfo } from './DomainInfo'
export { default as DomainDns } from './DomainDns'