Skip to content

Commit fc478c4

Browse files
authored
Merge branch 'master' into mai/repo-helpers
2 parents 08cf3e7 + a0887c2 commit fc478c4

File tree

20 files changed

+542
-544
lines changed

20 files changed

+542
-544
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/playwright.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ def __call__(self, message: str) -> None:
196196
class SocketIONodeProgressCompleteWaiter:
197197
node_id: str
198198
logger: logging.Logger
199-
_last_call_return: bool = False
200199
_current_progress: dict[NodeProgressType, float] = field(
201200
default_factory=defaultdict
202201
)
@@ -224,24 +223,24 @@ def __call__(self, message: str) -> bool:
224223
self._current_progress[
225224
node_progress_event.progress_type
226225
] = new_progress
226+
227227
self.logger.info(
228-
"current startup progress: %s",
228+
"Current startup progress [expected number of node-progress-types=%d]: %s",
229+
len(NodeProgressType.required_types_for_started_service()),
229230
f"{json.dumps({k:round(v,1) for k,v in self._current_progress.items()})}",
230231
)
231232

232-
self._last_call_return = all(
233-
progress_type in self._current_progress
234-
for progress_type in NodeProgressType.required_types_for_started_service()
235-
) and all(
233+
return self.got_expected_node_progress_types() and all(
236234
round(progress, 1) == 1.0
237235
for progress in self._current_progress.values()
238236
)
239-
return self._last_call_return
240-
self._last_call_return = False
241237
return False
242238

243-
def get_last_call_return(self):
244-
return self._last_call_return
239+
def got_expected_node_progress_types(self):
240+
return all(
241+
progress_type in self._current_progress
242+
for progress_type in NodeProgressType.required_types_for_started_service()
243+
)
245244

246245
def get_current_progress(self):
247246
return self._current_progress.values()
@@ -339,16 +338,17 @@ def expected_service_running(
339338
service_running = ServiceRunning(iframe_locator=None)
340339

341340
try:
341+
342342
with websocket.expect_event("framereceived", waiter, timeout=timeout):
343343
if press_start_button:
344344
_trigger_service_start(page, node_id)
345345

346346
yield service_running
347347

348348
except PlaywrightTimeoutError:
349-
if waiter.get_last_call_return() is False:
349+
if waiter.got_expected_node_progress_types():
350350
ctx.logger.warning(
351-
"⚠️ Progress bar didn't receive 100 percent: %s ⚠️", # https://github.com/ITISFoundation/osparc-simcore/issues/6449
351+
"⚠️ Progress bar didn't receive 100 percent but all expected node-progress-types are in place: %s ⚠️", # https://github.com/ITISFoundation/osparc-simcore/issues/6449
352352
waiter.get_current_progress(),
353353
)
354354
else:

services/static-webserver/client/source/class/osparc/Application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ qx.Class.define("osparc.Application", {
301301

302302
__setDefaultIcons: function() {
303303
const {productName} = this.__getProductMetaData()
304-
const resourcePath = `../resource/osparc/${productName}/icons`;
304+
const resourcePath = `../resource/osparc/${productName}/icons/`;
305305
const favIconUrls = [
306306
"favicon-16x16.png",
307307
"favicon-32x32.png",

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
425425
break;
426426
case "service":
427427
uuid = resourceData.key ? resourceData.key : null;
428-
owner = resourceData.owner ? resourceData.owner : "";
428+
owner = resourceData.owner ? resourceData.owner : resourceData.contact;
429429
defaultHits = 0;
430430
break;
431431
}
@@ -730,7 +730,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
730730
}
731731

732732
this._getChildren().forEach(item => {
733-
if (item) {
733+
if (item && "setOpacity" in item) {
734734
item.setOpacity(enabled ? 1.0 : 0.7);
735735
}
736736
});
@@ -784,13 +784,9 @@ qx.Class.define("osparc.dashboard.CardBase", {
784784
if (billingSettingsButton) {
785785
billingSettingsButton.setEnabled(osparc.study.Utils.canShowBillingOptions(resourceData));
786786
}
787-
const moveToFolderButton = menuButtons.find(menuBtn => "moveToFolderButton" in menuBtn);
788-
if (moveToFolderButton) {
789-
moveToFolderButton.setEnabled(osparc.study.Utils.canMoveToFolder(resourceData));
790-
}
791-
const moveToWorkspaceButton = menuButtons.find(menuBtn => "moveToWorkspaceButton" in menuBtn);
792-
if (moveToWorkspaceButton) {
793-
moveToWorkspaceButton.setEnabled(osparc.study.Utils.canMoveToWorkspace(resourceData));
787+
const moveToButton = menuButtons.find(menuBtn => "moveToButton" in menuBtn);
788+
if (moveToButton) {
789+
moveToButton.setEnabled(osparc.study.Utils.canMoveTo(resourceData));
794790
}
795791
const deleteButton = menuButtons.find(menuBtn => "deleteButton" in menuBtn);
796792
if (deleteButton) {

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
4545
events: {
4646
"folderSelected": "qx.event.type.Data",
4747
"folderUpdated": "qx.event.type.Data",
48-
"moveFolderToFolderRequested": "qx.event.type.Data",
49-
"moveFolderToWorkspaceRequested": "qx.event.type.Data",
48+
"moveFolderToRequested": "qx.event.type.Data",
5049
"deleteFolderRequested": "qx.event.type.Data"
5150
},
5251

@@ -191,13 +190,9 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
191190
editButton.addListener("execute", () => this.__editFolder(), this);
192191
menu.add(editButton);
193192

194-
const moveToFolderButton = new qx.ui.menu.Button(this.tr("Move to Folder..."), "@FontAwesome5Solid/folder/12");
195-
moveToFolderButton.addListener("execute", () => this.fireDataEvent("moveFolderToFolderRequested", this.getFolderId()), this);
196-
menu.add(moveToFolderButton);
197-
198-
const moveToWorkspaceButton = new qx.ui.menu.Button(this.tr("Move to Workspace..."), osparc.store.Workspaces.iconPath(14));
199-
moveToWorkspaceButton.addListener("execute", () => this.fireDataEvent("moveFolderToWorkspaceRequested", this.getFolderId()), this);
200-
menu.add(moveToWorkspaceButton);
193+
const moveToButton = new qx.ui.menu.Button(this.tr("Move to..."), "@FontAwesome5Solid/folder/12");
194+
moveToButton.addListener("execute", () => this.fireDataEvent("moveFolderToRequested", this.getFolderId()), this);
195+
menu.add(moveToButton);
201196

202197
menu.addSeparator();
203198

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
224224
}
225225
},
226226

227-
createOwner: function(label) {
227+
__createOwner: function(label) {
228228
if (label === osparc.auth.Data.getInstance().getEmail()) {
229229
const resourceAlias = osparc.utils.Utils.resourceTypeToAlias(this.getResourceType());
230230
return qx.locale.Manager.tr(`My ${resourceAlias}`);
@@ -235,7 +235,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
235235
// overridden
236236
_applyOwner: function(value, old) {
237237
const label = this.getChildControl("subtitle-text");
238-
const user = this.createOwner(value);
238+
const user = this.__createOwner(value);
239239
label.setValue(user);
240240
label.setVisibility(value ? "visible" : "excluded");
241241
},

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,21 @@ qx.Class.define("osparc.dashboard.GridButtonLoadMore", {
2929

3030
this._applyFetching(false);
3131

32+
// A minimalistic spinning wheel
33+
this.getChildControl("header").exclude();
3234
this.getChildControl("footer").exclude();
35+
this.set({
36+
backgroundColor: "transparent"
37+
});
3338
},
3439

3540
members: {
3641
_applyFetching: function(value) {
37-
const title = this.getChildControl("title");
38-
const desc = this.getChildControl("subtitle-text");
3942
this.setIcon(osparc.dashboard.CardBase.LOADING_ICON);
4043
if (value) {
41-
title.setValue(this.tr("Loading..."));
42-
desc.setValue("");
4344
this.getChildControl("icon").getChildControl("image").getContentElement()
4445
.addClass("rotate");
4546
} else {
46-
title.setValue(this.tr("Load More"));
47-
desc.setValue(this.tr("Click to load more").toString());
4847
this.getChildControl("icon").getChildControl("image").getContentElement()
4948
.removeClass("rotate");
5049
}

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

Lines changed: 31 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -28,50 +28,46 @@ qx.Class.define("osparc.dashboard.ListButtonBase", {
2828
construct: function() {
2929
this.base(arguments);
3030
this.set({
31-
width: osparc.dashboard.ListButtonBase.ITEM_WIDTH,
3231
minHeight: osparc.dashboard.ListButtonBase.ITEM_HEIGHT,
3332
allowGrowX: true
3433
});
3534

3635
const layout = new qx.ui.layout.Grid();
3736
layout.setSpacing(10);
38-
layout.setColumnFlex(osparc.dashboard.ListButtonBase.POS.DESCRIPTION, 1);
37+
layout.setColumnFlex(osparc.dashboard.ListButtonBase.POS.SPACER, 1);
3938
this._setLayout(layout);
39+
40+
this.getChildControl("spacer");
4041
},
4142

4243
statics: {
43-
ITEM_WIDTH: 600,
44-
ITEM_HEIGHT: 40,
44+
ITEM_HEIGHT: 35,
4545
SPACING: 5,
4646
POS: {
4747
THUMBNAIL: 0,
4848
LOCK_STATUS: 1,
4949
TITLE: 2,
50-
PROGRESS: 3,
51-
DESCRIPTION: 4,
50+
SPACER: 3,
51+
PROGRESS: 4,
5252
TAGS: 5,
53-
UPDATES: 6,
54-
UI_MODE: 7,
55-
STATUS: 8,
56-
PERMISSION: 9,
53+
ICONS_LAYOUT: 6,
54+
SHARED: 7,
55+
OWNER: 8,
56+
LAST_CHANGE: 9,
5757
TSR: 10,
58-
OWNER: 11,
59-
SHARED: 12,
60-
LAST_CHANGE: 13,
61-
HITS: 14,
62-
OPTIONS: 15
58+
HITS: 11,
59+
OPTIONS: 12
6360
}
6461
},
6562

6663
members: {
6764
_createChildControlImpl: function(id) {
6865
let control;
69-
let titleRow;
7066
switch (id) {
7167
case "icon": {
72-
control = new osparc.ui.basic.Thumbnail(null, 40, this.self().ITEM_HEIGHT-2*5).set({
73-
minHeight: 40,
74-
minWidth: 40
68+
control = new osparc.ui.basic.Thumbnail(null, this.self().ITEM_HEIGHT, this.self().ITEM_HEIGHT-2*5).set({
69+
minHeight: this.self().ITEM_HEIGHT,
70+
minWidth: this.self().ITEM_HEIGHT
7571
});
7672
control.getChildControl("image").set({
7773
anonymous: true,
@@ -83,43 +79,24 @@ qx.Class.define("osparc.dashboard.ListButtonBase", {
8379
});
8480
break;
8581
}
86-
case "title-row":
87-
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(6)).set({
88-
anonymous: true,
89-
allowGrowX: true
90-
});
91-
this._add(control, {
92-
row: 0,
93-
column: osparc.dashboard.ListButtonBase.POS.TITLE
94-
});
95-
break;
9682
case "title":
9783
control = new qx.ui.basic.Label().set({
9884
textColor: "contrasted-text-light",
9985
font: "text-14",
10086
alignY: "middle",
10187
maxWidth: 300,
102-
allowGrowX: true,
10388
rich: true,
10489
});
105-
titleRow = this.getChildControl("title-row");
106-
titleRow.addAt(control, 0, {
107-
flex: 1
90+
this._add(control, {
91+
row: 0,
92+
column: osparc.dashboard.ListButtonBase.POS.TITLE
10893
});
10994
break;
110-
case "description":
111-
control = new qx.ui.basic.Label().set({
112-
textColor: "contrasted-text-dark",
113-
rich: true,
114-
maxHeight: 16,
115-
minWidth: 100,
116-
font: "text-14",
117-
alignY: "middle",
118-
allowGrowX: true
119-
});
95+
case "spacer":
96+
control = new qx.ui.core.Spacer();
12097
this._add(control, {
12198
row: 0,
122-
column: osparc.dashboard.ListButtonBase.POS.DESCRIPTION
99+
column: osparc.dashboard.ListButtonBase.POS.SPACER
123100
});
124101
break;
125102
case "owner":
@@ -134,17 +111,23 @@ qx.Class.define("osparc.dashboard.ListButtonBase", {
134111
column: osparc.dashboard.ListButtonBase.POS.OWNER
135112
});
136113
break;
114+
case "icons-layout":
115+
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(10).set({
116+
alignY: "middle"
117+
}))
118+
this._add(control, {
119+
row: 0,
120+
column: osparc.dashboard.ListButtonBase.POS.ICONS_LAYOUT
121+
});
122+
break;
137123
case "project-status":
138124
control = new qx.ui.basic.Image().set({
139125
alignY: "middle",
140126
textColor: "status_icon",
141127
height: 12,
142128
width: 12
143129
});
144-
this._add(control, {
145-
row: 0,
146-
column: osparc.dashboard.ListButtonBase.POS.STATUS
147-
});
130+
this.getChildControl("icons-layout").add(control);
148131
break;
149132
}
150133
return control || this.base(arguments, id);

0 commit comments

Comments
 (0)