File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
services/static-webserver/client/source/class/osparc/workbench Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -210,16 +210,19 @@ qx.Class.define("osparc.workbench.ServiceCatalog", {
210210 osparc . filter . UIFilterController . getInstance ( ) . resetGroup ( "serviceCatalog" ) ;
211211 const filteredServices = [ ] ;
212212 this . __servicesLatest . forEach ( service => {
213- if ( this . __contextLeftNodeId === null && this . __contextRightNodeId === null ) {
214- filteredServices . push ( service ) ;
215- } else if ( service . inputs && service . outputs ) {
216- // filter out services that can't be connected
217- const needsInputs = this . __contextLeftNodeId !== null ;
218- const needsOutputs = this . __contextRightNodeId !== null ;
219- let connectable = needsInputs ? Boolean ( Object . keys ( service . inputs ) . length ) : true ;
220- connectable = connectable && ( needsOutputs ? Boolean ( Object . keys ( service . outputs ) . length ) : true ) ;
221- if ( connectable ) {
213+ // first check metadata is complete
214+ if ( service . inputs && service . outputs ) {
215+ if ( this . __contextLeftNodeId === null && this . __contextRightNodeId === null ) {
222216 filteredServices . push ( service ) ;
217+ } else {
218+ // filter out services that can't be connected
219+ const needsInputs = this . __contextLeftNodeId !== null ;
220+ const needsOutputs = this . __contextRightNodeId !== null ;
221+ let connectable = needsInputs ? Boolean ( Object . keys ( service . inputs ) . length ) : true ;
222+ connectable = connectable && ( needsOutputs ? Boolean ( Object . keys ( service . outputs ) . length ) : true ) ;
223+ if ( connectable ) {
224+ filteredServices . push ( service ) ;
225+ }
223226 }
224227 }
225228 } ) ;
You can’t perform that action at this time.
0 commit comments