Skip to content
Snippets Groups Projects
Commit 5551b1dd authored by David Sehnal's avatar David Sehnal
Browse files

dom server tweak

parent f8a7f1da
No related branches found
No related tags found
No related merge requests found
......@@ -44,10 +44,9 @@ function writeDomain(enc: CIFEncoder<any>, domain: DomainAnnotation | undefined)
function getSources(data: any): Table<S.Sources> {
const rows: Table.Row<S.Sources>[] = [];
let id = 1;
for (const name of Object.keys(S.categories)) {
if (!data[name]) continue;
const row: Table.Row<S.Sources> = { id: id++, name, count: Object.keys(data[name]).length };
const row: Table.Row<S.Sources> = { id: name, count: Object.keys(data[name]).length };
if (row.count > 0) rows.push(row);
}
return Table.ofRows(S.Sources, rows);
......
......@@ -9,8 +9,7 @@ import { Column } from 'mol-base/collections/database'
import Type = Column.Type
export const Sources = {
id: Type.int,
name: Type.str,
id: Type.str,
count: Type.int
}
export type Sources = typeof Sources
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment