File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
services/static-webserver/client/source/class/osparc/store Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,21 @@ qx.Class.define("osparc.store.Products", {
3434 } ) ;
3535 }
3636
37- return osparc . data . Resources . fetch ( "productMetadata" , "getUiConfig" )
38- . then ( uiConfig => {
39- const product = osparc . product . Utils . getProductName ( )
40- if ( product in uiConfig ) {
41- this . __uiConfig = uiConfig [ product ] ;
37+ return Promise . all ( [
38+ osparc . data . Resources . fetch ( "productMetadata" , "getUiConfig" ) ,
39+ osparc . utils . Utils . fetchJSON ( "/resource/osparc/ui_config.json" ) ,
40+ ] )
41+ . then ( values => {
42+ let uiConfig = { } ;
43+ if ( values [ 0 ] && values [ 0 ] [ "ui" ] && Object . keys ( values [ 0 ] [ "ui" ] ) . length ) {
44+ uiConfig = values [ 0 ] [ "ui" ] ;
45+ } else {
46+ const product = osparc . product . Utils . getProductName ( ) ;
47+ if ( values [ 1 ] && product in values [ 1 ] ) {
48+ uiConfig = values [ 1 ] [ product ] ;
49+ }
4250 }
51+ this . __uiConfig = uiConfig ;
4352 return this . __uiConfig ;
4453 } )
4554 . catch ( console . error ) ;
You can’t perform that action at this time.
0 commit comments