Skip to content

Commit 0473780

Browse files
authored
Merge branch 'master' into feature/listen-to-ports
2 parents 5b8305a + ee3ac42 commit 0473780

File tree

26 files changed

+313
-323
lines changed

26 files changed

+313
-323
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ help: ## help on rule's targets
128128

129129

130130
test_python_version: ## Check Python version, throw error if compilation would fail with the installed version
131-
@uv run ./scripts/test_python_version.py
131+
# Checking python version
132+
@.venv/bin/python ./scripts/test_python_version.py
132133

133134

134135
## DOCKER BUILD -------------------------------
@@ -482,7 +483,7 @@ push-version: tag-version
482483

483484
.venv: .check-uv-installed
484485
@uv venv $@
485-
## upgrading tools to latest version in $(shell python3 --version)
486+
@echo "# upgrading tools to latest version in" && $@/bin/python --version
486487
@uv pip --quiet install --upgrade \
487488
pip~=24.0 \
488489
wheel \

packages/models-library/src/models_library/api_schemas_dynamic_sidecar/ports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class OutputStatus(StrAutoEnum):
1111
UPLOAD_STARTED = auto()
1212
UPLOAD_WAS_ABORTED = auto()
1313
UPLOAD_FINISHED_SUCCESSFULLY = auto()
14-
UPLOAD_FINISHED_WITH_ERRROR = auto()
14+
UPLOAD_FINISHED_WITH_ERROR = auto()
1515

1616

1717
class InputStatus(StrAutoEnum):
1818
DOWNLOAD_STARTED = auto()
1919
DOWNLOAD_WAS_ABORTED = auto()
2020
DOWNLOAD_FINISHED_SUCCESSFULLY = auto()
21-
DOWNLOAD_FINISHED_WITH_ERRROR = auto()
21+
DOWNLOAD_FINISHED_WITH_ERROR = auto()
2222

2323

2424
class _PortStatusCommon(BaseModel):

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/notifications/_notifications_ports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def send_output_port_upload_finished_with_error(
5252
self, port_key: ServicePortKey
5353
) -> None:
5454
await self._send_output_port_status(
55-
port_key, OutputStatus.UPLOAD_FINISHED_WITH_ERRROR
55+
port_key, OutputStatus.UPLOAD_FINISHED_WITH_ERROR
5656
)
5757

5858
async def send_input_port_download_started(self, port_key: ServicePortKey) -> None:
@@ -74,5 +74,5 @@ async def send_input_port_download_finished_with_error(
7474
self, port_key: ServicePortKey
7575
) -> None:
7676
await self._send_input_port_status(
77-
port_key, InputStatus.DOWNLOAD_FINISHED_WITH_ERRROR
77+
port_key, InputStatus.DOWNLOAD_FINISHED_WITH_ERROR
7878
)

