Skip to content

Commit 11bc6b2

Browse files
committed
__showWhoIsIn
1 parent d0ed40f commit 11bc6b2

File tree

1 file changed

+18
-4
lines changed
  • services/static-webserver/client/source/class/osparc/dashboard

1 file changed

+18
-4
lines changed

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ qx.Class.define("osparc.dashboard.CardBase", {
457457
},
458458

459459
blocked: {
460-
check: [true, "UNKNOWN_SERVICES", "IN_USE", "IN_DEBT", false],
460+
// check: [true, "UNKNOWN_SERVICES", "IN_USE", "IN_DEBT", false],
461+
check: [true, "UNKNOWN_SERVICES", "IN_DEBT", false], // "IN_USE" is not a block anymore, it is just a status
461462
init: false,
462463
nullable: false,
463464
apply: "__applyBlocked"
@@ -772,9 +773,15 @@ qx.Class.define("osparc.dashboard.CardBase", {
772773
if ("locked" in state && "value" in state["locked"]) {
773774
lockInUse = state["locked"]["value"];
774775
}
775-
this.setBlocked(lockInUse ? "IN_USE" : false);
776-
if (lockInUse) {
777-
this.__showBlockedCardFromStatus("IN_USE", state["locked"]);
776+
if (osparc.utils.DisabledPlugins.isSimultaneousAccessEnabled()) {
777+
if (lockInUse && "locked" in state && "status" in state["locked"] && "OPENED" === state["locked"]["status"]) {
778+
this.__showWhoIsIn(state["locked"]["owner"]);
779+
}
780+
} else {
781+
this.setBlocked(lockInUse ? "IN_USE" : false);
782+
if (lockInUse) {
783+
this.__showBlockedCardFromStatus("IN_USE", state["locked"]);
784+
}
778785
}
779786

780787
const pipelineState = ("state" in state) ? state["state"]["value"] : undefined;
@@ -854,6 +861,13 @@ qx.Class.define("osparc.dashboard.CardBase", {
854861
});
855862
},
856863

864+
__showWhoIsIn: function(whoIsIn) {
865+
this.set({
866+
toolTipText: String(whoIsIn["user_id"])
867+
});
868+
},
869+
870+
857871
__showBlockedCardFromStatus: function(reason, moreInfo) {
858872
switch (reason) {
859873
case "IN_USE":

0 commit comments

Comments
 (0)