fixup! Split services into family

This commit is contained in:
nemunaire 2020-12-29 16:54:01 +01:00
parent bb54496ca5
commit 5917e12f5a
4 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@
<b-icon icon="check" />
{{ $t('domains.save-modifications') }}
</b-button>
<b-button v-if="type !== 'svcs.Origin'" type="button" size="sm" variant="outline-danger" class="mx-1" @click="deleteObject()">
<b-button v-if="type !== 'abstract.Origin'" type="button" size="sm" variant="outline-danger" class="mx-1" @click="deleteObject()">
<b-icon icon="trash" />
{{ $t('common.delete') }}
</b-button>

View File

@ -98,7 +98,7 @@
Update <span v-if="modal.svcData && modal.svcData._svctype" :title="services[modal.svcData._svctype].description">{{ services[modal.svcData._svctype].name }} </span>on <span class="text-monospace">{{ modal.dn | fqdn(domain.domain) }}</span>
</template>
<template v-slot:modal-footer="{ ok, cancel }">
<b-button :disabled="deleteServiceInProgress || !modal.svcData || modal.svcData._svctype === 'svcs.Origin'" variant="danger" @click="deleteService(modal.svcData)">
<b-button :disabled="deleteServiceInProgress || !modal.svcData || modal.svcData._svctype === 'abstract.Origin'" variant="danger" @click="deleteService(modal.svcData)">
<b-spinner v-if="deleteServiceInProgress" label="Spinning" small />
{{ $t('service.delete') }}
</b-button>

View File

@ -115,7 +115,7 @@ func (z *Zone) EraseService(subdomain string, origin string, id []byte, s *Servi
if bytes.Equal(svc.Id, id) {
if s == nil {
// Disallow removing SOA
if subdomain == "" && svc.Type == "svcs.Origin" {
if subdomain == "" && svc.Type == "abstract.Origin" {
return errors.New("You cannot delete this service. It is mandatory.")
}
if len(z.Services[subdomain]) <= 1 {

View File

@ -145,7 +145,7 @@ func init() {
Restrictions: svcs.ServiceRestrictions{
Alone: true,
Leaf: true,
ExclusiveRR: []string{"svcs.Origin"},
ExclusiveRR: []string{"abstract.Origin"},
Single: true,
NeedTypes: []uint16{
dns.TypeNS,