File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ qx.Class.define("osparc.dashboard.AppBrowser", {
6767 } ) ;
6868 } ,
6969
70- reloadResources : function ( ) {
70+ reloadResources : function ( useCache = true ) {
7171 this . __loadServices ( ) ;
72- this . __loadHypertools ( ) ;
72+ this . __loadHypertools ( useCache ) ;
7373 } ,
7474
7575 __loadServices : function ( ) {
@@ -83,8 +83,8 @@ qx.Class.define("osparc.dashboard.AppBrowser", {
8383 } ) ;
8484 } ,
8585
86- __loadHypertools : function ( ) {
87- osparc . store . Templates . getHypertools ( )
86+ __loadHypertools : function ( useCache = true ) {
87+ osparc . store . Templates . getHypertools ( useCache )
8888 . then ( hypertoolsList => {
8989 hypertoolsList . forEach ( hypertool => hypertool [ "resourceType" ] = "hypertool" ) ;
9090 this . _resourcesList . push ( ...hypertoolsList . filter ( hypertool => hypertool !== null ) ) ;
Original file line number Diff line number Diff line change @@ -83,14 +83,9 @@ qx.Class.define("osparc.dashboard.TutorialBrowser", {
8383 __reloadTutorials : function ( useCache ) {
8484 this . __tasksToCards ( ) ;
8585
86- if ( useCache ) {
87- osparc . store . Templates . getTutorials ( )
88- . then ( tutorials => this . __setResourcesToList ( tutorials ) ) ;
89- } else {
9086 osparc . store . Templates . getTutorials ( useCache )
91- . then ( templates => this . __setResourcesToList ( templates ) )
87+ . then ( tutorials => this . __setResourcesToList ( tutorials ) )
9288 . catch ( ( ) => this . __setResourcesToList ( [ ] ) ) ;
93- }
9489 } ,
9590
9691 _updateTemplateData : function ( templateData ) {
@@ -105,6 +100,10 @@ qx.Class.define("osparc.dashboard.TutorialBrowser", {
105100 } ,
106101
107102 _reloadCards : function ( ) {
103+ if ( this . _resourcesContainer === null ) {
104+ return ;
105+ }
106+
108107 this . _resourcesContainer . setResourcesToList ( this . _resourcesList ) ;
109108 const cards = this . _resourcesContainer . reloadCards ( "templates" ) ;
110109 cards . forEach ( card => {
Original file line number Diff line number Diff line change @@ -261,11 +261,10 @@ qx.Class.define("osparc.desktop.MainPage", {
261261 osparc . store . Study . patchTemplateType ( templateData , templateType )
262262 . then ( ( ) => {
263263 if ( tutorialBrowser && templateType === osparc . data . model . StudyUI . TUTORIAL_TYPE ) {
264- tutorialBrowser . reloadResources ( ) ;
264+ tutorialBrowser . reloadResources ( false ) ;
265265 }
266266 if ( appBrowser && templateType === osparc . data . model . StudyUI . HYPERTOOL_TYPE ) {
267- // OM: reload hypertools only
268- appBrowser . reloadResources ( ) ;
267+ appBrowser . reloadResources ( false ) ;
269268 }
270269 } ) ;
271270 }
You can’t perform that action at this time.
0 commit comments