4 Replies Latest reply on Jul 28, 2017 5:18 AM by khayes RSS
    khayes Apprentice

    Tree Widget and Remote File Structure



    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?



      • Re: Tree Widget and Remote File Structure
        carko Creator

        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:







        -- Craig A.

          • Re: Tree Widget and Remote File Structure
            khayes Apprentice

            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?

          • Re: Tree Widget and Remote File Structure
            polinao Ninja

            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.

              • Re: Tree Widget and Remote File Structure
                khayes Apprentice

                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?