File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
services/static-webserver/client/source/class/osparc/viewer Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ qx.Class.define("osparc.viewer.NodeViewer", {
107107 __attachSocketEventHandlers : function ( ) {
108108 this . __listenToNodeUpdated ( ) ;
109109 this . __listenToNodeProgress ( ) ;
110+ this . __listenToServiceStatus ( ) ;
110111 } ,
111112
112113 __listenToNodeUpdated : function ( ) {
@@ -127,6 +128,26 @@ qx.Class.define("osparc.viewer.NodeViewer", {
127128 this . getStudy ( ) . nodeNodeProgressSequence ( data ) ;
128129 } , this ) ;
129130 }
131+ } ,
132+
133+ __listenToServiceStatus : function ( ) {
134+ const socket = osparc . wrapper . WebSocket . getInstance ( ) ;
135+
136+ // callback for events
137+ if ( ! socket . slotExists ( "serviceStatus" ) ) {
138+ socket . on ( "serviceStatus" , data => {
139+ const nodeId = data [ "service_uuid" ] ;
140+ const workbench = this . getStudy ( ) . getWorkbench ( ) ;
141+ const node = workbench . getNode ( nodeId ) ;
142+ if ( node ) {
143+ if ( node . getIframeHandler ( ) ) {
144+ node . getIframeHandler ( ) . onNodeState ( data ) ;
145+ }
146+ } else if ( osparc . data . Permissions . getInstance ( ) . isTester ( ) ) {
147+ console . log ( "Ignored ws 'progress' msg" , data ) ;
148+ }
149+ } , this ) ;
150+ }
130151 }
131152 }
132153} ) ;
You can’t perform that action at this time.
0 commit comments