services/dynamic-sidecar/tests/unit/test_modules_notifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ async def test_notifier_send_input_port_status(
289289
await port_notifier.send_input_port_download_finished_succesfully(
290290
port_key
291291
)
292-
case InputStatus.DOWNLOAD_FINISHED_WITH_ERRROR:
292+
case InputStatus.DOWNLOAD_FINISHED_WITH_ERROR:
293293
await port_notifier.send_input_port_download_finished_with_error(
294294
port_key
295295
)
@@ -378,7 +378,7 @@ async def test_notifier_send_output_port_status(
378378
await port_notifier.send_output_port_upload_finished_successfully(
379379
port_key
380380
)
381-
case OutputStatus.UPLOAD_FINISHED_WITH_ERRROR:
381+
case OutputStatus.UPLOAD_FINISHED_WITH_ERROR:
382382
await port_notifier.send_output_port_upload_finished_with_error(
383383
port_key
384384
)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ qx.Class.define("osparc.dashboard.ContextBreadcrumbs", {
5252
__rebuild: function() {
5353
this._removeAll();
5454

55+
if (this.getCurrentWorkspaceId() === -2) {
56+
return;
57+
}
58+
5559
if (this.getCurrentFolderId()) {
5660
const currentFolder = osparc.store.Folders.getInstance().getFolder(this.getCurrentFolderId());
5761
this.__createUpstreamButtons(currentFolder);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ qx.Class.define("osparc.dashboard.Dashboard", {
138138
});
139139
const tabButton = tabPage.getChildControl("button");
140140
tabButton.set({
141-
minWidth: 50
141+
minWidth: 50,
142+
maxHeight: 36,
142143
});
143144
tabButton.ttt = label;
144145
tabButton.getChildControl("label").set({

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,10 @@ qx.Class.define("osparc.dashboard.FolderButtonBase", {
112112
},
113113

114114
_shouldApplyFilter: function(data) {
115-
console.log("_shouldApplyFilter", data);
116115
return false;
117116
},
118117

119118
_shouldReactToFilter: function(data) {
120-
console.log("_shouldReactToFilter", data);
121119
return false;
122120
}
123121
},

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
4242
const mainLayoutWithSideSpacers = new qx.ui.container.Composite(new qx.ui.layout.HBox(spacing))
4343
this._addToMainLayout(mainLayoutWithSideSpacers);
4444

45-
this.__leftFilters = new qx.ui.container.Composite(new qx.ui.layout.VBox(10)).set({
45+
this.__leftFilters = new qx.ui.container.Composite(new qx.ui.layout.VBox(15)).set({
4646
width: leftColumnWidth
4747
});
4848
mainLayoutWithSideSpacers.add(this.__leftFilters);
4949

50-
this.__centerLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
50+
this.__centerLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(15));
5151
mainLayoutWithSideSpacers.add(this.__centerLayout);
5252

53-
const rightColum = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
53+
const rightColum = new qx.ui.container.Composite(new qx.ui.layout.VBox());
5454
mainLayoutWithSideSpacers.add(rightColum, {
5555
flex: 1
5656
});
@@ -236,6 +236,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
236236
});
237237
const textField = searchBarFilter.getChildControl("text-field");
238238
osparc.utils.Utils.setIdToWidget(textField, "searchBarFilter-textField-"+this._resourceType);
239+
239240
this._addToLayout(searchBarFilter);
240241
},
241242

@@ -356,6 +357,15 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
356357
radioGroup.add(btn);
357358
});
358359

360+
if (this._resourceType === "study") {
361+
const viewMode = osparc.utils.Utils.localCache.getLocalStorageItem("studiesViewMode");
362+
if (viewMode) {
363+
if (viewMode === "list") {
364+
radioGroup.setSelection([listBtn]);
365+
}
366+
}
367+
}
368+
359369
this._toolbar.add(viewModeLayout);
360370
},
361371

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

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
3232
this.__resourcesList = [];
3333
this.__groupedContainersList = [];
3434

35-
const containerHeader = this.__containerHeader = new osparc.dashboard.ContextBreadcrumbs();
36-
this._add(containerHeader);
37-
containerHeader.setVisibility(osparc.utils.DisabledPlugins.isFoldersEnabled() ? "visible" : "excluded");
38-
3935

4036
const workspacesContainer = this.__workspacesContainer = new osparc.dashboard.ToggleButtonContainer();
4137
workspacesContainer.setVisibility(osparc.utils.DisabledPlugins.isFoldersEnabled() ? "visible" : "excluded");
@@ -64,7 +60,7 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
6460
init: "grid",
6561
nullable: false,
6662
event: "changeMode",
67-
apply: "reloadCards"
63+
apply: "__reloadCards"
6864
},
6965

7066
groupBy: {
@@ -117,8 +113,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
117113
__workspacesList: null,
118114
__resourcesList: null,
119115
__groupedContainersList: null,
120-
__foldersLayout: null,
121-
__containerHeader: null,
122116
__foldersContainer: null,
123117
__workspacesContainer: null,
124118
__nonGroupedContainer: null,
@@ -163,10 +157,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
163157
}
164158
},
165159

166-
getContainerHeader: function() {
167-
return this.__containerHeader;
168-
},
169-
170160
getFlatList: function() {
171161
return this.__nonGroupedContainer;
172162
},
@@ -233,7 +223,10 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
233223
position: "bottom-right"
234224
});
235225
card.setMenu(menu);
236-
card.subscribeToFilterGroup("searchBarFilter");
226+
if (resourceData.type !== "study") {
227+
// the backend will do the projects:search
228+
card.subscribeToFilterGroup("searchBarFilter");
229+
}
237230

238231
[
239232
"updateStudy",
@@ -284,6 +277,10 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
284277
this._removeAll();
285278
},
286279

280+
__reloadCards: function(mode) {
281+
this.reloadCards();
282+
},
283+
287284
__addFoldersContainer: function() {
288285
// add foldersContainer dynamically
289286
[
@@ -356,7 +353,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
356353

357354
reloadWorkspaces: function() {
358355
this.__cleanAll();
359-
this._add(this.__containerHeader);
360356
this._add(this.__workspacesContainer);
361357
let workspacesCards = [];
362358
this.__workspacesList.forEach(workspaceData => workspacesCards.push(this.__workspaceToCard(workspaceData)));
@@ -375,7 +371,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
375371

376372
__createWorkspaceCard: function(workspace) {
377373
const card = new osparc.dashboard.WorkspaceButtonItem(workspace);
378-
card.subscribeToFilterGroup("searchBarFilter");
379374
[
380375
"workspaceSelected",
381376
"workspaceUpdated",
@@ -411,7 +406,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
411406

412407
__createFolderCard: function(folder) {
413408
const card = new osparc.dashboard.FolderButtonItem(folder);
414-
card.subscribeToFilterGroup("searchBarFilter");
415409
[
416410
"folderSelected",
417411
"folderUpdated",

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
159159
this.__openResource();
160160
}
161161
})
162-
.catch(() => this.__openButton.setFetching(false));
162+
.catch(err => {
163+
console.error(err);
164+
osparc.FlashMessenger.logAs(err.message, "ERROR");
165+
this.__openButton.setFetching(false);
166+
});
163167
},
164168

165169
__confirmUpdate: function() {

0 commit comments

Comments
 (0)