fixup! Split services into family
This commit is contained in:
parent
bb54496ca5
commit
5917e12f5a
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue