Blacklist functionality

Some API improvements
This commit is contained in:
Tomas Bures 2017-09-17 16:36:23 +02:00
parent c343e4efd3
commit 9203b5cee7
40 changed files with 726 additions and 398 deletions

View file

@ -18,7 +18,7 @@ const getStructure = t => ({
namespaces: {
title: t('Namespaces'),
link: '/namespaces',
component: List,
panelComponent: List,
children: {
':namespaceId([0-9]+)': {
title: resolved => t('Namespace "{{name}}"', {name: resolved.namespace.name}),
@ -31,19 +31,19 @@ const getStructure = t => ({
title: t('Edit'),
link: params => `/namespaces/${params.namespaceId}/edit`,
visible: resolved => resolved.namespace.permissions.includes('edit'),
render: props => <CUD action={props.match.params.action} entity={props.resolved.namespace} />
panelRender: props => <CUD action={props.match.params.action} entity={props.resolved.namespace} />
},
share: {
title: t('Share'),
link: params => `/namespaces/${params.namespaceId}/share`,
visible: resolved => resolved.namespace.permissions.includes('share'),
render: props => <Share title={t('Share')} entity={props.resolved.namespace} entityTypeId="namespace" />
panelRender: props => <Share title={t('Share')} entity={props.resolved.namespace} entityTypeId="namespace" />
}
}
},
create: {
title: t('Create'),
render: props => <CUD action="create" />
panelRender: props => <CUD action="create" />
},
}
}
@ -56,6 +56,6 @@ export default function() {
<I18nextProvider i18n={ i18n }><Section root='/namespaces' structure={getStructure}/></I18nextProvider>,
document.getElementById('root')
);
};
}