File tree Expand file tree Collapse file tree 2 files changed +72
-0
lines changed
services/static-webserver/client/source/class/osparc/data/model Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ /* ************************************************************************
2+
3+ osparc - the simcore frontend
4+
5+ https://osparc.io
6+
7+ Copyright:
8+ 2025 IT'IS Foundation, https://itis.swiss
9+
10+ License:
11+ MIT: https://opensource.org/licenses/MIT
12+
13+ Authors:
14+ * Odei Maiz (odeimaiz)
15+
16+ ************************************************************************ */
17+
18+ qx . Class . define ( "osparc.data.model.NodeLockState" , {
19+ extend : qx . core . Object ,
20+
21+ construct : function ( lockState ) {
22+ this . base ( arguments ) ;
23+
24+ this . set ( {
25+ currentUserGroupIds : lockState [ "current_user_groupids" ] || [ ] ,
26+ locked : lockState [ "locked" ] || false ,
27+ status : lockState [ "status" ] || "NOT_STARTED" ,
28+ } ) ;
29+ } ,
30+
31+ properties : {
32+ currentUserGroupIds : {
33+ check : "Array" ,
34+ init : [ ] ,
35+ nullable : false ,
36+ apply : "__currentUserGroupIds" ,
37+ } ,
38+
39+ locked : {
40+ check : "Boolean" ,
41+ init : false ,
42+ nullable : false ,
43+ event : "changeLocked" ,
44+ } ,
45+
46+ status : {
47+ check : [ "NOT_STARTED" , "STARTED" , "OPENED" ] ,
48+ init : false ,
49+ nullable : false ,
50+ event : "changeStatus" ,
51+ }
52+ } ,
53+
54+ members : {
55+ __currentUserGroupIds : function ( currentUserGroupIds ) {
56+ console . log ( currentUserGroupIds ) ;
57+ } ,
58+ }
59+ } ) ;
Original file line number Diff line number Diff line change @@ -93,6 +93,13 @@ qx.Class.define("osparc.data.model.NodeStatus", {
9393 hasOutputs : {
9494 check : "Boolean" ,
9595 init : false
96+ } ,
97+
98+ lockState : {
99+ check : "osparc.data.model.NodeLockState" ,
100+ nullable : true ,
101+ init : "unlocked" ,
102+ event : "changeLockState"
96103 }
97104 } ,
98105
@@ -143,6 +150,9 @@ qx.Class.define("osparc.data.model.NodeStatus", {
143150 if ( node . isDynamic ( ) ) {
144151 const progressSequence = new osparc . data . model . NodeProgressSequence ( ) ;
145152 this . setProgressSequence ( progressSequence ) ;
153+
154+ const lockState = new osparc . data . model . NodeLockState ( ) ;
155+ this . setLockState ( lockState ) ;
146156 }
147157 } ;
148158
@@ -217,6 +227,9 @@ qx.Class.define("osparc.data.model.NodeStatus", {
217227 this . setModified ( null ) ;
218228 }
219229 }
230+ if ( "lock_state" in state ) {
231+ this . setLockState ( state . lock_state ) ;
232+ }
220233 } ,
221234
222235 serialize : function ( ) {
You can’t perform that action at this time.
0 commit comments