diff --git a/ui-admin/src/js/components/database/data-browser/DataBrowser.jsx b/ui-admin/src/js/components/database/data-browser/DataBrowser.jsx index 40c570d3ce303aa03d24027440d1aa2772b18568..933395b64d9982db0aba6e2852a5bf8d6af625ae 100644 --- a/ui-admin/src/js/components/database/data-browser/DataBrowser.jsx +++ b/ui-admin/src/js/components/database/data-browser/DataBrowser.jsx @@ -98,12 +98,17 @@ class DataBrowser extends React.Component { ) this.state = { - viewType: props.viewType, + viewType: null, files: [], selectedFile: null, multiselectedFiles: new Set([]), showInfo: false } + + // Login for all subsequent requests + this.controller.login().then(() => { + this.setState({ viewType: props.viewType }) + }) } handleViewTypeChange(viewType) { this.setState({ viewType }) diff --git a/ui-admin/src/js/components/database/data-browser/DataBrowserController.js b/ui-admin/src/js/components/database/data-browser/DataBrowserController.js index 3d88196c41943a59d16a794c58167ae7fb8bd631..f01d86aad4c7cfa277913f4193713bf2914afea6 100644 --- a/ui-admin/src/js/components/database/data-browser/DataBrowserController.js +++ b/ui-admin/src/js/components/database/data-browser/DataBrowserController.js @@ -55,7 +55,6 @@ export default class DataBrowserController extends ComponentController { } async load() { - await this.login() const files = await this.listFiles() await this.setState({ files }) return await files.map(file => ({ id: file.name, ...file })) @@ -77,7 +76,6 @@ export default class DataBrowserController extends ComponentController { } async delete(paths) { - // console.log(paths) return new Promise((resolve, reject) => { const pathsLength = paths.length let responsesCount = 0