Beginning of work on templates.

This commit is contained in:
Tomas Bures 2018-02-13 23:50:13 +01:00
parent 47b8d80c22
commit 508d6b3b2f
40 changed files with 1685 additions and 1031 deletions

View file

@ -56,22 +56,19 @@ export default class CUD extends Component {
@withAsyncErrorHandler
async loadTreeData() {
axios.get('/rest/namespaces-tree')
.then(response => {
const response = await axios.get('/rest/namespaces-tree');
const data = response.data;
for (const root of data) {
root.expanded = true;
}
const data = response.data;
for (const root of data) {
root.expanded = true;
}
if (this.props.entity && !this.isEditGlobal()) {
this.removeNsIdSubtree(data);
}
if (this.props.entity && !this.isEditGlobal()) {
this.removeNsIdSubtree(data);
}
this.setState({
treeData: data
});
});
this.setState({
treeData: data
});
}
componentDidMount() {