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. */