Skip to content

Commit a0b4159

Browse files
committed
pass text to search query
1 parent f21da80 commit a0b4159

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
180180
this.__loadingFolders = true;
181181
let request = null;
182182
switch (this.getCurrentContext()) {
183-
case "search":
184-
request = osparc.store.Folders.getInstance().searchFolders(this.getOrderBy());
183+
case "search": {
184+
const filterData = this._searchBarFilter.getFilterData();
185+
const text = filterData.text ? encodeURIComponent(filterData.text) : ""; // name, description and uuid
186+
request = osparc.store.Folders.getInstance().searchFolders(this.getOrderBy(), text);
185187
break;
188+
}
186189
case "studiesAndFolders": {
187190
const workspaceId = this.getCurrentWorkspaceId();
188191
const folderId = this.getCurrentFolderId();

services/static-webserver/client/source/class/osparc/data/Resources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ qx.Class.define("osparc.data.Resources", {
304304
getPageSearch: {
305305
useCache: false,
306306
method: "GET",
307-
url: statics.API + "/folders:search?offset={offset}&limit={limit}&text={text}&order_by={orderBy}"
307+
url: statics.API + "/folders:search?offset={offset}&limit={limit}&filters={filters}&order_by={orderBy}"
308308
},
309309
getOne: {
310310
method: "GET",

services/static-webserver/client/source/class/osparc/store/Folders.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ qx.Class.define("osparc.store.Folders", {
7979
},
8080

8181
searchFolders: function(
82+
text,
8283
orderBy = {
8384
field: "modified_at",
8485
direction: "desc"
@@ -93,6 +94,7 @@ qx.Class.define("osparc.store.Folders", {
9394
const curatedOrderBy = this.self().curateOrderBy(orderBy);
9495
const params = {
9596
url: {
97+
text,
9698
orderBy: JSON.stringify(curatedOrderBy),
9799
}
98100
};

0 commit comments

Comments
 (0)