mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
domaindns: update DomainDns view to be included in DomainInfo dns panel
This commit is contained in:
parent
3a3846bdac
commit
fa3deeffda
2 changed files with 56 additions and 32 deletions
|
@ -3,10 +3,16 @@
|
||||||
:queries="queries" @queries-response="onQueriesResponse" :loading="loading"
|
:queries="queries" @queries-response="onQueriesResponse" :loading="loading"
|
||||||
skeleton="card-info-skeleton"
|
skeleton="card-info-skeleton"
|
||||||
>
|
>
|
||||||
<card v-if="showAutoConfigCard" :title="$t('domain.dns.auto_config')" icon="wrench">
|
<section v-if="showAutoConfigCard" class="panel-section">
|
||||||
<b-alert variant="warning">
|
<b-card-title title-tag="h3">
|
||||||
<icon iname="flask" /> <icon iname="warning" /> <span v-html="$t('domain.dns.info')" />
|
{{ $t('domain.dns.auto_config') }}
|
||||||
</b-alert>
|
</b-card-title>
|
||||||
|
|
||||||
|
<read-only-alert-item
|
||||||
|
:label="$t('domain.dns.info')"
|
||||||
|
type="warning"
|
||||||
|
icon="flask"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- AUTO CONFIG CHANGES -->
|
<!-- AUTO CONFIG CHANGES -->
|
||||||
<template v-if="dnsChanges">
|
<template v-if="dnsChanges">
|
||||||
|
@ -32,27 +38,32 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- CONFIG OK ALERT -->
|
<!-- CONFIG OK ALERT -->
|
||||||
<b-alert v-else-if="dnsChanges === null" variant="success" class="m-0">
|
<read-only-alert-item
|
||||||
<icon iname="thumbs-up" /> {{ $t('domain.dns.auto_config_ok') }}
|
v-else-if="dnsChanges === null"
|
||||||
</b-alert>
|
:label="$t('domain.dns.auto_config_ok')"
|
||||||
|
type="success"
|
||||||
|
icon="thumbs-up"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- CONFIG ERROR ALERT -->
|
<!-- CONFIG ERROR ALERT -->
|
||||||
<template v-if="dnsErrors && dnsErrors.length">
|
<template v-if="dnsErrors && dnsErrors.length">
|
||||||
<b-alert
|
<read-only-alert-item
|
||||||
v-for="({ variant, icon, message }, i) in dnsErrors" :key="i"
|
v-for="({ variant, icon, message }, i) in dnsErrors" :key="i"
|
||||||
:variant="variant" :class="dnsErrors.length === 1 ? 'm-0' : ''"
|
:label="message"
|
||||||
>
|
:type="variant"
|
||||||
<icon :iname="icon" /> <span v-html="message" />
|
:icon="icon"
|
||||||
</b-alert>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- CONFIG OVERWRITE DISCLAIMER -->
|
<!-- CONFIG OVERWRITE DISCLAIMER -->
|
||||||
<b-alert v-if="force !== null" variant="warning">
|
<read-only-alert-item
|
||||||
<icon iname="warning" /> <span v-html="$t('domain.dns.push_force_warning')" />
|
v-if="force !== null"
|
||||||
</b-alert>
|
:label="$t('domain.dns.push_force_warning')"
|
||||||
|
type="warning"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- CONFIG PUSH SUBMIT -->
|
<!-- CONFIG PUSH SUBMIT -->
|
||||||
<template v-if="dnsChanges" #buttons>
|
<template v-if="dnsChanges">
|
||||||
<b-form-checkbox v-if="force !== null" v-model="force">
|
<b-form-checkbox v-if="force !== null" v-model="force">
|
||||||
{{ $t('domain.dns.push_force') }}
|
{{ $t('domain.dns.push_force') }}
|
||||||
</b-form-checkbox>
|
</b-form-checkbox>
|
||||||
|
@ -61,13 +72,14 @@
|
||||||
{{ $t('domain.dns.push') }}
|
{{ $t('domain.dns.push') }}
|
||||||
</b-button>
|
</b-button>
|
||||||
</template>
|
</template>
|
||||||
</card>
|
</section>
|
||||||
|
|
||||||
<!-- CURRENT DNS ZONE -->
|
<!-- CURRENT DNS ZONE -->
|
||||||
<card
|
<section v-if="showAutoConfigCard && dnsZone && dnsZone.length" class="panel-section">
|
||||||
v-if="showAutoConfigCard && dnsZone && dnsZone.length"
|
<b-card-title title-tag="h3">
|
||||||
:title="$t('domain.dns.auto_config_zone')" icon="globe" no-body
|
{{ $t('domain.dns.auto_config_zone') }}
|
||||||
>
|
</b-card-title>
|
||||||
|
|
||||||
<div class="log">
|
<div class="log">
|
||||||
<div v-for="({ name: record, spaces, content, type }, i) in dnsZone" :key="'zone-' + i" class="records">
|
<div v-for="({ name: record, spaces, content, type }, i) in dnsZone" :key="'zone-' + i" class="records">
|
||||||
{{ record }}
|
{{ record }}
|
||||||
|
@ -75,19 +87,21 @@
|
||||||
<span>{{ content }}</span>
|
<span>{{ content }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</card>
|
</section>
|
||||||
|
|
||||||
<!-- MANUAL CONFIG CARD -->
|
<!-- MANUAL CONFIG CARD -->
|
||||||
<card
|
<section v-if="showManualConfigCard" class="panel-section">
|
||||||
v-if="showManualConfigCard"
|
<b-card-title title-tag="h3">
|
||||||
:title="$t('domain.dns.manual_config')" icon="globe" no-body
|
{{ $t('domain.dns.manual_config') }}
|
||||||
>
|
</b-card-title>
|
||||||
<b-alert variant="warning" class="m-0">
|
|
||||||
<icon iname="warning" /> {{ $t('domain_dns_conf_is_just_a_recommendation') }}
|
<read-only-alert-item
|
||||||
</b-alert>
|
:label="$t('domain_dns_conf_is_just_a_recommendation')"
|
||||||
|
type="warning"
|
||||||
|
/>
|
||||||
|
|
||||||
<pre class="log">{{ dnsConfig }}</pre>
|
<pre class="log">{{ dnsConfig }}</pre>
|
||||||
</card>
|
</section>
|
||||||
</view-base>
|
</view-base>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,11 @@
|
||||||
</description-row>
|
</description-row>
|
||||||
</card>
|
</card>
|
||||||
|
|
||||||
<config-panels v-if="config.panels" v-bind="config" @submit="onConfigSubmit" />
|
<config-panels v-if="config.panels" v-bind="config" @submit="onConfigSubmit">
|
||||||
|
<template v-if="currentTab === 'dns'" #tab-after>
|
||||||
|
<domain-dns :name="name" />
|
||||||
|
</template>
|
||||||
|
</config-panels>
|
||||||
</view-base>
|
</view-base>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -84,13 +88,15 @@ import {
|
||||||
formatYunoHostConfigPanels
|
formatYunoHostConfigPanels
|
||||||
} from '@/helpers/yunohostArguments'
|
} from '@/helpers/yunohostArguments'
|
||||||
import ConfigPanels from '@/components/ConfigPanels'
|
import ConfigPanels from '@/components/ConfigPanels'
|
||||||
|
import DomainDns from './DomainDns.vue'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DomainInfo',
|
name: 'DomainInfo',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
ConfigPanels
|
ConfigPanels,
|
||||||
|
DomainDns
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
@ -112,6 +118,10 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['mainDomain']),
|
...mapGetters(['mainDomain']),
|
||||||
|
|
||||||
|
currentTab () {
|
||||||
|
return this.$route.params.tabId
|
||||||
|
},
|
||||||
|
|
||||||
domain () {
|
domain () {
|
||||||
return this.$store.getters.domain(this.name)
|
return this.$store.getters.domain(this.name)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue