All about user login

Not runnable at the moment
This commit is contained in:
Tomas Bures 2017-07-08 15:48:34 +02:00
parent fbb8f5799e
commit d79bbad575
49 changed files with 1554 additions and 686 deletions

View file

@ -57,7 +57,7 @@ export default class CUD extends Component {
@withAsyncErrorHandler
async loadTreeData() {
axios.get('/namespaces/rest/namespaces-tree')
axios.get('/rest/namespaces-tree')
.then(response => {
response.data.expanded = true;
@ -75,7 +75,7 @@ export default class CUD extends Component {
@withAsyncErrorHandler
async loadFormValues() {
await this.getFormValuesFromURL(`/namespaces/rest/namespaces/${this.state.entityId}`, data => {
await this.getFormValuesFromURL(`/rest/namespaces/${this.state.entityId}`, data => {
if (data.parent) data.parent = data.parent.toString();
});
}
@ -121,10 +121,10 @@ export default class CUD extends Component {
let sendMethod, url;
if (edit) {
sendMethod = FormSendMethod.PUT;
url = `/namespaces/rest/namespaces/${this.state.entityId}`
url = `/rest/namespaces/${this.state.entityId}`
} else {
sendMethod = FormSendMethod.POST;
url = '/namespaces/rest/namespaces'
url = '/rest/namespaces'
}
try {
@ -175,7 +175,7 @@ export default class CUD extends Component {
this.disableForm();
this.setFormStatusMessage('info', t('Deleting namespace...'));
await axios.delete(`/namespaces/rest/namespaces/${this.state.entityId}`);
await axios.delete(`/rest/namespaces/${this.state.entityId}`);
this.navigateToWithFlashMessage('/namespaces', 'success', t('Namespace deleted'));

View file

@ -25,7 +25,7 @@ export default class List extends Component {
<Title>{t('Namespaces')}</Title>
<TreeTable withHeader dataUrl="/namespaces/rest/namespaces-tree" actionLinks={actionLinks} />
<TreeTable withHeader dataUrl="/rest/namespaces-tree" actionLinks={actionLinks} />
</div>
);
}

View file

@ -14,17 +14,17 @@ const getStructure = t => ({
title: t('Home'),
externalLink: '/',
children: {
'namespaces': {
namespaces: {
title: t('Namespaces'),
link: '/namespaces',
component: List,
children: {
'edit' : {
edit : {
title: t('Edit Namespace'),
params: [':id', ':action?'],
render: props => (<CUD edit {...props} />)
},
'create' : {
create : {
title: t('Create Namespace'),
render: props => (<CUD {...props} />)
}