DNS providers: show each provider's Description in the list #161

Merged
jcoffey-dev merged 1 commits from fix/dns-providers-description-column into main 2026-11-05 04:05:55 +00:00
2 changed files with 20 additions and 1 deletions

No files matched your search

+18
View File
@@ -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([
+2 -1
View File
@@ -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<string, Column[]> = {
'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. */