From 983cc460d0ade9c6c02319c89e78bc3cb8dd3d70 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 10:48:37 +0200 Subject: [PATCH 01/10] "changeTab" --- .../class/osparc/dashboard/Dashboard.js | 24 ++++++++++++++----- .../osparc/dashboard/ResourceBrowserBase.js | 4 ++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js b/services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js index b26b4d52e17..cc714440242 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js @@ -97,7 +97,8 @@ qx.Class.define("osparc.dashboard.Dashboard", { const permissions = osparc.data.Permissions.getInstance(); const tabIconSize = 20; const tabs = [{ - id: "studiesTabBtn", + id: "studiesTab", + buttonId: "studiesTabBtn", label: osparc.product.Utils.getStudyAlias({ plural: true, allUpperCase: true @@ -107,7 +108,8 @@ qx.Class.define("osparc.dashboard.Dashboard", { }]; if (permissions.canDo("dashboard.templates.read")) { tabs.push({ - id: "templatesTabBtn", + id: "templatesTab", + buttonId: "templatesTabBtn", label: osparc.product.Utils.getTemplateAlias({ plural: true, allUpperCase: true @@ -118,7 +120,8 @@ qx.Class.define("osparc.dashboard.Dashboard", { } if (permissions.canDo("dashboard.services.read")) { tabs.push({ - id: "servicesTabBtn", + id: "servicesTab", + buttonId: "servicesTabBtn", label: this.tr("SERVICES"), icon: "@FontAwesome5Solid/cogs/"+tabIconSize, buildLayout: this.__createServiceBrowser @@ -126,16 +129,18 @@ qx.Class.define("osparc.dashboard.Dashboard", { } if (permissions.canDo("dashboard.data.read") && osparc.product.Utils.isProduct("osparc")) { tabs.push({ - id: "dataTabBtn", + id: "dataTab", + buttonId: "dataTabBtn", label: this.tr("DATA"), icon: "@FontAwesome5Solid/folder/"+tabIconSize, buildLayout: this.__createDataBrowser }); } - tabs.forEach(({id, label, icon, buildLayout}) => { + tabs.forEach(({id, buttonId, label, icon, buildLayout}) => { const tabPage = new qx.ui.tabview.Page(label, icon).set({ appearance: "dashboard-page" }); + tabPage.id = id; const tabButton = tabPage.getChildControl("button"); tabButton.set({ minWidth: 50, @@ -149,7 +154,7 @@ qx.Class.define("osparc.dashboard.Dashboard", { visibility: "excluded" }); osparc.utils.Utils.centerTabIcon(tabPage); - osparc.utils.Utils.setIdToWidget(tabButton, id); + osparc.utils.Utils.setIdToWidget(tabButton, buttonId); tabPage.setLayout(new qx.ui.layout.Grow()); const viewLayout = buildLayout.call(this); @@ -158,6 +163,13 @@ qx.Class.define("osparc.dashboard.Dashboard", { viewLayout.resetSelection(); } }, this); + viewLayout.addListener("changeTab", e => { + const activeTab = e.getData(); + const tabFound = this.getSelectables().find(s => s.id === activeTab); + if (tabFound) { + this.setSelection([tabFound]); + } + }, this); const scrollerMainView = new qx.ui.container.Scroll(); scrollerMainView.add(viewLayout); tabPage.add(scrollerMainView); diff --git a/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js b/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js index 4982fcaefed..98b5b3122df 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js @@ -77,6 +77,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", { }, events: { + "changeTab": "qx.event.type.Data", "publishTemplate": "qx.event.type.Data" }, @@ -456,6 +457,9 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", { }, _startStudyById: function(studyId, openCB, cancelCB, isStudyCreation = false) { + if (isStudyCreation) { + this.fireDataEvent("changeTab", "studiesTab"); + } this.self().startStudyById(studyId, openCB, cancelCB, isStudyCreation); }, From f4bb38d9b5ef54f6345d20a2ed594718c541a64c Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 12:20:37 +0200 Subject: [PATCH 02/10] search with tag_ids --- .../class/osparc/dashboard/StudyBrowser.js | 32 +++++++++++++++---- .../source/class/osparc/data/Resources.js | 3 +- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index ae1864c7514..2215a29caa4 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -629,6 +629,27 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { return null; }, + __getPageParams: function() { + const filterData = this._searchBarFilter.getFilterData(); + if (filterData.text || filterData.tags.length) { + const searchParams = {}; + searchParams.text = ""; + searchParams.tags = ""; + if (filterData.text) { + searchParams.text = encodeURIComponent(filterData.text); // name, description and uuid + } + if (searchParams.tags) { + searchParams.tags = filterData.tags.join(","); + } + return searchParams; + } + + const contextParams = {}; + contextParams.workspaceId = this.getCurrentWorkspaceId(); + contextParams.folderId = this.getCurrentFolderId(); + return contextParams; + }, + __getNextStudiesRequest: function() { const params = { url: { @@ -647,14 +668,13 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { resolveWResponse: true }; - const filterData = this._searchBarFilter.getFilterData(); - if (filterData.text) { - params.url.text = encodeURIComponent(filterData.text); // name, description and uuid + const pageParams = this.__getPageParams(); + Object.entries(pageParams).forEach(([key, value]) => { + params.url[key] = value; + }); + if ("text" in pageParams) { return osparc.data.Resources.fetch("studies", "getPageSearch", params, undefined, options); } - - params.url.workspaceId = this.getCurrentWorkspaceId(); - params.url.folderId = this.getCurrentFolderId(); return osparc.data.Resources.fetch("studies", "getPage", params, undefined, options); }, diff --git a/services/static-webserver/client/source/class/osparc/data/Resources.js b/services/static-webserver/client/source/class/osparc/data/Resources.js index ac1cddbdda5..1fbdd0caa1b 100644 --- a/services/static-webserver/client/source/class/osparc/data/Resources.js +++ b/services/static-webserver/client/source/class/osparc/data/Resources.js @@ -126,8 +126,7 @@ qx.Class.define("osparc.data.Resources", { getPageSearch: { useCache: false, method: "GET", - url: statics.API + "/projects:search?offset={offset}&limit={limit}&text={text}&order_by={orderBy}" - // url: statics.API + "/projects:search?offset={offset}&limit={limit}&text={text}&tags={tags}&order_by={orderBy}" + url: statics.API + "/projects:search?offset={offset}&limit={limit}&text={text}&tag_ids={tags}&order_by={orderBy}" }, getOne: { useCache: false, From 9582b13dde8e701bc61ded39a083e6d53bb8b028 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 13:14:32 +0200 Subject: [PATCH 03/10] improve context check --- .../class/osparc/dashboard/StudyBrowser.js | 57 ++++++++++--------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index 2215a29caa4..ee3a1d6a684 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -223,21 +223,19 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { this._loadingResourcesBtn.setVisibility("visible"); this.__getNextStudiesRequest() .then(resp => { - const urlParams = resp["params"]["url"]; // Context might have been changed while waiting for the response. // The new call is on the way, therefore this response can be ignored. - if ("workspaceId" in urlParams) { - if ( - urlParams.workspaceId !== this.getCurrentWorkspaceId() || - urlParams.folderId !== this.getCurrentFolderId() - ) { - return; - } - } else if ("text" in urlParams) { - const currentFilterData = this._searchBarFilter.getFilterData(); - if (currentFilterData.text && urlParams.text !== encodeURIComponent(currentFilterData.text)) { - return; + const reqParams = osparc.utils.Utils.deepCloneObject(resp["params"]["url"]); + delete reqParams["limit"]; + delete reqParams["offset"]; + const currentParams = this.__getRequestParams(); + if (JSON.stringify(reqParams) !== JSON.stringify(currentParams)) { + // it did change + console.log("context changed"); + if (this._resourcesContainer.getFlatList()) { + this._resourcesContainer.getFlatList().nextRequest = null; } + return; } const studies = resp["data"]; @@ -629,25 +627,29 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { return null; }, - __getPageParams: function() { + __getRequestParams: function() { + const requestParams = {}; + requestParams.orderBy = JSON.stringify(this.getOrderBy()); + const filterData = this._searchBarFilter.getFilterData(); if (filterData.text || filterData.tags.length) { - const searchParams = {}; - searchParams.text = ""; - searchParams.tags = ""; + console.log("Search:"); + console.log(filterData.text); + console.log(filterData.tags); + requestParams.text = ""; + requestParams.tags = ""; if (filterData.text) { - searchParams.text = encodeURIComponent(filterData.text); // name, description and uuid + requestParams.text = encodeURIComponent(filterData.text); // name, description and uuid } - if (searchParams.tags) { - searchParams.tags = filterData.tags.join(","); + if (filterData.tags.length) { + requestParams.tags = filterData.tags.join(","); } - return searchParams; + return requestParams; } - const contextParams = {}; - contextParams.workspaceId = this.getCurrentWorkspaceId(); - contextParams.folderId = this.getCurrentFolderId(); - return contextParams; + requestParams.workspaceId = this.getCurrentWorkspaceId(); + requestParams.folderId = this.getCurrentFolderId(); + return requestParams; }, __getNextStudiesRequest: function() { @@ -655,7 +657,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { url: { offset: 0, limit: osparc.dashboard.ResourceBrowserBase.PAGINATED_STUDIES, - orderBy: JSON.stringify(this.getOrderBy()), } }; @@ -668,11 +669,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { resolveWResponse: true }; - const pageParams = this.__getPageParams(); - Object.entries(pageParams).forEach(([key, value]) => { + const requestParams = this.__getRequestParams(); + Object.entries(requestParams).forEach(([key, value]) => { params.url[key] = value; }); - if ("text" in pageParams) { + if ("text" in requestParams) { return osparc.data.Resources.fetch("studies", "getPageSearch", params, undefined, options); } return osparc.data.Resources.fetch("studies", "getPage", params, undefined, options); From 10ea4248f2e9e9d723cf1b8f1d14419afb0500a3 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 13:15:52 +0200 Subject: [PATCH 04/10] minor --- .../client/source/class/osparc/dashboard/StudyBrowser.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index ee3a1d6a684..67de2215bb6 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -633,9 +633,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { const filterData = this._searchBarFilter.getFilterData(); if (filterData.text || filterData.tags.length) { - console.log("Search:"); - console.log(filterData.text); - console.log(filterData.tags); requestParams.text = ""; requestParams.tags = ""; if (filterData.text) { From a5c486885f6826a74becf762b0987b459fc4e2f1 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 14:17:01 +0200 Subject: [PATCH 05/10] snakeToCamel --- .../client/source/class/osparc/utils/Utils.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/static-webserver/client/source/class/osparc/utils/Utils.js b/services/static-webserver/client/source/class/osparc/utils/Utils.js index 07cff60b282..9c030d08f99 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Utils.js +++ b/services/static-webserver/client/source/class/osparc/utils/Utils.js @@ -1008,6 +1008,15 @@ qx.Class.define("osparc.utils.Utils", { isUrl: url => /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/gm.test(url), + snakeToCamel: str => { + str.toLowerCase().replace(/([-_][a-z])/g, group => + group + .toUpperCase() + .replace("-", "") + .replace("_", "") + ); + }, + setIdToWidget: (qWidget, id) => { if (qWidget.getContentElement) { qWidget.getContentElement().setAttribute("osparc-test-id", id); From bc3464a335c3fd65d02e27a402d20dd3c5be9f81 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 14:27:33 +0200 Subject: [PATCH 06/10] minor --- .../static-webserver/client/source/class/osparc/utils/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/utils/Utils.js b/services/static-webserver/client/source/class/osparc/utils/Utils.js index 9c030d08f99..775a3ea1d5b 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Utils.js +++ b/services/static-webserver/client/source/class/osparc/utils/Utils.js @@ -1009,7 +1009,7 @@ qx.Class.define("osparc.utils.Utils", { isUrl: url => /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/gm.test(url), snakeToCamel: str => { - str.toLowerCase().replace(/([-_][a-z])/g, group => + return str.toLowerCase().replace(/([-_][a-z])/g, group => group .toUpperCase() .replace("-", "") From 5fcf4dca0b715b546fbb211dec3e9d2b5bc56ae8 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 15:25:27 +0200 Subject: [PATCH 07/10] didContextChange --- .../class/osparc/dashboard/StudyBrowser.js | 54 +++++++++++++------ 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index 67de2215bb6..17b059152da 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -225,13 +225,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { .then(resp => { // Context might have been changed while waiting for the response. // The new call is on the way, therefore this response can be ignored. - const reqParams = osparc.utils.Utils.deepCloneObject(resp["params"]["url"]); - delete reqParams["limit"]; - delete reqParams["offset"]; - const currentParams = this.__getRequestParams(); - if (JSON.stringify(reqParams) !== JSON.stringify(currentParams)) { - // it did change - console.log("context changed"); + const contextChanged = this.__didContextChange(resp["params"]["url"]); + if (contextChanged) { if (this._resourcesContainer.getFlatList()) { this._resourcesContainer.getFlatList().nextRequest = null; } @@ -613,16 +608,43 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { }, this); }, + __didContextChange: function(reqParams) { + // not needed for the comparison + delete reqParams["type"]; + delete reqParams["limit"]; + delete reqParams["offset"]; + + // check the entries in currentParams are the same as the reqParams + const currentParams = this.__getRequestParams(); + let sameContext = true; + Object.entries(currentParams).forEach(([key, value]) => { + sameContext &= key in reqParams && reqParams[key] === value; + }); + return !sameContext; + }, + __getNextPageParams: function() { - if ("nextRequest" in this._resourcesContainer.getFlatList() && - this._resourcesContainer.getFlatList().nextRequest !== null && - osparc.utils.Utils.hasParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "offset") && - osparc.utils.Utils.hasParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "limit") - ) { - return { - offset: osparc.utils.Utils.getParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "offset"), - limit: osparc.utils.Utils.getParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "limit") - }; + if (this._resourcesContainer.getFlatList() && this._resourcesContainer.getFlatList().nextRequest) { + // Context might have been changed while waiting for the response. + // The new call is on the way, therefore this response can be ignored. + const url = new URL(this._resourcesContainer.getFlatList().nextRequest); + const urlSearchParams = new URLSearchParams(url.search); + const urlParams = {}; + for (const [snakeKey, value] of urlSearchParams.entries()) { + const key = osparc.utils.Utils.snakeToCamel(snakeKey); + urlParams[key] = value === "null" ? null : value; + } + const contextChanged = this.__didContextChange(urlParams); + if ( + !contextChanged && + osparc.utils.Utils.hasParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "offset") && + osparc.utils.Utils.hasParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "limit") + ) { + return { + offset: osparc.utils.Utils.getParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "offset"), + limit: osparc.utils.Utils.getParamFromURL(this._resourcesContainer.getFlatList().nextRequest, "limit") + }; + } } return null; }, From 55ef19b352be3e2a9efbc2754d797a52550cb0dd Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 15:26:52 +0200 Subject: [PATCH 08/10] minor --- .../client/source/class/osparc/dashboard/StudyBrowser.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index 17b059152da..d8482bf978a 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -227,9 +227,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { // The new call is on the way, therefore this response can be ignored. const contextChanged = this.__didContextChange(resp["params"]["url"]); if (contextChanged) { - if (this._resourcesContainer.getFlatList()) { - this._resourcesContainer.getFlatList().nextRequest = null; - } return; } From 68d560d5203903e79b2e52b5460bfb278920f46e Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 15:32:40 +0200 Subject: [PATCH 09/10] no tags yet --- .../source/class/osparc/dashboard/StudyBrowser.js | 11 ++--------- .../client/source/class/osparc/data/Resources.js | 3 ++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index d8482bf978a..d043de64c19 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -651,15 +651,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { requestParams.orderBy = JSON.stringify(this.getOrderBy()); const filterData = this._searchBarFilter.getFilterData(); - if (filterData.text || filterData.tags.length) { - requestParams.text = ""; - requestParams.tags = ""; - if (filterData.text) { - requestParams.text = encodeURIComponent(filterData.text); // name, description and uuid - } - if (filterData.tags.length) { - requestParams.tags = filterData.tags.join(","); - } + if (filterData.text) { + requestParams.text = encodeURIComponent(filterData.text); // name, description and uuid return requestParams; } diff --git a/services/static-webserver/client/source/class/osparc/data/Resources.js b/services/static-webserver/client/source/class/osparc/data/Resources.js index 1fbdd0caa1b..ac1cddbdda5 100644 --- a/services/static-webserver/client/source/class/osparc/data/Resources.js +++ b/services/static-webserver/client/source/class/osparc/data/Resources.js @@ -126,7 +126,8 @@ qx.Class.define("osparc.data.Resources", { getPageSearch: { useCache: false, method: "GET", - url: statics.API + "/projects:search?offset={offset}&limit={limit}&text={text}&tag_ids={tags}&order_by={orderBy}" + url: statics.API + "/projects:search?offset={offset}&limit={limit}&text={text}&order_by={orderBy}" + // url: statics.API + "/projects:search?offset={offset}&limit={limit}&text={text}&tags={tags}&order_by={orderBy}" }, getOne: { useCache: false, From 46210c4c9019779b60545cdc801856fd9ac07767 Mon Sep 17 00:00:00 2001 From: Odei Maiz Date: Wed, 16 Oct 2024 15:54:00 +0200 Subject: [PATCH 10/10] load folders after going back --- .../source/class/osparc/dashboard/ResourceBrowserBase.js | 4 ++-- .../client/source/class/osparc/dashboard/StudyBrowser.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js b/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js index 98b5b3122df..9082c3a5c2b 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js @@ -223,7 +223,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", { throw new Error("Abstract method called!"); }, - reloadResources: function() { + reloadMoreResources: function() { throw new Error("Abstract method called!"); }, @@ -432,7 +432,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", { _moreResourcesRequired: function() { if (this._resourcesContainer && this._resourcesContainer.areMoreResourcesRequired(this._loadingResourcesBtn)) { - this.reloadResources(); + this.reloadMoreResources(); } }, diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js index d043de64c19..c60730c757b 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js @@ -119,7 +119,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { const isStudyCreation = false; this._startStudyById(loadStudyId, null, cancelCB, isStudyCreation); } else { - this.__reloadFolders(); this.reloadResources(); } // "Starting..." page @@ -151,12 +150,17 @@ qx.Class.define("osparc.dashboard.StudyBrowser", { osparc.data.Permissions.getInstance().canDo("studies.user.read") && osparc.auth.Manager.getInstance().isLoggedIn() ) { + this.__reloadFolders(); this.__reloadStudies(); } else { this.__resetStudiesList(); } }, + reloadMoreResources: function() { + this.__reloadStudies(); + }, + __reloadWorkspaces: function() { this.__setWorkspacesToList([]); osparc.store.Workspaces.getInstance().fetchWorkspaces()