Skip to content
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

🎨 [Frontend] S4L and S4L lite: Include deprecated versions in plus button, they should all be updatable to a non deprecated one #6480

Merged
Merged
Changes from 3 commits
Commits
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 @@ -837,14 +837,20 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
});
},

// Used in S4L products
__addNewStudyFromServiceButtons: function(key, newButtonInfo) {
const versions = osparc.service.Utils.getVersions(key);
// Include deprecated versions, they should all be updatable to a non deprecated version
const versions = osparc.service.Utils.getVersions(key, false);
if (versions.length && newButtonInfo) {
// scale to latest compatible
const latestVersion = versions[0];
const latestCompatible = osparc.service.Utils.getLatestCompatible(key, latestVersion);
osparc.store.Services.getService(latestCompatible["key"], latestCompatible["version"])
.then(latestMetadata => {
// make sure this one is not deprecated
if (osparc.service.Utils.isDeprecated(latestMetadata)) {
return;
}
const title = newButtonInfo.title + " " + osparc.service.Utils.extractVersionDisplay(latestMetadata);
const desc = newButtonInfo.description;
const mode = this._resourcesContainer.getMode();
Expand Down Expand Up @@ -1687,8 +1693,9 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
},

__createConfirmWindow: function(studyNames) {
const rUSure = this.tr("Are you sure you want to delete ");
const msg = studyNames.length > 1 ? rUSure + studyNames.length + this.tr(" studies?") : rUSure + "<b>" + studyNames[0] + "</b>?";
const rUSure = this.tr("Are you sure you want to delete");
const studiesText = osparc.product.Utils.getStudyAlias({plural: true});
const msg = rUSure + (studyNames.length > 1 ? ` ${studyNames.length} ${studiesText} ?` : ` <b>${studyNames[0]}</b>?`)
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
confirmText: this.tr("Delete"),
confirmAction: "delete"
Expand Down
Loading