Skip to content

✨ Frontend: Study home page #4360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4633a3b
refactoring
odeimaiz May 17, 2023
fb9e2e1
Merge remote-tracking branch 'upstream/master'
odeimaiz May 30, 2023
1a1e0e2
git push
odeimaiz May 30, 2023
71adf15
Merge remote-tracking branch 'upstream/master'
odeimaiz May 31, 2023
c405562
Merge remote-tracking branch 'upstream/master'
odeimaiz May 31, 2023
6f93f8b
Merge remote-tracking branch 'upstream/master'
odeimaiz May 31, 2023
feacc0e
Merge remote-tracking branch 'upstream/master'
odeimaiz Jun 1, 2023
f536119
Merge remote-tracking branch 'upstream/master'
odeimaiz Jun 2, 2023
02e69c1
git push
odeimaiz Jun 5, 2023
954ddf2
Merge remote-tracking branch 'upstream/master'
odeimaiz Jun 6, 2023
1bc4b28
Merge remote-tracking branch 'upstream/master'
odeimaiz Jun 6, 2023
5c6fdb3
Merge remote-tracking branch 'upstream/master'
odeimaiz Jun 13, 2023
a2f4db7
refactoring
odeimaiz Jun 13, 2023
41e7ab6
Open button on the top right
odeimaiz Jun 13, 2023
3c8e837
aesthetics
odeimaiz Jun 13, 2023
727a238
open from home page
odeimaiz Jun 13, 2023
0abec66
unused
odeimaiz Jun 14, 2023
48f0341
item click open detils view
odeimaiz Jun 14, 2023
c6a81ac
label on toolbar
odeimaiz Jun 14, 2023
bc2e6af
minor
odeimaiz Jun 14, 2023
f0f9c9a
minor fix
odeimaiz Jun 14, 2023
a7a8881
"Export" -> "Export cMIS"
odeimaiz Jun 14, 2023
d328e9f
passwordLengthValidator 12
odeimaiz Jun 14, 2023
3bcbb89
getOpenMenuButton
odeimaiz Jun 14, 2023
87d1530
minor
odeimaiz Jun 14, 2023
4eb02de
Merge branch 'master' into feature/study-home-page
odeimaiz Jun 14, 2023
f0daad7
minors
odeimaiz Jun 14, 2023
750addf
Merge branch 'master' into feature/study-home-page
odeimaiz Jun 14, 2023
5e4246c
minor
odeimaiz Jun 14, 2023
ddf9cc6
Merge branch 'feature/study-home-page' of github.com:odeimaiz/osparc-…
odeimaiz Jun 14, 2023
66fcdd5
Merge branch 'master' into feature/study-home-page
odeimaiz Jun 15, 2023
fffee9a
fix e2e
odeimaiz Jun 15, 2023
9f6e8a4
Merge branch 'feature/study-home-page' of github.com:odeimaiz/osparc-…
odeimaiz Jun 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ qx.Class.define("osparc.auth.core.Utils", {

statics: {
passwordLengthValidator: function(value, item) {
const valid = value != null && value.length > 3;
const valid = value != null && value.length > 11;
if (!valid) {
item.setInvalidMessage("Please enter a password at with least 4 characters.");
item.setInvalidMessage("Please enter a password at with least 12 characters.");
}
return valid;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,7 @@ qx.Class.define("osparc.component.notification.NotificationUI", {
const studyDataCopy = osparc.data.model.Study.deepCloneStudyObject(studyData);
studyDataCopy["resourceType"] = notification.getCategory() === "STUDY_SHARED" ? "study" : "template";
const moreOpts = new osparc.dashboard.ResourceMoreOptions(studyData);
const title = this.tr("Options");
osparc.ui.window.Window.popUpInWindow(
moreOpts,
title,
osparc.dashboard.ResourceMoreOptions.WIDTH,
osparc.dashboard.ResourceMoreOptions.HEIGHT
);
osparc.dashboard.ResourceMoreOptions.popUpInWindow(moreOpts);
}
});
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ qx.Class.define("osparc.component.share.ShareePermissions", {
infoButton.setAppearance("strong-button");
infoButton.addListener("execute", () => {
const moreOpts = new osparc.dashboard.ResourceMoreOptions(metaData);
const title = this.tr("Service Info");
osparc.ui.window.Window.popUpInWindow(
moreOpts,
title,
osparc.dashboard.ResourceMoreOptions.WIDTH,
osparc.dashboard.ResourceMoreOptions.HEIGHT
);
osparc.dashboard.ResourceMoreOptions.popUpInWindow(moreOpts);
}, this);
hBox.add(infoButton);
hBox.add(new qx.ui.basic.Label(metaData.name + " : " + metaData.version));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
__openMoreOptions: function() {
const resourceData = this.getResourceData();
const moreOpts = new osparc.dashboard.ResourceMoreOptions(resourceData);
const title = this.tr("Options");
const win = osparc.ui.window.Window.popUpInWindow(
moreOpts,
title,
osparc.dashboard.ResourceMoreOptions.WIDTH,
osparc.dashboard.ResourceMoreOptions.HEIGHT
);
const win = osparc.dashboard.ResourceMoreOptions.popUpInWindow(moreOpts);
[
"updateStudy",
"updateTemplate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
},

statics: {
PAGINATED_STUDIES: 10,

sortStudyList: function(studyList) {
const sortByProperty = function(prop) {
return function(a, b) {
Expand Down Expand Up @@ -91,9 +93,7 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
osparc.utils.Utils.addBorderRightRadius(rButton);
}
return rButton;
},

PAGINATED_STUDIES: 10
}
},

members: {
Expand Down Expand Up @@ -302,6 +302,14 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
throw new Error("Abstract method called!");
},

_startStudyById: function() {
throw new Error("Abstract method called!");
},

_createStudyFromTemplate: function() {
throw new Error("Abstract method called!");
},

_createStudyFromService: function() {
throw new Error("Abstract method called!");
},
Expand All @@ -310,32 +318,50 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
throw new Error("Abstract method called!");
},

_getMoreOptionsMenuButton: function(resourceData) {
const moreOptsButton = new qx.ui.menu.Button(this.tr("More options..."));
osparc.utils.Utils.setIdToWidget(moreOptsButton, "moreInfoBtn");
moreOptsButton.addListener("execute", () => {
const moreOpts = new osparc.dashboard.ResourceMoreOptions(resourceData);
const title = this.tr("Options");
const win = osparc.ui.window.Window.popUpInWindow(
moreOpts,
title,
osparc.dashboard.ResourceMoreOptions.WIDTH,
osparc.dashboard.ResourceMoreOptions.HEIGHT
);
moreOpts.addListener("updateStudy", e => this._updateStudyData(e.getData()));
moreOpts.addListener("updateTemplate", e => this._updateTemplateData(e.getData()));
moreOpts.addListener("updateService", e => this._updateServiceData(e.getData()));
moreOpts.addListener("publishTemplate", e => {
win.close();
this.fireDataEvent("publishTemplate", e.getData());
});
moreOpts.addListener("openService", e => {
win.close();
const openServiceData = e.getData();
this._createStudyFromService(openServiceData["key"], openServiceData["version"]);
});
_getOpenMenuButton: function(resourceData) {
const openButton = new qx.ui.menu.Button(this.tr("Open"));
openButton.addListener("execute", () => {
switch (resourceData["resourceType"]) {
case "study":
this._startStudyById(resourceData["uuid"]);
break;
case "template":
this._createStudyFromTemplate(resourceData);
break;
case "service":
this._createStudyFromService(resourceData["key"], resourceData["version"]);
break;
}
}, this);
return moreOptsButton;
return openButton;
},

_openDetailsView: function(resourceData) {
const moreOpts = new osparc.dashboard.ResourceMoreOptions(resourceData);
const win = osparc.dashboard.ResourceMoreOptions.popUpInWindow(moreOpts);
moreOpts.addListener("updateStudy", e => this._updateStudyData(e.getData()));
moreOpts.addListener("updateTemplate", e => this._updateTemplateData(e.getData()));
moreOpts.addListener("updateService", e => this._updateServiceData(e.getData()));
moreOpts.addListener("publishTemplate", e => {
win.close();
this.fireDataEvent("publishTemplate", e.getData());
});
moreOpts.addListener("openStudy", e => {
win.close();
const openStudyData = e.getData();
this._startStudyById(openStudyData["uuid"]);
});
moreOpts.addListener("openTemplate", e => {
win.close();
const templateData = e.getData();
this._createStudyFromTemplate(templateData);
});
moreOpts.addListener("openService", e => {
win.close();
const openServiceData = e.getData();
this._createStudyFromService(openServiceData["key"], openServiceData["version"]);
});
return moreOpts;
},

_getShareMenuButton: function(card) {
Expand Down
Loading