File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ qx.Class.define("osparc.jobs.Info", {
2424
2525 this . _setLayout ( new qx . ui . layout . VBox ( ) ) ;
2626
27+ const htmlEmbed = osparc . wrapper . JsonFormatter . getInstance ( ) . createDiv ( ) ;
28+ this . _add ( htmlEmbed , {
29+ flex : 1
30+ } ) ;
31+ this . addListener ( "appear" , ( ) => {
32+ osparc . wrapper . JsonFormatter . getInstance ( ) . setData ( info ) ;
33+ } ) ;
34+
35+ return ;
2736 const jobInfoViewer = this . getChildControl ( "job-info-viewer" ) ;
2837 jobInfoViewer . setJson ( info ) ;
2938 } ,
@@ -43,11 +52,8 @@ qx.Class.define("osparc.jobs.Info", {
4352 switch ( id ) {
4453 case "job-info-viewer" : {
4554 control = new osparc . ui . basic . JsonTreeViewer ( ) ;
46- /*
47- OM remove maybe
4855 const container = new qx . ui . container . Scroll ( ) ;
4956 container . add ( control ) ;
50- */
5157 this . _add ( control ) ;
5258 break ;
5359 }
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ qx.Class.define("osparc.wrapper.JsonFormatter", {
7878 } ) ;
7979 } ,
8080
81+ createDiv : function ( ) {
82+ const htmlEmbed = new qx . ui . embed . Html ( "<div id='json-viewer'></div>" ) ;
83+ return htmlEmbed ;
84+ } ,
85+
8186 setData : function ( myJSON ) {
8287 const formatter = new JSONFormatter ( myJSON , 1 ) ; // 1 = expand depth
8388 document . getElementById ( "json-viewer" ) . appendChild ( formatter . render ( ) ) ;
You can’t perform that action at this time.
0 commit comments