Skip to content

Commit

Permalink
🎨 [Frontend] Show Integration version to owners (#6150)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Aug 8, 2024
1 parent e25c5e5 commit c4e4dc4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ qx.Class.define("osparc.info.MergedLarge", {
}
});

if (osparc.data.Permissions.getInstance().isTester()) {
if (osparc.data.Permissions.getInstance().isTester() || this.__canIWrite()) {
extraInfo.splice(i++, 0, {
label: this.tr("Service Integration Version"),
view: this.__createIntegrationVersion(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ qx.Class.define("osparc.info.ServiceLarge", {
}
});

if (osparc.data.Permissions.getInstance().isTester()) {
if (osparc.data.Permissions.getInstance().isTester() || osparc.service.Utils.canIWrite(this.getService()["accessRights"])) {
extraInfo.push({
label: this.tr("INTEGRATION VERSION"),
view: this.__createIntegrationVersion(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ qx.Class.define("osparc.metadata.ServicesInStudyUpdate", {
// updatable
osparc.service.Store.getService(latestCompatible["key"], latestCompatible["version"])
.then(latestMetadata => {
let label = node["key"] === latestMetadata["key"] ? "" : latestMetadata["name"];
label += ":" + osparc.service.Utils.extractVersionDisplay(latestMetadata);
let label = osparc.service.Utils.extractVersionDisplay(latestMetadata)
if (node["key"] !== latestMetadata["key"]) {
label = latestMetadata["name"] + ":" + label;
}
compatibleVersionLabel.setValue(label);
})
.catch(err => console.error(err));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ qx.Class.define("osparc.share.ShareePermissions", {
hBox.add(label);
osparc.service.Store.getService(inaccessibleService.key, inaccessibleService.version)
.then(metadata => {
label.setValue(metadata + " : " + metadata)
label.setValue(metadata["name"] + " : " + metadata["version"])
infoButton.addListener("execute", () => {
const resourceDetails = new osparc.dashboard.ResourceDetails(metadata);
osparc.dashboard.ResourceDetails.popUpInWindow(resourceDetails);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ qx.Class.define("osparc.widget.NodeOutputs", {
__populateGrid: function() {
this.__gridLayout.removeAll();

const outputs = this.getNode().getOutputs();
const ports = this.getPorts();
const portKeys = Object.keys(ports);
for (let i=0; i<portKeys.length; i++) {
Expand Down Expand Up @@ -131,7 +132,7 @@ qx.Class.define("osparc.widget.NodeOutputs", {
column: this.self().POS.ICON
});

const value = port.value || null;
const value = (portKey in outputs && "value" in outputs[portKey]) ? outputs[portKey]["value"] : null;
this.__valueToGrid(value, i);

const unit = new qx.ui.basic.Label(port.unitShort || "");
Expand Down

0 comments on commit c4e4dc4

Please sign in to comment.