@@ -337,7 +337,6 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
337337 [
338338 this . __getInfoPage ,
339339 this . __getBillingPage ,
340- this . __getActivityOverviewPage ,
341340 this . __getServicesUpdatePage ,
342341 this . __getServicesBootOptionsPage ,
343342 this . __getConversationsPage ,
@@ -357,27 +356,9 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
357356 }
358357 } ) ;
359358
360- const resourceData = this . __resourceData ;
361- if ( ! osparc . utils . Resources . isService ( resourceData ) ) {
362- const title = osparc . product . Utils . getStudyAlias ( { firstUpperCase : true } ) + this . tr ( " Files..." ) ;
363- const iconSrc = "@FontAwesome5Solid/file/22" ;
364- const dataAccess = new qx . ui . basic . Atom ( ) . set ( {
365- label : title ,
366- icon : iconSrc ,
367- font : "text-14" ,
368- padding : 8 ,
369- paddingLeft : 12 ,
370- gap : 14 ,
371- cursor : "pointer" ,
372- } ) ;
373- dataAccess . addListener ( "tap" , ( ) => osparc . widget . StudyDataManager . popUpInWindow ( resourceData [ "uuid" ] ) ) ;
374- this . addWidgetToTabs ( dataAccess ) ;
375359
376- if ( resourceData [ "resourceType" ] === "study" ) {
377- const canShowData = osparc . study . Utils . canShowStudyData ( resourceData ) ;
378- dataAccess . setEnabled ( canShowData ) ;
379- }
380- }
360+ this . __getActivityOverviewPopUp ( ) ;
361+ this . __getProjectFilesPopUp ( ) ;
381362
382363 if ( selectedTabId ) {
383364 const pageFound = tabsView . getChildren ( ) . find ( page => page . tabId === selectedTabId ) ;
@@ -495,31 +476,6 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
495476 return null ;
496477 } ,
497478
498- __getActivityOverviewPage : function ( ) {
499- const resourceData = this . __resourceData ;
500- if (
501- ! osparc . desktop . credits . Utils . areWalletsEnabled ( ) ||
502- ! osparc . utils . Resources . isStudy ( resourceData )
503- ) {
504- return null ;
505- }
506-
507- const id = "ActivityOverview" ;
508- const title = this . tr ( "Activity Overview" ) ;
509- const iconSrc = "@FontAwesome5Solid/tasks/22" ;
510- const page = this . __billingSettings = new osparc . dashboard . resources . pages . BasePage ( title , iconSrc , id ) ;
511- this . __addOpenButton ( page ) ;
512-
513- const lazyLoadContent = ( ) => {
514- const activityOverview = new osparc . jobs . ActivityOverview ( resourceData ) ;
515- const billingScroll = new qx . ui . container . Scroll ( activityOverview ) ;
516- page . addToContent ( billingScroll ) ;
517- }
518- page . addListenerOnce ( "appear" , lazyLoadContent , this ) ;
519-
520- return page ;
521- } ,
522-
523479 __getPreviewPage : function ( ) {
524480 const resourceData = this . __resourceData ;
525481 if (
@@ -840,6 +796,52 @@ qx.Class.define("osparc.dashboard.ResourceDetails", {
840796 page . addToHeader ( toolbar ) ;
841797 page . addToContent ( createFunction ) ;
842798 return page ;
843- }
799+ } ,
800+
801+ __getProjectFilesPopUp : function ( ) {
802+ const resourceData = this . __resourceData ;
803+ if ( ! osparc . utils . Resources . isService ( resourceData ) ) {
804+ const title = osparc . product . Utils . getStudyAlias ( { firstUpperCase : true } ) + this . tr ( " Files..." ) ;
805+ const iconSrc = "@FontAwesome5Solid/file/22" ;
806+ const dataAccess = new qx . ui . basic . Atom ( ) . set ( {
807+ label : title ,
808+ icon : iconSrc ,
809+ font : "text-14" ,
810+ padding : 8 ,
811+ paddingLeft : 12 ,
812+ gap : 14 ,
813+ cursor : "pointer" ,
814+ } ) ;
815+ dataAccess . addListener ( "tap" , ( ) => osparc . widget . StudyDataManager . popUpInWindow ( resourceData [ "uuid" ] ) ) ;
816+ this . addWidgetToTabs ( dataAccess ) ;
817+
818+ if ( resourceData [ "resourceType" ] === "study" ) {
819+ const canShowData = osparc . study . Utils . canShowStudyData ( resourceData ) ;
820+ dataAccess . setEnabled ( canShowData ) ;
821+ }
822+ }
823+ } ,
824+
825+ __getActivityOverviewPopUp : function ( ) {
826+ const resourceData = this . __resourceData ;
827+ if (
828+ osparc . desktop . credits . Utils . areWalletsEnabled ( ) &&
829+ osparc . utils . Resources . isStudy ( resourceData )
830+ ) {
831+ const title = this . tr ( "Activity Overview..." ) ;
832+ const iconSrc = "@FontAwesome5Solid/tasks/22" ;
833+ const dataAccess = new qx . ui . basic . Atom ( ) . set ( {
834+ label : title ,
835+ icon : iconSrc ,
836+ font : "text-14" ,
837+ padding : 8 ,
838+ paddingLeft : 10 ,
839+ gap : 12 , // align with the rest of the tabs
840+ cursor : "pointer" ,
841+ } ) ;
842+ dataAccess . addListener ( "tap" , ( ) => osparc . jobs . ActivityOverview . popUpInWindow ( resourceData ) ) ;
843+ this . addWidgetToTabs ( dataAccess ) ;
844+ }
845+ } ,
844846 }
845847} ) ;
0 commit comments