From 40fb0520c66938c74e00efe1ba24484dd22bab51 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Wed, 4 Nov 2026 21:02:23 -0700 Subject: [PATCH] DNS providers: show each provider's Description in the list The served list shows type, TTL and timeout, so two providers of the same type look alike until you open one. Add the Description column the same way as Directories. --- src/lib/listColumns.test.ts | 18 ++++++++++++++++++ src/lib/listColumns.ts | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/lib/listColumns.test.ts b/src/lib/listColumns.test.ts index f5130ea..d42c89b 100644 --- a/src/lib/listColumns.test.ts +++ b/src/lib/listColumns.test.ts @@ -25,6 +25,24 @@ describe('withExtraColumns', () => { ]); }); + it('adds Description after the served columns on the DNS providers list', () => { + const out = withExtraColumns( + schema({ + 'x:DnsServer': list([ + { name: '@type', label: 'DNS server type' }, + { name: 'ttl', label: 'TTL' }, + { name: 'timeout', label: 'Timeout' }, + ]), + }), + ); + expect(out.lists['x:DnsServer'].columns).toEqual([ + { name: '@type', label: 'DNS server type' }, + { name: 'ttl', label: 'TTL' }, + { name: 'timeout', label: 'Timeout' }, + { name: 'description', label: 'Description' }, + ]); + }); + it('leaves a list that already has the column alone', () => { const served = schema({ 'x:Directory': list([ diff --git a/src/lib/listColumns.ts b/src/lib/listColumns.ts index 85c2236..6141276 100644 --- a/src/lib/listColumns.ts +++ b/src/lib/listColumns.ts @@ -7,13 +7,14 @@ /** * inbuxa: columns a served list leaves out. The Directories list shows only * each directory's type, so two LDAP directories look the same until you - * open them (admin #108). + * open them (admin #108). DNS providers have the same problem. */ import type { Column, Schema } from '@/types/schema'; const EXTRA_COLUMNS: Record = { 'x:Directory': [{ name: 'description', label: 'Description' }], + 'x:DnsServer': [{ name: 'description', label: 'Description' }], }; /** The schema with the extra columns added after the served ones; applied once, when the schema loads. */ -- 2.54.0