mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
add current dns zone records
This commit is contained in:
parent
4e04accf3a
commit
d041ca1742
2 changed files with 27 additions and 0 deletions
|
@ -140,6 +140,7 @@
|
||||||
"auto_config": "Automatic DNS records configuration",
|
"auto_config": "Automatic DNS records configuration",
|
||||||
"auto_config_ignored": "ignored, won't be changed by Yunohost unless you check the overwrite option",
|
"auto_config_ignored": "ignored, won't be changed by Yunohost unless you check the overwrite option",
|
||||||
"auto_config_ok": "Automatic configuration seems to be OK!",
|
"auto_config_ok": "Automatic configuration seems to be OK!",
|
||||||
|
"auto_config_zone": "Current DNS zone",
|
||||||
"edit": "Edit DNS configuration",
|
"edit": "Edit DNS configuration",
|
||||||
"info": "The automatic DNS records configuration is an experimental feature. <br>Consider saving your current DNS zone from your DNS registrar's interface before pushing records from here.",
|
"info": "The automatic DNS records configuration is an experimental feature. <br>Consider saving your current DNS zone from your DNS registrar's interface before pushing records from here.",
|
||||||
"manual_config": "Suggested DNS records for manual configuration",
|
"manual_config": "Suggested DNS records for manual configuration",
|
||||||
|
|
|
@ -63,6 +63,20 @@
|
||||||
</template>
|
</template>
|
||||||
</card>
|
</card>
|
||||||
|
|
||||||
|
<!-- CURRENT DNS ZONE -->
|
||||||
|
<card
|
||||||
|
v-if="showAutoConfigCard && dnsZone && dnsZone.length"
|
||||||
|
:title="$t('domain.dns.auto_config_zone')" icon="globe" no-body
|
||||||
|
>
|
||||||
|
<div class="log">
|
||||||
|
<div v-for="({ name: record, spaces, content, type }, i) in dnsZone" :key="'zone-' + i" class="records">
|
||||||
|
{{ record }}
|
||||||
|
<span class="bg-dark text-light px-1 rounded">{{ type }}</span>{{ spaces }}
|
||||||
|
<span>{{ content }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</card>
|
||||||
|
|
||||||
<!-- MANUAL CONFIG CARD -->
|
<!-- MANUAL CONFIG CARD -->
|
||||||
<card
|
<card
|
||||||
v-if="showManualConfigCard"
|
v-if="showManualConfigCard"
|
||||||
|
@ -99,6 +113,7 @@ export default {
|
||||||
dnsConfig: '',
|
dnsConfig: '',
|
||||||
dnsChanges: undefined,
|
dnsChanges: undefined,
|
||||||
dnsErrors: undefined,
|
dnsErrors: undefined,
|
||||||
|
dnsZone: undefined,
|
||||||
force: null
|
force: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -140,6 +155,17 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const unchanged = dnsChanges.unchanged
|
||||||
|
if (unchanged) {
|
||||||
|
const longestName = getLongest(unchanged, 'name')
|
||||||
|
const longestType = getLongest(unchanged, 'type')
|
||||||
|
unchanged.forEach(record => {
|
||||||
|
record.name = record.name + ' '.repeat(longestName - record.name.length + 1)
|
||||||
|
record.spaces = ' '.repeat(longestType - record.type.length + 1)
|
||||||
|
})
|
||||||
|
this.dnsZone = unchanged
|
||||||
|
}
|
||||||
|
|
||||||
this.dnsChanges = changes.length > 0 ? changes : null
|
this.dnsChanges = changes.length > 0 ? changes : null
|
||||||
this.force = canForce ? false : null
|
this.force = canForce ? false : null
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
Loading…
Add table
Reference in a new issue