Skip to main content
1-Visitor
July 27, 2017
Question

Tree Widget and Remote File Structure

  • July 27, 2017
  • 2 replies
  • 2616 views

Hi,

I'm using a tree widget in one of my mash up and use the TW.RSM.FileTransferHelper service GetDirectoryStructure( ) to populate the tree. The problem I have is that the tree widget only shows to the level as they are defined in the EMS config.json file.

However, if I pass the result data to a grid I can see that it actually returns data about sub folders.

Ideally I would like to show the sub folders on my tree, Does anyone know why the tree widget only shows to the first level?

Thanks,

Kieron

2 replies

5-Regular Member
July 27, 2017

Hello, Kieron.

Just to be sure I'm understanding correctly, when you say Remote File Structure are you talking about Network data like in this article:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS238052

Thanks,

-- Craig A.

khayes11-VisitorAuthor
1-Visitor
July 27, 2017

Hi Craig,

thanks for the quick response, sorry, I obviously didn't explain it very well.

No, I don't mean displaying Network connections , I mean the file structure of the virtual directories on the edge server, the ones that are used for file transfer to a remote thing.

In the config.json file for the EMS (Edge Server) we listed the virtual directories (as below) that map to real directories on our remote asset.

"file": {

        "buffer_size": 8192,

          "max_file_size": 8000000000,

          "virtual_dirs": [{

                                "in": "/home/ems/microserver/filetransfer/in"

                                }, {

                              "out": "/home/ems/microserver/filetransfer/out"

                              }, {

                              "ems":  "/home/ems/microserver"

                            }, {

                            : "/var/log/Linx"

                            }],

        "staging_dir": "in/staging"

}

In my mashup I use a service provide with the composer called GetDirectoryStructure( )​; In my mashup I want to show the sub directories below which are below the '​"ems"​ branch. As I stated in the original post, these sub-directories are being returned by the GetDirectoryStructure( ) service (see second picture in original post - grid widget) but they are not displaying in the tree widget (see first picture).

I'm not sure why that is?

20-Turquoise
July 27, 2017

Could you please try using the Advanced Tree table instead? It can be downloaded from the marketplace here ThingWorx IoT Marketplace

The original tree widget is currenly not supported.

khayes11-VisitorAuthor
1-Visitor
July 28, 2017

Hi Polina,

thanks for the reply. Unfortunately the version of Thingworx we are using (7.3.0) does not support the Advanced Tree table. I don't want to upgrade at this point. Is there maybe some other way I can get the tree widget to display sub folders on my remote thing. Maybe by writing my own service?

K