;
+ export let sortedDomainsWithIntermediate: Array;
export let zone: Zone;
let aliases: Record>;
@@ -69,7 +70,7 @@
}
-{#each sortedDomains as dn}
+{#each sortedDomainsWithIntermediate as dn}
.
+
+ For AGPL licensing:
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+-->
+
+
+
+{#each domains as dn}
+
+ {fqdn(dn, origin.domain)}
+
+{/each}
diff --git a/ui/src/lib/stores/thiszone.ts b/ui/src/lib/stores/thiszone.ts
index d901ce5..5f2b936 100644
--- a/ui/src/lib/stores/thiszone.ts
+++ b/ui/src/lib/stores/thiszone.ts
@@ -31,6 +31,7 @@ import { refreshDomains } from '$lib/stores/domains';
export const thisZone: Writable = writable(null);
+// sortedDomains returns all subdomains, sorted
export const sortedDomains = derived(
thisZone,
($thisZone: null|Zone) => {
@@ -46,6 +47,36 @@ export const sortedDomains = derived(
},
);
+// sortedDomainsWithIntermediate returns all subdomains, sorted, with intermediate subdomains
+export const sortedDomainsWithIntermediate = derived(
+ sortedDomains,
+ ($sortedDomains: null|Array) => {
+ if (!$sortedDomains || $sortedDomains.length <= 1) {
+ return $sortedDomains;
+ }
+ const domains: Array = [$sortedDomains[0]];
+
+ let previous = domains[0].split('.');
+ for (let i = 1; i < $sortedDomains.length; i++) {
+ const cur = $sortedDomains[i].split('.');
+
+ if (previous.length < cur.length && previous[0] !== cur[cur.length - previous.length]) {
+ domains.push(cur.slice(cur.length - previous.length).join('.'));
+ }
+
+ while (previous.length + 1 < cur.length) {
+ previous = cur.slice(cur.length - previous.length - 1);
+ domains.push(previous.join('.'));
+ }
+
+ domains.push(cur.join('.'));
+ previous = cur;
+ }
+
+ return domains;
+ },
+);
+
export async function getZone(domain: DomainInList | Domain, zoneId: string) {
thisZone.set(null);
diff --git a/ui/src/routes/domains/[dn]/+layout.svelte b/ui/src/routes/domains/[dn]/+layout.svelte
index fcc8112..1512865 100644
--- a/ui/src/routes/domains/[dn]/+layout.svelte
+++ b/ui/src/routes/domains/[dn]/+layout.svelte
@@ -57,11 +57,12 @@
import ModalViewZone, { controls as ctrlViewZone } from '$lib/components/ModalViewZone.svelte';
import NewSubdomainPath, { controls as ctrlNewSubdomain } from '$lib/components/NewSubdomainPath.svelte';
import NewSubdomainModal from '$lib/components/domains/NewSubdomainModal.svelte';
- import { fqdn } from '$lib/dns';
+ import SubdomainListTiny from '$lib/components/domains/SubdomainListTiny.svelte';
+ import { fqdn, isReverseZone } from '$lib/dns';
import type { Domain, DomainInList } from '$lib/model/domain';
import type { ZoneMeta } from '$lib/model/zone';
import { domains, domains_by_groups, domains_idx, refreshDomains } from '$lib/stores/domains';
- import { retrieveZone as StoreRetrieveZone, sortedDomains, thisZone } from '$lib/stores/thiszone';
+ import { retrieveZone as StoreRetrieveZone, sortedDomains, sortedDomainsWithIntermediate, thisZone } from '$lib/stores/thiszone';
import { t } from '$lib/translations';
export let data: {domain: DomainInList;};
@@ -175,7 +176,7 @@
Retour à la zone
- {:else if $page.data.streamed && $sortedDomains}
+ {:else if $page.data.streamed && $sortedDomainsWithIntermediate}