mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-10 12:28:34 +03:00
make config cleaner
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { tabs, prefixedTabs } from './lib'
|
||||
import { timemap } from './lib'
|
||||
|
||||
export default {
|
||||
gsheets: [],
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
{
|
||||
name: 'timemap_data',
|
||||
path: 'data/timemap_data.xlsx',
|
||||
tabs
|
||||
tabs: timemap.default
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
12
src/lib.js
12
src/lib.js
@@ -1,6 +1,6 @@
|
||||
import BP from './lib/blueprinters'
|
||||
|
||||
export function prefixedTabs (prefix, cfg) {
|
||||
function prefixedTabs (prefix, cfg) {
|
||||
if (!cfg) cfg = {}
|
||||
const prf = key => cfg[key] ? `${prefix}_` : ''
|
||||
return {
|
||||
@@ -13,11 +13,7 @@ export function prefixedTabs (prefix, cfg) {
|
||||
}
|
||||
}
|
||||
|
||||
export const tabs = {
|
||||
export_events: BP.deeprows,
|
||||
export_categories: [BP.groups, BP.rows],
|
||||
export_filters: BP.tree,
|
||||
export_narratives: BP.rows,
|
||||
export_sources: BP.deepids,
|
||||
export_sites: BP.rows
|
||||
export const timemap = {
|
||||
default: prefixedTabs(),
|
||||
prefixedTabs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user