Skip to content

Commit

Permalink
✨Frontend: Do not auto start TIP services (#5693)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Apr 19, 2024
1 parent 18ad294 commit 9d6af12
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
});
page.addToContent(servicesBootOpts);

if (osparc.utils.Resources.isStudy(resourceData)) {
if (osparc.utils.Resources.isStudy(resourceData) || osparc.utils.Resources.isTemplate(resourceData)) {
if (osparc.product.Utils.showDisableServiceAutoStart()) {
const study = new osparc.data.model.Study(resourceData);
const autoStartButton = osparc.info.StudyUtils.createDisableServiceAutoStart(study);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ qx.Class.define("osparc.desktop.SlideshowView", {
flex: 1
});
this.__nodeView = view;

// Automatically request to start the dynamic service when the user gets to this step
if (node.isDynamic()) {
node.requestStartNode();
}
}

const upstreamDependencies = this.__getUpstreamCompDependencies(node);
Expand Down Expand Up @@ -380,6 +385,12 @@ qx.Class.define("osparc.desktop.SlideshowView", {
} else {
this.__openFirstNode();
}

const node = this.__nodeView.getNode();
if (node.isDynamic()) {
// Start it. First wait a second because the function depends on the node's state which might not be available yet
setTimeout(() => node.requestStartNode(), 1000);
}
},

_applyStudy: function(study) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ qx.Class.define("osparc.product.Utils", {
},

showDisableServiceAutoStart: function() {
if (this.isProduct("s4llite") || this.isProduct("tis")) {
if (this.isProduct("s4llite")) {
return false;
}
return true;
Expand Down

0 comments on commit 9d6af12

Please sign in to comment.